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

PSoC™ 5, 3 & 1 Forum Discussions

jofic_334026
Level 3
Level 3
First like received

I'm using a PSoC 5LP to control a PCA functional test fixture (a.k.a. bed-of-nails). An operator can open the lid of the tester at any time during the test. I've found that if the lid is opened at exactly the right time it will cause the I2C component to error out in several different ways and I can't recover. Sometimes it ends up at CyHalt or at one of the blocking statements (i.e. the 'while' loops) in the I2C auto-generated code.

   

          What is the best way to clear I2C errors that may occur due to opening the lid randomly?    

0 Likes
3 Replies
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello,

   

Can you please tell us if you are using PSoC5LP as slave or Master?

   

Thanks,

   

Hima

0 Likes
jofic_334026
Level 3
Level 3
First like received

Master

0 Likes
jofic_334026
Level 3
Level 3
First like received

My solution to this was to make calls to I2C_Stop() followed by I2C_Start() prior to beginning any I2C write/read.  It must clear any I2C error that may have happened.

0 Likes