AnsweredAssumed Answered

NUCLEO-F042K6 UART ONLY RECEIVE 1 BYTE

Question asked by Dror Lugasi on Oct 29, 2017
Latest reply on Oct 30, 2017 by Dror Lugasi

Dear Community

 

I have a problem with the UART1/2 on the NUCLEO-F042K6 board. I try to read some bytes in polling mode using

 

HAL_UART_Receive();

 

And i set the size parameter to any number greater than 1 and i only receive 1 byte, even though i am sending more data from the other side. This is really bizarre, i have used this function countless times in other projects with other controllers, and this is the first time this happens.

 

When i use the 

 

HAL_UART_Receive_IT();

 

It reads the whole message that can be 4,8 or 10 bytes.

 

I have an idea of what i am doing and i used the UART peripheral of the STM boards a lot and everything i tried didn't solved this.

 

Even more strange is that it happened with several identical boards.

 

Can someone please help me to figure out how to solve this? or is this some kind of a problem with the specific boards?

 

Thanks,

Dror.

Outcomes