UART001 Transmission Problem

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
I would like to ask about UART001 Transmission Problem. From the example (in help content) we could see the example give the data transmission to be separated each character by space, hence it is written as "H E L L O W O R L D" rather than "HELLO WORLD".

In some practical use, we need to monitor the value of integer and send this value through UART001 app, which we can't separate the bit easily as we input space to the array of character.

If I write :

data=324;
sprintf(writeData,"%d",data);
UART001_WriteDataMultiple(&UART001_Handle0,(uint16 _t*)&writeData,(uint32_t)sizeof(writeData));

On the terminal it will only show
24<0><0><0>

The setting for UART is as below
Operation Mode: Full Duplex
Parity Selection: No Parity
Stop Bit: One
Data bits: 8
Tx FIFO Size: 4
Tx Trigger Limit: 2

How should I solve this problem?
0 Likes
2 Replies
Not applicable
It should be 34<0><0><0> on the terminal, sorry
0 Likes
Not applicable
Hi alnoe,

I don't use the WriteDataMultiple in my application so far. It shouldn't be a problem but if I were you I would try to send every single byte with tue function UART001_WriteDataBytes. Here you can specify as well, how many bytes shall be transmitted. If this is working you know at least where the problem is located.

Sebastian
0 Likes