Quote:
Originally Posted by muziling
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 ?