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.

Moderator: utzig

TnF
Posts: 7
Joined: Thu May 30, 2019 10:18 am

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

Postby TnF » Sat Apr 25, 2020 2:44 am

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: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

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

Postby Giovanni » Sat Apr 25, 2020 6:04 am

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: 823
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 135 times

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

Postby steved » Sat Apr 25, 2020 1:11 pm

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?

Postby TnF » Sun Apr 26, 2020 8:42 pm

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?

Postby TnF » Sun Apr 26, 2020 10:50 pm

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


Return to “Kinetis Support”

Who is online

Users browsing this forum: No registered users and 2 guests