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

cross mob
ErNo_1148106
Level 4
Level 4
First solution authored 50 replies posted 25 replies posted

Hi All,

I have an application that requires bootloading code updates to four PSOC 4 devices chained onto the I2C bus that is controlled by another PSOC 4 which is the custom UART to I2C Master. What I would like to do is implement a secondary protocol to bootload all four devices with a custom program written in visual C#. I have used the UART bootloader with success but have not used the I2C bus to bootload devices and do not know where to really begin. I assume the interface is similar to the UART interface is this correct? Is there a datasheet showing how the I2C protocol is used like the START, STOP, DATA, ADDRESS etc? What I would really like to know is if there is C code to implement a UART to I2C bridge type of interface so I can use my existing UART bootloader program. I looked at the kitprog but that is USB to I2C. Any help would be GREATLY appreciated!!!!!!!

Thanks,

Eric Norton

0 Likes
1 Solution

Hi ErNo_1148106​,

Yes it is possible to launch the bootloader mode through I2C interface.

For this you can fix a command byte, say 0x01 as enter boodload mode command.  The i2c master has to send this command byte to the psoc device that needs to be updated with the new application using the slave address. When the slave with the matched address receive this command byte they will enter the bootload mode by calling Bootloadable_Load();

In master side,

if(bootloadRequired)

{

    I2CMasterWrite(slave_address,  0x01); // For illustration

}

In the slave side,

//Receive the byte from the master and enter the bootloader mode.

if(command_byte == 0x01)

{

    Bootloadable_Load();

}

On another note is it possible I can get the Bootloader host software so I can add buttons and a few other functions to it? I really like the layout of the bootloader host tool in the picture I posted above. Please let me know.

--> Yes, this can be developed. But unfortunately we may not be able to provide source code for the Cypress bootloader host app. This may have to be developed on your own.

Also, let me know if you face difficulties in understanding the no of expected receive bytes for a particular command byte sent.

Regards,

Bragadeesh

Regards,
Bragadeesh

View solution in original post

21 Replies