Teensy 4.1 and attachCts

paulhat

Member
HI All,

Using flow control on a Teensy 3.2 worked well for me.
I have decided to move up to the T4.1, but am having a few problems with hardware flow control.

For some context, I have Serial1 connected to an Xbee radio. Xbee flow control pins are connected to pins 2 and 3 of the T4.1 with pin 3 of T4.1 connected to the RTS pin on the Xbee. So pin 3 should be my CTS pin. This exact setup worked fine on the T3.2.

From the Teensy serial page -
* CTS polarity is inverted when connected through XBAR. Normally CTS is active low, meaning Teensy is allowed to transmit data when CTS is low, and must pause when CTS is driven high. But when using XBAR, Teensy transmits when the pin is logic high and pauses transmission while the pin is low.

Can anyone tell me if there is a way to use pin 3 as a standard CTS pin?
Maybe I require an inverting circuit?

Paul.
 
Thanks Defragster.

I have read that page a few times. I guess I find it a little confusing.
It looks like I can use pin 3 for CTS, but that pin is an XBAR (not sure what XBAR is yet) pin. It's polarity is inverted so I'm guessing it wont work.
The only option would be to assign the CTS pin to a non XBAR pin. But then what's the point of XBAR pins for CTS?
 
sorry I am trying to limit my typing...

Wonder if the XBAR stuff I enabled long ago in the USART code, could be extended...
That is could the XBAR pin, somehow be directed to the AOI subsystem, inverted and then have the inverted signal
passed to the LPUART...
 
Maybe I've missed something, but looking at page 64-67 in the reference manual, I don't see an option for XBAR2 or XBAR3 (effectively the AOI inputs) to receive the I/O pin signal either directly or from XBAR1 output.

If that issue could be solved, XBAR1 looks like it could receive the AOI output and route it to the LPUART input.
 
XBAR2 and XBAR3 can receive the analog comparator outputs. XBAR1 can too. So maybe one of the analog comparators could be used to receive the CTS signal, and then if it needs to be inverted it could go to AOI, and then make its way to the LPUART.

Looks like any of the QTIMER3 outputs can also connect. So maybe there's some way to configure one of those timers to receive the signal (perhaps with 1 or 2 cycle delay of the 150 MHz peripheral clock) on pins 14,15,18,19 and send it through XBAR to ultimately reach LPUART. Maybe?

Edit: on 2nd thought, QTIMER seems unlikely to work.
 
Last edited:
Back
Top