UART and data receive problem (STM32F401RE-Nucleo DemoExample)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-10-21 10:08 PM
Posted on October 22, 2015 at 07:08
Hello
I try the demo project to learn UART initialisation and usingSTM32Cube_FW_F4_V1.9.0\Projects\STM32F401RE-Nucleo\Examples\UART\UART_Printf\EWARMoutgoing Communication is fine. Demo is working.RxD and TxD are connected to the Pins RXD0 and TXD1Now 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 youMartin #stm32f4 #usart
Labels:
- Labels:
-
STM32F4 Series
-
UART-USART
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-10-22 6:06 AM
Posted on October 22, 2015 at 15:06
HAL_Delay() is dependent on a functional SysTick, I suspect this would normally get set up in HAL_Init()
For the USART perhaps you need to check that you have an IRQHandler and that it calls back into the HAL for processing.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
