T4.1 Invert I2C pin-out?

Status
Not open for further replies.

microguy

Member
Hi,

I'm making a new "mother" board design with Teensy 4.1 with two slot for "daughter" board.

As I want slot 1 and slot 2 board can be inverted, I have a pin-out problem :mad:

on slot 1 : PIN 1 : TX6-SCL2 (T4.1 : 24)
PIN 2 : RX6-SDA2 (T4.1 : 25)
on slot 2 : PIN 1 : TX4-SDA1 (T4.1 : 17)
PIN2 : RX4-SCL1 (T4.1 : 16)

So, I2C pin are inverted on slot 2....

Is there a way to invert I2C Pin-out on Teensy 4.1?
 
These are hardware mappings set in stone (well silicon). Short of overriding all the relevant #defines for the I2C symbols
I don't see a way.
Why would this matter? Just document it! Or wrap in a library layer?
 
These are hardware mappings set in stone (well silicon). Short of overriding all the relevant #defines for the I2C symbols
I don't see a way.
Why would this matter? Just document it! Or wrap in a library layer?

I want to do this because I'm making some daughter board for exemple: i2c on one type and Serial com on a second type. But I want to be able to put any daughter card in any mother board slot.
 
The I2C, as Mark says, is set in silicone. The chips have dedicated hardware to run these busses that are only available on certain pins. If you mean to say you want to swap the pin locations you can't do this using the teensy's hardware.

I'm not sure I understand why you can't use the appropriate pins, and if you're designing the hardware then definitely you should do this. Otherwise, you could use something like https://github.com/todbot/SoftI2CMaster which is a software I2C library that lets you use any two pins, but at the cost of extra processor usage.
 
Status
Not open for further replies.
Back
Top