_T_
Hello everyone,
I am trying to get it to work as modbus slave with openplc. But as soon as i run plc, the core goes straight into Hard Fault state.
fault.png

Have anyone experienced this kind of issue?
Reply 0 0
thiagoralves
I don't have a blue pill to test. Does this happen with every code you try to upload? Does it work if Modbus is not enabled?
Reply 0 0
_T_
So far I've tried it with blue pill and black pill and the results were the same. I uploaded the blank project as well as a simple program that turns off the LED on the PCB. It seems to work as long as I am no trying to communicate via Modbus, if I do then it goes immediately to Fault mode. One more thing, if hardware watchdog is turned off, then Modbus communication works (I can read ADC value) but CPU reset itself in an endless loop (LED blink instead being in the OFF state)
Reply 0 0
thiagoralves
That's interesting because the code is the same for all platforms, and it doesn't happen with any of the Arduino boards. I'll have to get one of these boards to investigate further.
Reply 0 0
thiagoralves
Hey @_T_ I fixed this bug. It was caused by a very buggy Modbus library. I removed that lib and rewrote a new Modbus library from scratch with low memory footprint in mind. Just update your editor to the latest version and try again. Let me know if you find any other issue.
Reply 0 0
Reply