4 Replies Latest reply on Apr 1, 2020 7:33 AM by KoSh_4652521

    CYW920719Q40EVB-01 programming

    KoSh_4652521

      Hello,

      I'm trying to program CYW920719Q40EVB-01 serial flash using the UART interface from my custom software. I'm using "WICED-HCI-Control-Protocol.pdf" documentation.

      Also i have download log generated by using the download feature of the Wiced Studio 6.0 - ChipLoad.

       

      I send the following sequence of commands (as described in documentation and which i see in Chipload mode) in recovery mode (recovery hold + push reset + release recovery) :

      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 0x00220000: 01 4E FC 04 00 02 22 00

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

       

      5) CHIP_ERASE:  01 CE FF 04 EF EE BE FC       (as in document)

       

      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 0xFFFFFFFF: 01 4E FC 04 FF FF FF FF (as in document)

       

      When i try to download my wiced_app.hex WITH minidriver parsing i get an error on 6) step. I receive a wrong response from the board to first WRITE_RAM command:

           Sending HCI Command:

           0000 < 01 4C FC 46 00 00 50 00 42 52 43 4D 63 66 67 53 >

           0010 < 00 00 00 00 32 00 00 00 01 01 04 C0 5D 00 00 00 >

           0020 < 03 06 41 3E 19 9B 71 20 00 01 1C 00 40 50 00 00 >

           0030 < 20 58 00 00 20 50 00 00 30 50 00 00 10 00 00 00 >

           0040 < 00 00 00 00 00 00 00 FE 00 00 >

           Received HCI Event:

           0000 < 04 0E 04 01 CE FF 00 >

           Failed to send hex portion at 0x00500000

       

      Without minidriver parsing and CHIP_ERASE the application parsing passed but i get an error on 7) step. I receive a wrong response from the board to LAUNCH_RAM command:

           Sending HCI Command:

           0000 < 01 4E FC 04 FF FF FF FF >

           Received HCI Event:

           0000 < 04 0E 04 01 4E FC 12 >

           Failed to send launch RAM

                  

      Also sometimes the board doesn't send any response in recovery mode for WRITE_RAM command.

       

      Could you give me some advice that I could try to do with my Bluetooth board?

        • 1. Re: CYW920719Q40EVB-01 programming
          AnjanaM_61

          Hi KoSh_4652521 ,

           

          Please note downloading the minidriver and chip erase command is mandatory for 20719. So please don't skip those steps.

          Can you please confirm what is the host from which you are sending the HCI commands?

          Did you get correct responses for minidriver write ram commands and chip erase command? Please provide the complete logs if possible.

           

          Please note WICED 6.4 is the latest SDK version. So preferably use the minidriver files and app files from latest SDK.

           

          Regards,
          Anjana

          • 2. Re: CYW920719Q40EVB-01 programming
            KoSh_4652521

            Hi,

            Thank you for your answer.

             

            >>>>Can you please confirm what is the host from which you are sending the HCI commands?

            Can you please explain what do you mean by "host"? I'm using my own program which based on WMBT.cpp, just open COM7 (WICED HCI UART) and send HCI commands after that.

             

            >>>>Did you get correct responses for minidriver write ram commands and chip erase command?

            Responses for minidriver write ram commands and chip erase command are correct. I haven't any errors on this steps.

             

            >>>>Please note WICED 6.4 is the latest SDK version. So preferably use the minidriver files and app files from latest SDK.

            I'm using the latest SDK WICED 6.4.

             

            Logs are attached.

            my-program_log - logs from my program with write_ram error during writing application.hex.

            logto - logs from Chipload

            also application and minidriver hex files are attached.

             

            All actions are carried out in the recovery mode.

            • 3. Re: CYW920719Q40EVB-01 programming
              DheerajP_41

              Hi,

              Your host is your PC running you custom download software.

               

              I have gone through the logs (my_program_log.txt.zip). The process is breaking at chip erase step.

              I would suggest you to wait few seconds after issuing chip erase HCI command. Once the chip erase command is issued, the host will need to wait for several seconds until the memory is erased. During this wait time, the device will keep sending periodic (about once a second) progress report messages made up of bytes FF 01 CE. This message is an indication that the erase process is progressing. Once the erase is completed successfully, the device will send bytes

              0E 04 01 CE FF 00.

               

              Thanks,

              -Dheeraj

              2 of 2 people found this helpful
              • 4. Re: CYW920719Q40EVB-01 programming
                KoSh_4652521

                Hi,

                Thank you so much for your answer!!!

                 

                I was really helpful for me and now i can upgrade my Bluetooth chip!
                I added a delay about 1 second between chip erase request and chip erase response.

                 

                Thank you! @DheerajP_41

                1 of 1 people found this helpful