2022-07-11 08:44 AM
Hello,
I use STM32G0 and USART2 in IT mode or DMA mode.
When the mcu receive a break command on uart line, he reset after entering on the IRQ handler.
Have you an idea ?
Regards
2022-07-12 06:18 AM
2022-07-12 08:21 AM
How do you know it's BREAK which makes the mcu to reset?
Normal data Rx works OK?
If you run code which does not handle UART (e.g. a simple LED blinky), does it reset upon receiving BREAK? (this is aimed at possible hardware problem)
Try to find where BREAK is handled in the HAL handler and place a breakpoint there.
Read out and check/compare-to-working/post UART registers content.
JW
2022-07-13 12:26 AM
Hi @Community member , i have tested yout proposition with simple led blinky and i have the reset on my STM32G0B0 (with uart2 disable).
The break is handle nowhere, it's my problem and the origin of my idea about design mistake.
2022-07-13 12:31 AM
Other thing, my STM32G0B0 is recognized as G0B1 (mcu sourced directly from ST) on the stlink tool.
I have soldered this mcu on nucleo32-G031K8 for my prototype and already integrated on my final design.
2022-07-13 06:58 AM
OK so is it a hardware problem? If yes, is it related to the Nucleo itself, or your "integration"?
Which pin are we talking about exactly?
JW
2022-07-13 07:03 AM
it's directly the mcu design.
I use de default USART2 pin (PA2-PA3)
I have tested with USART4 and all works fine.
I think we have a real problem with this mcu G0B0 and USART2
2022-07-13 07:34 AM
@tvill.1 ,
And what do you have connected to PA3? How exactly are you generating the BREAK? At what baudrate?
On the Nucleo boards, PA2/PA3 is connected to the on-board STLink, through solder bridges - did you disconnect these solder bridges?
JW
2022-07-13 07:41 AM
Maybe the ST-Link could be mis-handling the break, and causing a reset ... ?
(the St-Link has control of the reset line)
2022-07-13 08:03 AM
i have not stlink on my custom designe pcb and i have still the reset.