How to transmit the data which size is bigger than buffer using UART?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to transmit the data which size is bigger than buffer using UART?

694 Views
phpark
Contributor I

Hi. I'm using MPC5606B and coding with C, CodeWarrior. 

I've tried to transmit the data using UART from computer to MPU. And, the data is bigger than the buffer size, 4byte.

I tried to send 1byte 4 times But, I couldn't get the right data. 

What should I do?

Labels (1)
Tags (1)
1 Reply

447 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

 

The buffer allows you to trigger interrupt once defined number of characters have been received (up to 4).

 

 

This feature may not be useful if you are receiving chunks of data which size is different from size of buffer. For example, when you expect two or three characters and the size of buffer is set to 4. You will get an interrupt only when all 4 characters are received.

 

SW example for UART communication can be found here:

https://community.nxp.com/docs/DOC-329441

 

Depending on baud rate, MCU is usually able to receive and process characters sent from another device (computer). If not, it may be necessary to:

  1. a) decrease the baud rate
  2. b) add delays between characters transmitted from another device / computer
  3. c) use handshaking like Xon/Xoff.

 

Regards

Lukas