|
[i = s] posts by Steini in 2018-11-21 03:54 Edit
Symptom: LOW VOLT occurs with several power sources when leaving working mode to enter standby mode (long press "B" key during heating operation)
I downloaded the source code of firmware 1.06 and took a look:
1) working mode is TEMP_CTR (CTRL.c, line 600) state of the state machine
2) switch-case handles long press of "B" key to enter standby mode (CTRL.c, line 619)
2a) state is set to IDLE for next pass of state machine (CTRL.c, line 622)
2b) voltage is set to 5 volts (CTRL.c, line 623 calling Vol_Set in line 190 with value 1)
2c) break leaves switch-case but current pass of state machine in state TEMP_CTR will be continued... (CTRL.c, line 624)
3) Read_Vb() is called to detect abnormal voltage (CTRL.c, line 686)
3a) Read_Vb() sets gAlarm_type to LOW_VOLTAGE is voltage is below gTurn_mixv*10 (HARDWARE.c, line 131-133)
3b) gTurn_mixv is set to 60 (HARDWARE.c, line 33) which results in LOW_VOLTAGE in gAlarm_type below 6 volts (being true for fast power supplies as voltage has been set to 5 volts in 2b)
3c) with 3b being true, value 2 is returned (HARDWARE.c, line 134)
4) return value of Read_Vb() not being 0 has no immediate impact, 200 consecutive times would be necessary (CTRL.c, lines 686-698)
5) Get_AlarmType() > NORMAL_TEMP is similar to Get_AlarmType() > 1 (CTRL.c, line 699 combined with CTRL.h, line 54)
5a) Get_AlarmType() returns gAlarm_type (HARDWARE.c, line 112)
5b) gAlarm_type is LOW_VOLTAGE (see 3b) which is 5 (CTRL.h, line 58)
5c) with Get_AlarmType() == 5 > 1, state for next pass is set to ALARM (CTRL.c, line 701) instead of IDLE (see 2a)
6) new state ALARM will display LOW VOLT instead of entering the IDLE state (see symptom)
My recommandation to fix this bug:
a) replace with ((Get_AlarmType() == HIGH_TEMP) || (Get_AlarmType() == SEN_ERR)) (immediate voltage based alarm types would be ignored), or
b) after possible transition to another state, make sure state is still TEMP_CTR after line 625 in CTRL.c before proceeding
|
|