update master and slave devices on the field

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

cross mob
ThBi_3905606
Level 2
Level 2
10 replies posted 10 questions asked 10 sign-ins

In my application, I have 1 psoc 4200L and 3 SPI slaves (PSOC 4100 S plus)

I want be able to update all the devices on the field.

So far I was thinking use this :

Master 4200L has USB bootloader

     I can update code using USB pc Host

First, I load application 1 : "Slaves update"

then I load application 2 : normal app.

the "slaves update" Master application doing this :

it have SPI interface

and a reset line connect to all three slave device. (to save space in the board)

the pseudo code will be something like this:

          reset all device

          launch bootloading operation to slave 1

          reset all device

          launch bootloading operation to slave 2

          reset all device

           launch bootloading operation to slave 3

after the "slave update process", user will have to launch application 2 in the master.

If I have enough space in my flash, I could have a two bootloadables into my master, the first one will be "slaves update" and the second one "noraml app"

Am I correct, ? do I miss something ?

0 Likes
7 Replies
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi,

1. If you have enough flash or if you want to keep the "Slaves update" code ready in your application, you can go for Dual Application in the PSoC 4L device. Else, you can go with Single application bootloader-bootloadable project in PSoC 4L device and bootload the projects "Slaves update" and "Normal App" whenever required.

2. Are you storing the .cyacd files for updating the Slaves (PSOC 4100 S plus) in the "Slaves update" application?

Or, are you getting the .cyacd file for the slaves in runtime from some other host and then trying to bootload? In this case you have to be strict with the timing. In this method, the "Slaves update" application can simply act as a bridge between USB and the SPI.

Thanks

Ganesh

0 Likes

Hello,

thank you for reply ,

I was thinking store the .cyacd files in the "slaves update" application.

but I am not shure to know the best way to call each slave device during the update process.

by the way Do you know an application note about the other way ?

Finally, to avoid hardware reset line in the board between master and slaves,  I was thinking using a special SPI commnad to force app in slave call the bootloader.

Or maybe a special SPI command to start a software reset. and let de slave call his bootloader after the reset.

But it's not clear for me what happen after a software reset, I read in some community messages that there is no time out a software reset, aka, the bootloader wait for ever for the Host command, Am I correct ?

0 Likes

Hello,

There is no application note but the following Forum post might help you. This project act as a bridge between the Bootloader host application with I2C communication and the Bootloader project with CAN communication.

CAN Bootloader , Bootloadable Project

"Finally, to avoid hardware reset line in the board between master and slaves,  I was thinking using a special SPI commnad to force app in slave call the bootloader.

Or maybe a special SPI command to start a software reset. and let de slave call his bootloader after the reset."

Bootloadable_Load() is the command that should be called in the Bootloadable project to reach the Bootloader project and wait for the new Bootloadable application. Please refer Bootloader/Bootloadable component datasheet for more information about this API.

So you can send each slave a byte of data using which you can call the Bootloadable_Load() API from the PSoC 4100S Slaves.

But it's not clear for me what happen after a software reset, I read in some community messages that there is no time out a software reset, aka, the bootloader wait for ever for the Host command, Am I correct ?

No. The bootloader wait for ever for the Host command only when Bootloadable_Load() is called in the Bootloadable application.

Thanks

Ganesh

0 Likes
lock attach
Attachments are accessible only for community members.

Hello

I made a bootloader host with a PSOC 4200L

I have a slave device, 4100 S plus

I try to boodload the 4100Splus with a new code,

I use SCB SPI component, so I update a litlle bit the code find in Psoc 3 Psoc 5 SPI bootloader application witch use a SPI component.

But I can not send the bootloadable file...

the file got only 256 bytes in each row, I don't know if we mind.

0 Likes

Hi ThBi_3905606​,

Did you check the latest comments in the thread Psoc 4100 s plus and SPI slave component 2.70 ? In the project attached(in the other thread) , I have used SCB SPI component for the SPI master and I was able to successfully bootload as per your requirement. Let us know if that works for you.

Regards,

Bragadeesh

Regards,
Bragadeesh
0 Likes

Hi Bragadeesh,

thanks for your reply,

I was busy trying interfacing a sd card...(quite waste of time, i choose a fhash external IC instead) I  test your project today

thomas

0 Likes

Hi Thomas,

I am curious to know whether the problem is solved or not. ?

Thanks and regards

Ganesh

0 Likes