Question
UART not working while debugging - Custom STM32U5 LPUART1 Interrupt
Hello,
I'm working with an STM32U5 custom board.
I use the LPUART1 to read input with an interrupt as shown below and to write it back on the same LPUART1 :
In the while loop of the main function I have :
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
HAL_GPIO_TogglePin (GPIOA, GPIO_PIN_11);
HAL_UART_Transmit(&hlpuart1, (uint8_t *)aRxBuffer, sizeof(aRxBuffer), 10);
HAL_Delay (1000); /* Insert delay 100 ms */
}
And I've also created the function below:
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
HAL_GPIO_TogglePin (GPIOA, GPIO_PIN_8);
HAL_UART_Receive_IT(huart, (uint8_t *)aRxBuffer, 10);
}
And this work fine but only if don't execute the code with the debbuger. If I execute the code with the debugger, nothing is never printed and the interrupt is never executed.
I've tried this with STM32CubeIde debugger and same problem with STM32 extension in VSCode with Cortex-Debug.
