Teensy 3.2 serial2 question..

jim lee

Well-known member
The pinout picture shows Serial2 can be 10 & 9 -or- 26 & 31. How can I select the 26 &31 set as opposed to the 9 & 10 set?

Thanks!

-jim lee
 
If you look in HardwareSerial.h you will find the following
Code:
    virtual void setRX(uint8_t pin) { serial_set_rx(pin); }
    virtual void setTX(uint8_t pin, bool opendrain=false) { serial_set_tx(pin, opendrain); }

edit: copied from correct core
 
That still seems to get in the way of the SPI port. (That likes to use pins 9 & 10 as chip select) Or maybe I'm doing it wrong?

Code:
 Serial2.setRX(26);
 Serial2.setTX(31);
 Serial2.begin(9600);
-jim lee
 
Thanks. But that isn't working either. I have pin 7 free and I can move move pin 8's wire to pin 6. This'll leave Serial3 free of anything. I think I'll try that for now.

-jim lee
 
Or maybe I'm doing it wrong?

Code in msg #3 should not interfere with SPI.

It's possible you might be doing something wrong. Impossible to say without seeing the code.

It's also possible you've found an obscure bug in the HardwareSerial or SPI code. No way to really investigate without a program to reproduce the issue.
 
Wait, I tried switching it over to serial3, nothing. So I removed the added serial device all together. Nothing. I'm sorry to have bothered you guys. I obviously have something else going on here. Maybe I cooked one of the SPI pins messing about? Who knows. It's time for me to do a lot of back tracking to see what I broke.

-jim lee
 
Back
Top