Ehsan Rasouli

Bug Report in USART IO Operation Functions!!

Blog Post created by Ehsan Rasouli on Aug 14, 2017

Dear Reader:

I guess In All " UART IO Operation Functions" such as HAL_UART_Transmit(), HAL_UART_Receive(), ...

the second input argument which is (uint8_t *pData) should be modified as (uint16_t *pData) so we would not encounter a problem in a 9_bit communication, otherwise in a 9_bit communication the following lines in those functions may malfunction:

temp = (uint16_t *)pData;

huart -> Instance -> DR = (*temp & (uint16_t)0x01FF);

best regards