GPIO Open-Drain I2C Bit Bang MK02FN128VFM

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

GPIO Open-Drain I2C Bit Bang MK02FN128VFM

858 次查看
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

标签 (1)
0 项奖励
回复
1 回复

531 次查看
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 项奖励
回复