STM32WL Seeed E-5 UART2 HAL DMA won't work unless an APP_LOG is present int the main while(1) loop.
I am currently using the Seed E5 chip with LoRaWAN. I need to get data from a uart system through the uart2 (Pins PA2 and PA3). If I add in an APP_LOG displaying the data recieved from UART2 in the main while loop, then the uart2 works fine, but if I remove it the uart2 never runs.
When I step through the program with the debugger, I find that it always fails at the huart reception type line.
if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE)
{
__HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF);
ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_IDLEIE);
}My code for the UART2 is almost line for line from the uart example made by STM (found here https://github.com/STMicroelectronics/STM32CubeWL/tree/main/Projects/NUCLEO-WL55JC/Examples/UART/UART_ReceptionToIdle_CircularDMA)
The only notable difference is that I am also using UART1 and I am running LoRaWAN along side the UART stuff.
I am pretty new to UART and to the STM32WL and would appreciate any help on this issue.
