GPIO Open-Drain I2C Bit Bang MK02FN128VFM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GPIO Open-Drain I2C Bit Bang MK02FN128VFM

810 Views
philipp_laemmle
Contributor II

Hello everybody

I want to intergrate a I2C BitBang on two of the GPIO Pins. The Kinetis processor should work as master.

Therefore I have to configure those pins as open-drain output connected with external pull up resistors.

Once the Master has send out the I2C Adress, it has to check the I2C_SDA like for the acknowledge of the slave.

The slaves gives the acknowledge by pulling the signal line low, but unfortunately when I read the GPIO with GPIO_DRV_ReadPinInput(), I get always a 0x01.

I'm a little bit confused about one sentence in the user manual of MK02FN128VFM.

The GPIO input data register

displays the logic value on each pin when the pin is configured for any digital function,

provided the corresponding Port Control and Interrupt module for that pin is enabled.

Can anybody help me to do the right configuration?

Thanks in advance.

Regards Philipp

Labels (1)
0 Kudos
1 Reply

483 Views
EarlOrlando
Senior Contributor II

Hello Philipp,

If you connect the GPIO pin to GND are you still getting an 1 when you call the function GPIO_DRV_ReadPinInput()?

Regards,

Earl.

0 Kudos