Is it possible that the pinout of the Quick Start Guide for the FRDM-KL82Z board has the pins PTB0/1 and PTB10/11 mixed up?
I looked at the KL82 sub family documentation and tried to use I2C0 on PTB0/1. When I didn't get a signal, I checked the pins PTB10/11 and there was the signal. Vice versa, using I2C1 I got the signal on PTB0/1 instead. On the board these are Pins 10/12 and 18/20 respectively.
It is not a problem as such, but confusing.
Thanks,
Leo.
Hello Leo,
Where is PTB20 on the board of frdm-kl82 ?On this board, the chip is MKL82Z128VLK7 MCU (96 MHz, 128 KB flash, 96 KB SRAM, 80 LQFP package) , from the Reference manual ,
we can see this chip has not the pin of PTB10 :
In the board, the PTB0 an PTB1 is the pins :
please tell me when it work , you connect which pins on the board .
Hope it helps
Have a great day,
Alice
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Sorry, I mentioned the wrong port. I was referring to what is in the above picture documented as PTC10 and PTC11 (not PTB10/11).
I tried to use I2C0 on PTB0/PTB1 ALT2 (pinout number 20 and 12 in the picture) (you marked them above). However, the signal appeared on what is marked as PTC10 and PTC11 (above top right), pinout number 18 and 20.
Vice versa, when I configure I2C1 I get the signal on what is mentioned in the picture above as PTB0 and PTB1.
Leo.
Hi Matthias,
What code you are using?
The I2C0 pin is PTB0,PTB1, and it is J4_12,J4_10 on the board, it is correct.
The I2C1 pin is PTC10, PTC11, it is J2_20,J2_18 on the board, it is also correct, I2C1 is connecting the acceleration sensor,
I am afraid you use the code with acceleration code, and you didn't control the I2C0 correctly, it will cause I2C1 still have wave, but I2C0 don't have wave. This is controlled by your code.
So, please tell me which code you are using? You can check it, whether you enable I2C1, and PTC10,PTC11.
Besides, if you configure the PTB0, PTB1, the pin will be opendrain, you need to add the external pull up, PTC10 and PTC11 already have the external pull up in the board, but PTB0 and PTB1 don't have, you need to add it by yourself.
Please add the external 4.7K to 10k pull up resistor for PTB0 and PTB1, then test it again.
The pin is not swapped.
Wish it helps you!
If you still have question, please contact me!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
You are right of course, a confusion on my side. It may have been a mixup with the libraries configuring the I2C port.