STM32L073RZT6 UART Stops responding after power-on, reset fixes issue
Hello,
I am working with a custom board communicating via USB-2-USART IC (FT234XD-R). Upon power up, the board operates as expected. I can communicate with the device . After some time--usually 60sec or so, but not perfectly periodic-- the device will stop responding. Using a logic analyzer, it shows the FT234 is still sending data to the chip, but the chip is not responding.The graph below shows a power up, communications start, MCU stops responding and reset button restores COMS indefinitely. I have left the board running for 24hrs and do not see the same issue after reset.

Using the hardware reset button on the board, I can reset the MCU and no longer have any issues. A few debugging techniques I have tried so far:
- Debug mode w/ break points
- Setting an LED flash if UART config changes or breakout of main loop
- Printf or LED flash within the HAL lib error function void Error_Handler(void)
Current band-aid
Setting the independent watchdog fixes the issue, but I would like the resolve, rather than band-aid, the issue.
Background information
STMCUBE v 1.14
USART2 with RX and TX both using the DMA on different channels.
Configuration

Initialization
HAL_UARTEx_ReceiveToIdle_DMA(&huart2, (uint8_t*)uartRxBuffer, RX_BUFFER_MAX);
Callback structure

Debug mode w/ break points
When operating in debug mode I am unable to recreate the issue. Everything works as intended after power-up. I no longer have to click the hardware reset.
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
TIM21->CCR1 = 60000;
while (1)
{
}
/* USER CODE END Error_Handler_Debug */
}
Setting an LED flash if UART config changes or breakout of main loop
This debugging method did not show an relevant information. The UART would stop responding, but we never entered the error handler or broke out of the main loop.
Let me know if more information is needed. Thanks for stopping by!
Isaac.
