Skip to main content
Visitor II
June 17, 2024
Question

UART stops transmit after 20 minutes?

  • June 17, 2024
  • 2 replies
  • 969 views

 

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

 

    This topic has been closed for replies.

    2 replies

    Graduate II
    June 17, 2024

    >>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 ?

    Graduate II
    June 17, 2024

    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.