MPC57xx howto add UART hardware flow control (CTS/RTS) ?

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

MPC57xx howto add UART hardware flow control (CTS/RTS) ?

Jump to solution
1,600 Views
ruudsiebierski
Contributor III

I'm trying to add hardware flow control (based on CTS/RTS) to the MPC5748G UART. The MPC is connected to a FTDI2232H in UART mode, and I have a .NET application running on the PC which sends serial data using the virtual COM port.

Basically the setup works, when I de-assert the RTS output of the MPC, the transmission of data stops, but not immediately. It seems that 1 byte is still sent which causes a buffer overrun error on the MPC side.

Is there a recommended way on how to implement hardware flow control for the MPC ? 

0 Kudos
1 Solution
1,437 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

hardware flow control is not implemented in the microcontroller, so this feature must be implemented by software using GPIO pins. I'm not aware of an application note or general recommendations about this.

"Basically the setup works, when I de-assert the RTS output of the MPC, the transmission of data stops, but not immediately. It seems that 1 byte is still sent which causes a buffer overrun error on the MPC side."

- The effect is usually not immediate - transmission can be already in progress, so the receiver needs to be still prepared.

It's similar to Xon/XOff flow control. When XOff character is sent, receiver may still receive some next characters because it takes time to send the character, transmitter has to process the command and then current transmission must be finished.

Regards,

Lukas

View solution in original post

0 Kudos
2 Replies
1,438 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

hardware flow control is not implemented in the microcontroller, so this feature must be implemented by software using GPIO pins. I'm not aware of an application note or general recommendations about this.

"Basically the setup works, when I de-assert the RTS output of the MPC, the transmission of data stops, but not immediately. It seems that 1 byte is still sent which causes a buffer overrun error on the MPC side."

- The effect is usually not immediate - transmission can be already in progress, so the receiver needs to be still prepared.

It's similar to Xon/XOff flow control. When XOff character is sent, receiver may still receive some next characters because it takes time to send the character, transmitter has to process the command and then current transmission must be finished.

Regards,

Lukas

0 Kudos
1,437 Views
ruudsiebierski
Contributor III

Hi Lukas,

Thanks for the feedback. It would be nice to have some kind of "BUFFER_ALMOST_FULL" callback mechanism implemented in the Linflex driver, where the user (me) is able to do hardware flow control. Off course I can implement it myself.

Anyway, thanks :smileyhappy:

Best regards,

Ruud

0 Kudos