Help me understand why my UART communication fails
- July 25, 2023
- 5 replies
- 6247 views
Good morning,
my product is made of 2 parts, each of which has a dedicated MCU. MCU1 is STM32L476ZG and MCU2 is STM32L4P5CG. The whole device is supplied through a wall adapter working at 24VDC. Internally,the voltage is converted to supply all the module with the required voltage. The 2 parts communicate via UART, set with a baud rate = 9600, very low. The communication is not continuous but is event-based.
The software implementation was straight forward and all works BUT it stops working when the following happens:
1. I upload the software in the MCUs via the ST debugger
2. I unplug the debugger (all good so far: the software works fine)
3. I unplug the supply (mains adapter) from the device and plug again.
At this point the communication fails and UART sends only zero. This is even weirder: if I press the reset button on the board (schematic attached), the communication starts working again. Honestly, I cannot understand why the communication fails when the supply is turned off and it recovers after pressing the reset button. Any idea?
Thank you all and I am happy to add more details if needed.