View Single Post
  #858 (permalink)  
Old 01-02-2012, 11:26 PM
[ACL]'s Avatar
[ACL]
VIP Member
Offline
Threadstarter
Location: NY
 
Join Date: Feb 2010
Posts: 1,534
Reputation: 6350
[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] - NAND OMGB (1.2.3)

Quote:
Originally Posted by muziling View Post
Found Division by zero in kernel.

htc_rhod_batt_corr() in file htc_battery_smem.c

Code:
    BATT("htc_get_batt_info 888\n");
        /* TODO: temp algo is not ok..if someone have the timte -> must look into the driver */
    buffer->batt_tempRAW = ( buffer->batt_tempRAW * 5200 ) / htc_adc_range;
    BATT("htc_get_batt_info 999\n");
    av_index = ( buffer->batt_tempRAW * 18 ) / ( 2600 - buffer->batt_tempRAW );
    BATT("htc_get_batt_info aaa\n");
    buffer->batt_tempRAW = htc_battery_temperature_lut( av_index );
    if ( buffer->batt_tempRAW < 250 ) /* fixed til so long we can get constant values - otherwise the algo wouln'T work good */
            buffer->batt_tempRAW = 250;
  BATT("htc_get_batt_info bbb\n");
    fix_batt_values(buffer);
  BATT("htc_get_batt_info ccc\n");
    htc_battery_level_compute( buffer );
  BATT("htc_get_batt_info ddd\n");
    return 0;
HeroC battery driver, many different, https://raw.github.com/TeamICS/heroc.../htc_battery.c
Do you know exactly what line ? I mean this could only happen if buffer->batt_tempRAW is 0. Can you printK to see if thats the case ?
__________________
Reply With Quote