Hardfault issue on STM32G030
Hi,
I'm facing on hardfault error.:(
I have used many ST32F MCUs for projects.
STM32G030C8T6 has two UART.
UART1 is used for debugging message out, and UART2 is for communicated with other system I am using.
But, a few message out thru UART2 cause the hardfault error. just call HAL_UART_Transmit().
just in main.c
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_DMA_Init();
MX_ADC1_Init();
MX_USART1_UART_Init();
MX_USART2_UART_Init();
while (1) __io_putchar_u2('*');
---
int __io_putchar_u2 (int ch)
{
HAL_UART_Transmit (&huart2, (uint8_t *) &ch, 1, 1);
return ch;
}
I have not seen this situation for STM32.
UART1 is no problem.
What cause the hardfault on this?
BR
Paul