UART don't initialize
Hello,
I'm working on a NucleoF746ZG, for the past week i'm unable to communicate with board tought UART.
The problem seems to be that HAL_UART_Init(&huartX) return 0 which means that the UART is not initialized.
I tried to check if it was a hardware problem with a previous work and the UART is prefectly fine.
So i tried to check with a brand new code generate with MX with no modification except the USART6 on pin PG14 & PG9 and the clock (i tested also the basic clock config did't work)
There code send "Hello\r\n\0" to my board and blink the redled if the state return by HAL_UART_Transmit is 0
There is the main:
int main(void)
{
HAL_Init();
/* Configure the system clock */
SystemClock_Config();
MX_GPIO_Init();
MX_ETH_Init();
MX_USART3_UART_Init();
MX_USB_OTG_FS_PCD_Init();
MX_USART6_UART_Init();
HAL_UART_StateTypeDef uartState = HAL_UART_GetState(&huart6);
uint8_t * ping = "Hello\r\n\0";
uint16_t len = strlen((char*) ping);
while (1)
{
uartState = HAL_UART_Transmit(&huart6, ping, len, 100);
if(uartState == 0x00U)
HAL_GPIO_TogglePin(LD3_GPIO_Port, LD3_Pin);
HAL_Delay(1000);
}
}
Thanks for your time.
