Destrory I2C

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

cross mob
StephanB
Level 1
Level 1
First reply posted First question asked Welcome!

We have an application and a bootloader. In both, the I2C is active. In the application as a master and in the bootloader as a slave. We sporadically find that the I2C unit is defective during bootloading. In most cases, SDA or SCL always remains low. The pin can no longer be controlled. Reprogramming doesn't help. When exiting the application and the bootloader, I2C_Stop() is never called. Can this cause the destruction of the PSoC 4?

0 Likes
4 Replies
ncbs
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 sign-ins

Hi @StephanB ,

As per my understanding, you are using I2C for bootloading operation. Is this correct?

Have you tried checking your kit/board with CE221653 - PSoC 4 Bootloader and Bootloadable? The bootloader in this code example uses I2C to update the firmware. I am also attaching an AppNote on bootloader here: AN86526 - PSoC 4 I2C Bootloader.

Can you let me know which device/kit being used?

Regards,
Nikhil

0 Likes
Sidramesh_S
Moderator
Moderator
Moderator
250 sign-ins 100 replies posted 25 solutions authored

Hi @StephanB ,

Can you please attach your project?

I want to look into your application project and try to figure out the issue.

Thanks and regards,
Sidramesh

0 Likes
Hello Sidramesh

Unfortunately it is not built on a kit/board. It is a product that is sold.
In production or during service, the products are updated to the latest firmware. Then settings for this version are updated in the Eeprom.
These updates are made using a tool that contains a CY8C4025LQI-S402 with bootloader host and eeprom programming and is connected to a PC/laptop.
On both sides of the I2C we have ESD discharge diodes and a ferrite. At this point, there are usually three participants on the I2C bus. Only the one that is normally the master and is switched to slave mode for the firmware update is defective.
Analyzing code written by a supplier, we found that this code switches between master and slave without calling an I2C_Stop(). This both when entering the bootloader and when exiting.
That's why I asked the question in the chat whether this could lead to the destruction of the I2C unit.
I have attached the code in the attachment.

Best Regards,
Freundliche Grüsse
Stephan Bärtschi
Projektleiter Elektronik Entwicklung
Tel. +41 56 438 11 83<0041564381183>
stephan.baertschi@wesco.ch
0 Likes
Sidramesh_S
Moderator
Moderator
Moderator
250 sign-ins 100 replies posted 25 solutions authored

hi @StephanB ,

Sorry for the Delayed response.
I am not seeing any attachment in your last response.

Could you please elaborate on the following things:-
1)What are the 3 participants?

2) You mentioned that the one that is normally the master and is switched to slave mode for the firmware update is defective.
is it PSoC 4?

If it is PSoC 4 then please let us know whether you are using the same SCB block for both Master and Slave.
Using different SCB Blocks for Master and Slave might solve your problem.

Thanks and regards,
Sidramesh

0 Likes