STM32G030 USART and HAL_Delay strange behavior
Hello all,
I've recently received a dev board for STM32G030F6 microcontroller and I wanted to make a simple USART test before continuing.
I've started the project using STM32 CUBE MX initializing serial port and clock, also, I've retargeted printf as follows:
int __io_putchar(int ch){
HAL_UART_Transmit(&huart2, (uint8_t *)&ch, 1, 0xFFFF);
return ch;
}the main is just the initializations and a while(1) loop as follows:
while (1){
printf("Hello World\r");
HAL_Delay(1000);
}When I start a debug session (using st link v2 or J-link edu, tried both) without the "HAL_Delay" I correctly see the message on the serial port.
On the other hand, If the HAL_Delay is present everything seems ok but no output on the serial port, or sometimes it will output like a burst.
Does anyone have an idea of what can be happening?
Looking forward your reply,
Best regards, Mauro.
