Skip to main content
arun rajajinagar
Associate II
July 17, 2019
Question

Code Get Stuck

  • July 17, 2019
  • 2 replies
  • 1719 views

Hi,

I am using STM32L072 LoRa discovery kit and enabled UART with DMA. Some times my code gets stuck in HAL_UART_Receive_DMA( ....) function at the line 

SET_BIT(huart->Instance->CR3, USART_CR3_EIE);

This is called at the begining of the code. It wont recover at all until i reset the MCU for some number of times.

Kindly let me know how shall I resolve this issue.

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
July 17, 2019

Make sure you check and clear any noise or framing errors, etc that might be stopping the receiver from collection additional data.

Implement a timeout/recovery so it doesn't get stuck indefinitely. You'll likely need to debug/diagnose your own system.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
MSipo
Senior II
September 25, 2023