6 Replies Latest reply on Jun 11, 2018 2:59 AM by sujayy_46 Branched from an earlier discussion.

    Programming SPI Flash in CB-343026-01 Module (con't)

    LuGi_2890336

      As a follow on to this thread: Programming SPI Flash in CB-343026-01 Module

       

      I need to program the CYBT343026 flash via UART but I'm not sure I have understood right.

       

      Reading WICED HCI UART Control Protocol I have understood that if there isn't the flash connected (it's not the case for CYBT 343026) or if the application inside flash is not valid, the module boot in Bluetooth HCI mode, otherwise execute the application.

      In Bluetooth HCI mode or in Application mode (if this one implement the HCI coomands) it's possible to update firmware. If I hold RECOVERY button during the reset, the flash will erase and then the module enter in Bluetooth HCI mode.

      That's all right?

       

      1) If I want to update the firmware in Application mode (via UART) how can I perform this? It's not neccesary to create a Boot partition in the flash?

       

      2) What are the HCI commands for update firmware? In WICED HCI UART Control Protocol is not clear what are and if are the same for Bluetooth HCI mode and for Application mode (if this one implement the HCI coomands).

       

      3) what is it for minidriver?

       

       

      Regards

        • 1. Re: Programming SPI Flash in CB-343026-01 Module (con't)

          Please see my updated reply to the original post on how we are currently programming the CYBT-343026-01 module

          1 of 1 people found this helpful
          • 2. Re: Programming SPI Flash in CB-343026-01 Module (con't)
            MichaelF_56

            Re-posted to the new thread:

             

            The sequence we described in the previous reply works on the Cypress CYW920706WCDEVAL Evaluation Kit but not with the CYBT-343026-EVAL evaluation board.  For the CYW920706WCDEVAL eval board we did not have to download the Mini-Driver but for the CYBT-343026-01 module we found we had to download the Mini-Driver.  The Mini-Driver file for the CYBT-343026-01 module can be found in the Wiced Studio folder "Wiced-Studio-6.1\20706-A2_Bluetooth\platforms\CYBT_343026_EVAL\uart.hex" after you install the CYBT-343026-01 platform files.

             

            We are currently using the following steps to program the CYBT-343026-01.  These steps are described in the document "WICED-HCI-Control-Protocol.pdf" section 2.5. 

             

            1) HCI_RESET: 01 03 0C 00

             

            2) DOWNLOAD_MINIDRIVER: 01 2E FC 00

             

            3) Parse uart.hex and send WRITE_RAM: 01 4C FC nn xx xx xx xx yy yy yy yy ....

             

            4) LAUNCH_RAM to Address 0x000D0200: 01 4E FC 04 00 02 0D 00

            where 0x000D0200 is the first download address in the uart.hex file

             

            5) CHIP_ERASE: 01 CE FF 04 00 00 00 FF

             

            6) Parse wiced_app.hex file and send WRITE_RAM: 01 4C FC nn xx xx xx xx yy yy yy yy ....

             

            7) LAUNCH_RAM to Address 0x00000000: 01 4E FC 04 00 00 00 00

            1 of 1 people found this helpful
            • 3. Re: Programming SPI Flash in CB-343026-01 Module (con't)
              LuGi_2890336

              Thanks for reply, I'll try.

               

              I have others questions:

               

              1. WRITE_RAM command write data in RAM or in FLASH?
              2. About commands and steps you have wrote, the opcodes don't match with those in chapter 4 in WICED-HCI-Control-Protocol.pdf.

               

              For example "HCI_RESET: 01 03 0C 00" and according with chapter 3, is composed by:

                • Packet Type = 0x01
                • Command/Event Code = 0x03
                • Group Code = 0x0C
                • Packet Lenght = 0x00

               

              In according with chapters 3 and 4, should be composed by:

                • Packet Type = 0x19
                • Command/Event Code = 0x01
                • Group Code = 0x00
                • Packet Lenght = 0x0000 (16 bits and not 8 bits)

               

              Is it correct my observation?

              I have checked also with Bluetooth HCI spcification but I didn't found any matches.

               

              Regards

              • 4. Re: Programming SPI Flash in CB-343026-01 Module (con't)

                "WRITE_RAM" is the command name and this command is used for both downloading the UART mini-driver and the application code.

                 

                The commands to program the flash are not WICED HCI commands with packet type = 0x19 but are boot loader commands.  After your application code is up and running, your application code processes the WICED HCI commands.

                1 of 1 people found this helpful
                • 5. Re: Programming SPI Flash in CB-343026-01 Module (con't)
                  LuGi_2890336

                  Ok thank you!

                  Are there some documents about  bootloader commands? In Cypress site I was not able to find documents for this topic.

                   

                  Regards

                  • 6. Re: Programming SPI Flash in CB-343026-01 Module (con't)

                    What you are calling as bootloader commands are actually 'Vendor Specific HCI commands'. They are different from WICED HCI commands. These are actually internal commands and only some of them needs to be used by developers. There is no document regarding this.

                    2 of 2 people found this helpful