Turn I2C pins into GPIO on PSoC 5LP

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
JiLi_1045506
Level 1
Level 1

Hello, I am having problems with the classic stuck I2C slave problem.  The PSoC 5LP is the master, and if we get a glitch on the bus, the slave get stuck waiting for a clock pulse, and may hold the SDA line low.  The solution is to toggle the SCL pin until the slave I2C device is synced back up and releases the SDA pin.

I am am trying to implement this recovery routine, but I am having trouble taking over the SCL pin and using the I2C_SCL_Write() and I2C_SCL_Read() functions.  There must be a register that connects these pins to either the UDB I2C implementation of the FF I2C implementation.  On the PSoC 4 forum, this function is listed as:

CY_SET_REG32(CYREG_HSIOM_PORT_SEL4,  0x00000000);

But CYREG_HSIOM_PORT_SEL4 does not exist on the PSoC 5LP.  Any help with how to do this would be greatly appreciated.

0 Likes
1 Solution
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked
0 Likes
2 Replies
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

Please refer to your other discussion

I2C pins into GPIO on PSoC 5LP

moto

0 Likes
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

Please refer to the discussion:

PSoC 5LP I2C Bus Reset Sample

0 Likes