2018-05-07 02:34 AM
Hello all,
I am really new at all this, I hope someone has a simple example to help.
I am trying to receive 9-bit data using the STM32-F103 in normal polling mode example code below
uint16_t
messages[30];
HAL_UART_Receive(&huart2, (
uint8_t
*)messages,
sizeof(messages),1000);
I thought a 16 bit register should be used to get all 9 bits, however looking at the data that is contained in the messages array, they are all over the place and I can't make sense of it and in most cases all 16 bits are populated when I'd expect only 9 bits populated in each element of the array.
Anybody got a simple solution for me?
Thank you all in advance
2018-05-29 06:00 PM
Thanks for all the support. What I didn't mention was that I'm running a nucleo, turns out that uart2 is configured to support the serial programming- resoldered the links and now works. Was in the nucleo instructions....