3 Replies Latest reply on Apr 22, 2020 7:21 PM by MaMi_1205306

    PSoC4L : Bootloader with multiple communications

    MaMi_1205306

      Hi,

       

      We use PSoC4L with USB and SPI components.

      And now We are considering implementing Bootloader.

       

      We read the application notes of SPIBootloader and USB HID Bootloader, and understand the operation of each.

       

      Therefore, we are considering the following specifications,

       

      For example,
      When PSoC4L is powered on while pressing switch A, SPI Bootloader starts.
      When PSoC4L is powered on while pressing switch B, USB HID Bootloader starts.

       

      We thought that we could do this by switching the communication components of the Bootloader component,

      but we don't know how to switch because that API does not exist.

       

      Is it possible to use a Bootloader that switches multiple communication peripherals in the first place?

      Do you have a reference project if possible?

       

      Regard,

        • 1. Re: PSoC4L : Bootloader with multiple communications
          NoriakiT_91

          I didn't tried this but I have an idea.

           

          You can use a custom interface for the bootloader.  So, it is able to create delegated function to access to multiple communication ports.

           

          The bootloader requires five functions as follows.

           

          • CyBtldrCommStart
          • CyBtldrCommStop
          • CyBtldrCommReset
          • CyBtldrCommWrite
          • CyBtldrCommRead

           

          For example, CyBtldrCommStart(void) function can be written as follows.

           

          uint32      interface = 0;
          
          
          void CyBtldrCommStart(void) {
              switch (interface) {
                  case 0:
                      SPI_1_CyBtldrCommStart();
                      break;
                  case 1:
                      USBFS_1_CyBtldrCommStart();
                      break;
                  default:
                      break;
              }
          }
          

           

          Please note that the variable interface indicates a communication port to be used.

           

          Please refer the document "PSoC® Creator™ Component Author Guide" (Document # 001-42697) at the "10. Adding Bootloader Support (Advanced)" section.

           

          Regards,

          Noriaki

          • 2. Re: PSoC4L : Bootloader with multiple communications
            MaMi_1205306

            Noriaki-san,

             

            Sorry for my late response.

            We will try your suggestion.

             

            Thanks,

            • 3. Re: PSoC4L : Bootloader with multiple communications
              MaMi_1205306

              We are considering the content you have proposed.

              And we create a project to realize the operation.
              If you have any problems creating a project, please provice us your advice again.


              Thanks,