I know, that's why I didn't update here. Shortly after the update I noticed that, but it was late and I was tired, so I left it for other day.
I had done few widgets modification, added more data fields, (all signed/unsigned int 8/16/32) and put a check to ensure the last char is always 0 (string null termination), as otherwise it could get out of control.
This check wasn't done before, so you'd never know if a widget was incorrectly configured.
So after the update, one widget had an incorrect reserved char size, and the check detected it.
It didn't cause problems either because the assigned array was bigger, but it could crash the system in other conditions, so I decided to generate and error there.
The issue now happens with the calibration. I'm faking it as I don't have tips, and it reboots at the end.
In any case it should take care of the correct conditions, and reject data if not correct.
There might be something not being checking causing an undefined behavior, or other problem that I haven't identified yet.
Edit: I had a last try. I think the issue was the calibration process. It always returned 1 (correct).
There was no implementation for returning 0 anywhere. So it worked if the conditions where correct, but if they was not the case, again undefined behavior.
I added a check at the end of the calibration that ensures that the adc and temp values are 200<300<400 and return error if not. Hopefully should fix it.
At least, now the calibration shows failed for me, what it should have done before because the ADC only collects garbage when the iron is not present.
Code updated but builds removed for now. It should be pretty safe anyway, the pwm stops, the watchdog triggers...
I don't have iron tips and I've spent too much timer lately into this... I left the testing to you, try the calibration, and see if it fails anytime.
The only way the stm32 hard reets without warning is if the watchdog triggers. And this only happens when the ADC/PWM stalls.
I was busy with some test at the hospital, I'm a bit saturated and will take a small break.
Yesterday I added another option for setting the steps in the setpoint adjustment.
Also redesigned the PWM updating method, as changing it directly would cause some issues with the iron process being updated within the ADC interrupt.
Now it's the iron process who updates the pwm if it was changed. Also few other modifications in the pwm period/pwm delay widgets to ensure they never overlap.
BTW, you had asked me how to connect the JBC handle...nothing special needed.
In the C245 you have 2 options: Wire it exactly as the T12, with the sensor in series with the heater (no modifications needed), or independently (Then you will need to modify the board).
The C210 connection uses series conenction internally so it's the only way.
Check the Dreamcat4 documentation repo, has a lot of info.