6 Replies Latest reply on Sep 21, 2020 6:08 AM by ThBi_3905606

    update master and slave devices on the field

    ThBi_3905606

      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 ?

        • 1. Re: update master and slave devices on the field
          GaneshD_41

          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

          • 2. Re: update master and slave devices on the field
            ThBi_3905606

            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 ?

            • 3. Re: update master and slave devices on the field
              GaneshD_41

              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

              • 4. Re: update master and slave devices on the field
                ThBi_3905606

                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.

                • 5. Re: update master and slave devices on the field
                  BragadeeshV_41

                  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

                  • 6. Re: update master and slave devices on the field
                    ThBi_3905606

                    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