I2C units used with TENSY 4.0

Status
Not open for further replies.

henk

New member
While trying to use I2C_1 with Teensy 4.0, and after studying schematics and datasheets I got the feeling something has been shifted a bit

Looking to the Pinout assignments accoriding https://www.pjrc.com/store/teensy40.html it looks like
I2C_0 is connected to pins 19, 18 (scl, sda)
I2C_1 is connected to pins 16, 17 (scl, sda)
I2C_2 is connected to pins 24, 25 (scl, sda)

Looking to the schematics and the datasheet of MXRT1062 it seems to be as follows
I2C_0 is connected to pins 19, 18 (scl, sda) using ALT3
I2C_1 is NOT connected to a 'free' set of píns
I2C_2 is connected to pins 16, 17 (scl, sda) using ALT1
I2C_3 is connected to pins 24, 25 (scl, sda) using ALT0

Has anyone experiences with this shift of assignments?
if so, can it be solved by adapting "i2c_t3.h"?
 
Look at the Wire library constructors, in WireIMXRT.cpp

https://github.com/PaulStoffregen/Wire/blob/master/WireIMXRT.cpp#L312

FWIW, the Arduino pin numbers don't follow NXP's GPIO numbering, the Arduino serial ports number don't line up with NXP's numbers, the SPI ports presented in Arduino aren't a direct mapping to NXP's, and so on...

With all of these, we present a user friendly naming convention of sequentially numbered ports, without gaps, of the hardware users can actually access with the board they buy.
 
Status
Not open for further replies.
Back
Top