Hello, I found some bugs on Pack version 2.5.0 USART driver for STM32F4. File USART_STM32F4xx.c Revision: V2.3 Lines 1506,1747 and 1808. The problem is on USART3:
1506: else if (usart == USART3) { __HAL_RCC_USART2_RELEASE_RESET(); } 1747: else if (usart->reg == USART3) { __HAL_RCC_USART2_CLK_DISABLE(); } 1808: else if (usart->reg == USART3) { __HAL_RCC_USART2_CLK_ENABLE(); }
So USART3 don't works! After replacement of USART2 by USART3, transmit data works fine in documentation pack USART example. But I have a problem with Receive(..) function.
USARTdrv->Send("\nPress Enter to receive a message", 34); osSignalWait(0x01, osWaitForever); while (1) { USARTdrv->Receive(&cmd, 1); /* Get byte from UART */ osSignalWait(0x01, osWaitForever); if (cmd == 13) /* CR, send greeting */ { USARTdrv->Send("\nHello World!", 12); osSignalWait(0x01, osWaitForever); } }
When I Call function USARTdrv->Receive(&cmd, 1); I have an event ARM_USART_EVENT_RX_TIMEOUT after few mS and go to osSignalWait(...)! I never have ARM_USART_EVENT_RECEIVE_COMPLETE event! I don't understand why I receive this event and not ARM_USART_EVENT_RECEIVE_COMPLETE! Is anyone have an other example to use USARTdrv->Receive(...) or Is anyone know how this function works? Thanks a lot.
Hello,
All mentioned issues are allready solved and will be available in new pack.
Temporary solution for your Receive problem can be found here: http://www.keil.com/forum/60015/
Hi, thanks for your reply. But have you an idea how new pack will be available?