AnsweredAssumed Answered

UART and data receive problem (STM32F401RE-Nucleo DemoExample)

Question asked by moertl.martin on Oct 22, 2015
Latest reply on Oct 22, 2015 by Clive One
Hello

I try the demo project to learn UART initialisation and using
STM32Cube_FW_F4_V1.9.0\Projects\STM32F401RE-Nucleo\Examples\UART\UART_Printf\EWARM

outgoing Communication is fine. Demo is working.
RxD and TxD are connected to the Pins RXD0 and TXD1
Now i want to receive datas, so i chanced to:

  /* Infinite loop */
  uint8_t pBuf;
  while (1)
  {
    while (HAL_UART_Receive(&UartHandle, &pBuf,1,1)!= HAL_OK)
    {
    }  
    printf("\n\r UART Byte received UART\n\r");
  }


I never received data? Have anybody a hint?

Seconday Problem:
If i ad a HAL_Delay() the code freezed there [File:stm32f4xx_hal.c]


__weak void HAL_Delay(__IO uint32_t Delay)
{
  uint32_t tickstart = 0;
  tickstart = HAL_GetTick();
  while((HAL_GetTick() - tickstart) < Delay)
  {
  }
}

HAL_GetTicket() allways return 0.

What i have to do, that i can use HAL_Delay() in the demo Project?

Thank you
Martin

Outcomes