2 Replies Latest reply on Jun 7, 2018 10:12 AM by brbac_1258976 Branched to a new discussion.

    Programming SPI Flash in CB-343026-01 Module

      We have the CYBT-343026-EVAL evaluation board and I am trying to program the SPI flash internal to the module using the UART interface from my custom software.  The document "WICED-HCI-Control-Protocol.pdf" in section 2.5 has some information about how to download into the serial flash but does not have details about the minidriver.  When I look at the download log generated by using the download feature of the Wiced Studio 6.0,  ChipLoad first downloads a UART minidriver and then sends a WICED flash erase command before downloading the application *.HEX file.

       

      Do I need to follow the method of ChipLoad to download the UART minidriver and erase the SPI flash before downloading a *.HEX file?

       

      The source code for client_control is available but this example only downloads a direct *.HCD image.  Is the source code available from ChipLoad showing how to load a *.HEX file to SPI flash?

        • 1. Re: Programming SPI Flash in CB-343026-01 Module

          We were able to successfully program a *.HEX file the SPI flash over the UART interface without loading the UART minidriver using the follow commands:

           

          1) HCI_RESET: 01 03 0C 00

           

          2) DOWNLOAD_MINIDRIVER: 01 2E FC 00

           

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

           

          4) Parse *.HEX file and send WRITE_RAM: 01 4C FC nn xx xx xx xx yy yy yy yy ....

           

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

          • 2. Re: Programming SPI Flash in CB-343026-01 Module

            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. 

             

             

            Setup the CYBT-343026-01 module in code download mode

             

            1) Host computer sets UART_CTS inactive (high) and sets baud rate = 115200

             

            2) Host computer drives signal SPI2_MOSI driven low (we added a FET in parallel with SW2 to drive this signal low)

             

            3) Pulse XRES low then high

             

            4) Disable the FET signal driving SPI2_MOSI  low

             

             

            The host computer then sends the following command:

             

            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