cancel
Showing results for 
Search instead for 
Did you mean: 

UART TX pin going low automatically after running the system for a long time, change in Flash also noticed

AJha.1
Associate

I've configured SWDCLK as UART_Tx in the initialization section. Everything runs fine but after running the system for a long time UART_Tx pin goes low all of a sudden and communication stops. The Tx pin remains low even if I reset the MCU. If I reprogram the MCU again everything runs fine. I have also noticed a few changes in the flash.

I am guessing that somehow the Tx pin is getting configured to its default status i.e., SWDClk when the error condition occurs and remains in SWDCLK mode until I reprogram the MCU.

What could be the possible reason? Any help will be highly appreciated.

1 REPLY 1
TDK
Guru

FLASH doesn't typically spontaneously change, nor do register settings. Perhaps the chip is being reset, or held in reset. Perhaps the clock is configured incorrectly.

It would be more productive to address the problem objectively, determine where in your program the issue is occurring using GPIO pins or a debug UART stream, and go from there.

If you feel a post has answered your question, please click "Accept as Solution".