Trying to see any Master i2c bus activity on the FRDM board. I actually turned on both i2c ports [just to make sure something didn't happen to one port.
For one port, I used the I2C_LDD method, basically copied straight out of the "typical usage"
And not seeing any activity on either the clock line or data line [which has a 10K pullup resistor to 3v of course]
I used the higher level component just to send one byte on the other i2c port. .
test: I2C2_SendChar(0xaa);
goto test;
Problem: I don't see any activity at all. The clock lines are non-active. Any ideas?
Solved! Go to Solution.
Well I still don't have i2c fully running but I now have a clock active during Master i2c transmission. Since I am new to Kinetis programming, I was calling the i2c master transmit from a timer interrupt routine. Basically I am just data logging for time on. When I moved the call outside of the interrupt routine I am now able to see the clock. Interesting to note also is for the eeprom, Microchip only suggests using a pullup on the SDA line. But for the FRDM board, while communicating with the accelerometer, they use a pullup on both the SDA and SCL lines. So I added the additional pullup as well.
It is possible to cut off the clock from many peripherals on the KL25Z, known as 'clock gating'. But by default this should not be the case.
I suggest that you try one of my examples (e.g. Accelerometer demo) on GitHub if they work for you.
Got i2c working on the FRDM board. Thanks for your help again Erich.
Just out of interest, what was your solution?
Well I still don't have i2c fully running but I now have a clock active during Master i2c transmission. Since I am new to Kinetis programming, I was calling the i2c master transmit from a timer interrupt routine. Basically I am just data logging for time on. When I moved the call outside of the interrupt routine I am now able to see the clock. Interesting to note also is for the eeprom, Microchip only suggests using a pullup on the SDA line. But for the FRDM board, while communicating with the accelerometer, they use a pullup on both the SDA and SCL lines. So I added the additional pullup as well.
Weird about the pull-up on SDA only, unless there is some sort of pull-up in the Microchip part - because the electrical nature of I2C means it HAS to have pull-up resistors on both SDA and SCL. So, if you're doing I2C on pins other than the ones with the pull-ups on the Freedom board, yes, you need those resistors.
Hey Erich, I ran your project and probed the signals at the pullup resistors on the FRDM board. I see activity. When I try to reconfigure the component and move the signals to any other i2c port pins and add some additional 5K pullups I still don't see any activity.
There is a bit of a mystery to i2c on this lovely FRDM board.