cancel
Showing results for 
Search instead for 
Did you mean: 

UART stops transmit after 20 minutes?

CuongLee
Associate II

 

I am using the STM32 G431RBT6 chip and UART 3 for data transmission. The transmission works normally, but after about 20-30 minutes, it suddenly stops completely. Here is the function I am using to send data:

 

 
bool SendByteUart3(uint8_t byte) {
   HAL_StatusTypeDef ret;
   ret = HAL_UART_Transmit(&huart3, &byte, 1, 10);
   if (ret == HAL_OK)
   return true;
   return false;
}

What could be causing this issue, and how can I resolve it?

NVIC configuration:

CuongLee_0-1718591503367.png

 

2 REPLIES 2

>>What could be causing this issue, and how can I resolve it?

So, it returns an error, perhaps pay attention to that, and look at what it is complaining about?

Perhaps flagging an error or status that needs clearing.

Inspect UART3->ISR ?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Techn
Senior III

Since you are not using interrupt to send the character, you can disable the interrupt. Does the unit fails to execute other functions or only uart stops? Have one led or some hardware indication for success and failure, since it's a run time error. 

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