I2CD2 doesn't work while I2CD1 does, what's the catch?

ChibiOS public support forum for topics related to the Freescale Kinetis family of micro-controllers.
Post Reply
TnF
Posts: 7
Joined: Thu May 30, 2019 10:18 am

I2CD2 doesn't work while I2CD1 does, what's the catch?

Post by TnF »

Hello. I'm running QMK firmware on a teensy 3.2 We've made lots of work with the community since the last time i've posted and we basically now fixing I2C support.

I've been testing the whole day and i've come to the result where I2CD1 works just fine but I2CD2 does not work at all. The mcu drives a common 128x32 oled display with external pull-ups.

Do we need to set an alternative PAL mode or something? Alt is set to Alt2 like in the datasheet here:
https://www.pjrc.com/teensy/K20P64M72SF1RM.pdf (page 209)

Is there is a limitation or are we are missing something?

Kind regards
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: I2CD2 doesn't work while I2CD1 does, what's the catch?

Post by Giovanni »

Hi,

Perhaps you should ask this in the Kinetis sub-forum, moving this topic there. Personally I cannot help, I don't know that platform but it looks like some silly detail missing because I2CD1 works..

Giovanni
steved
Posts: 834
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 138 times

Re: I2CD2 doesn't work while I2CD1 does, what's the catch?

Post by steved »

Certainly there are people running multiple I2C ports on Chibi, so there is no underlying constraint.
As Giovanni said, probably some annoying little detail - multiple pin assignments to the same function, hardware setup, interrupt configuration or similar.
TnF
Posts: 7
Joined: Thu May 30, 2019 10:18 am

Re: I2CD2 doesn't work while I2CD1 does, what's the catch?

Post by TnF »

Thanks for the reply, i'll have a better look then to see if i find something and report back
TnF
Posts: 7
Joined: Thu May 30, 2019 10:18 am

Re: I2CD2 doesn't work while I2CD1 does, what's the catch?

Post by TnF »

Ok found the issue, the driver written used wrong defaults for I2C1..basically it assumed default bank in this case
Post Reply