7 Replies Latest reply on Aug 11, 2019 6:41 PM by YaTr_3516311

    HCI Commands with RAM Download

    YaTr_3516311

      Hi,

       

      I want to dowalod FW via HCI command. I do the steps as "WICED HCI UART Control Protocol".

      Below is my test steps, I write the wrong data to ram on purpose. I think this steps should make device cannot run because I have downlaod new FW(though data is wrong) to RAM. But it still run normally with old FW. Below is my steps.

      1. 01 03 0C 00--------04 0E 04 01 03 0C 00

      2. 01 18 FC 06 00 00 00 C2 01 00-----04 0E 04 01 18 FC 00

      3. 01 2E FC 00----04 0E 04 01 2E FC 00

      4. 01 4C FC 07 38 7A 21 00 01 02 03----04 0E 04 01 03 0C 00(write wrong data to 0x00217A38 )

      5. 01 4E FC 04 FF FF FF FF---04 0E 04 01 4E FC 00

      Then device run normally with old FW. Why

        • 1. Re: HCI Commands with RAM Download
          SheetalJ_96

          Hi YaTr_3516311,

           

          What do you mean by writing wrong data? In step 4, you are supposed to give RAM location of your application code & configuration data in HCI command. Your device is not getting programmed with new application if you are providing wrong RAM location.

          • 2. Re: HCI Commands with RAM Download
            YaTr_3516311

            Hi,

             

            1. What do you mean by writing wrong data?

            [A] I want to wirte my application to RAM to test the RAM Download function. Because my application file is large, I test this command with manual and it needs much time to fish the "wirte my application to RAM" steps. Then I thought a way to test this function indirectly (I write a small size of data to RAM, these data are wrong, so if I write them successfully to RAM, then device will not run with wrong data. Then this result can prove that WRITE_RAM command is useful in this step)

            .2. Unforunately, I do the steps as above said. Device can still run normally. So I think step 4) is useless. I checked RAM address in my ibeacon project of spar_ram_procld. It is 0x00217A38

            • 3. Re: HCI Commands with RAM Download
              YaTr_3516311

              Hello,

              New update here.

               

              I change step 4's address and send 01 4C FC 07 00 00 00 FF 01 02 03 command. I find this address is the OK one(Device reboot then cannot run normally).I get this addresss 00 00 00 FF from iBeacon-CYBT_343026_EVAL-rom-ram-Wiced-release.hcd file. Is this my test correct?

              • 4. Re: HCI Commands with RAM Download
                SheetalJ_96

                The address in the app hcd file is the location where your application will start. So this new app data will be loaded in RAM using Write RAM command. Therefore, previous app/program will not run after successful Write RAM command.

                1 of 1 people found this helpful
                • 5. Re: HCI Commands with RAM Download
                  YaTr_3516311

                  So addresss 00 00 00 FF is the correct one for Downloading the Application to RAM?

                  • 6. Re: HCI Commands with RAM Download
                    SheetalJ_96

                    First can you tell me how are you reading the hcd file? Where the address is defined?

                    Also, try building some other project n see if you are still getting the same address. As per my understanding, it should change.

                    As I stated earlier, you have to write the starting RAM location of your application while using Write RAM command. This address might vary depending on the applications.

                    1 of 1 people found this helpful
                    • 7. Re: HCI Commands with RAM Download
                      YaTr_3516311

                      1. First can you tell me how are you reading the hcd file? Where the address is defined?

                      [A]: There is header in HCD file. Format is: 0-1: hcd command must either be 0x4cfc (write) or 0x4efc (launch) 2: length (including address location), number of bytes (must be at least 4) 3-6: Address location of where in RAM section should be put.(I get this information from my FAE)

                       

                      2. try building some other project n see if you are still getting the same address. As per my understanding, it should change.

                      [A]: I build other project such as hello sensor and others. The address is same which is 00 00 00 FF.

                       

                      3. As I stated earlier, you have to write the starting RAM location of your application while using Write RAM command. This address might vary depending on the applications.

                      [A]:Yes, I have tried your earlier suggestion(With spar_ram_proc.ld's address 0x00217A38), but there is problem as my above said(Still run normally although write the wrong data into the address). Please advise.