This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2640R2F: Out of box OAD on chip demo. Bluetooth oad only works the first time.

Part Number: CC2640R2F

Hello,

I am trying to get the out of the box on chip oad working for the cc2640r2f. I plan on integrating the oad feature into my custom project based off of project_zero. I have two cc2640r2f Launch Pads, one with the host_test program flashed on it, the other has the oad firmware. I can establish a connection using BTool, and I can successfully update my oad firmware on my 2nd launchpad. However, I cannot perform a second OAD session, it gets stuck on "Waiting for Device Reset". It then follows with the error "GAP_EstablishLinkRequest Failed There are no resources available." The new application version I made changed the advertising name (I switch one character) and rebuild the project in CCS. To me, it seems like the oad device is not entering the persistant application on reset, but I could be wrong.

Below are the detailed steps I took to program both devices.

1. Flashed host_test hex file to my first launchpad using smartRF Flash Program 2. I then disconnected the launchpad as to not write over the program by accident.

2. I then imported the simple_peripheral_oad_onchip project into CCS. 

3. I built the projects in the following order: BIM, Persistent, Stack, and then the App.

4. I then opened the BIM, Persistent, and Stack hex files in smartRF Flash Program 2. I connected my second launchpad, and then flashed all 3 hex files at once.

5. Opened up the merge.bin file in the FLASHROM folder of the application project. Changed the address to 0x00000000, and then flashed that using the smartRF Flash Program 2.

6. Opened up BLE scanner on my android phone and saw the device advertising.

7. Connected my launchpad with the host_test application. Opened Btool and connected.

8. Scanned and connected to my 2nd launchpad (with oad). Knew the slave BDA from BLE scanner on my phone.

9. Went to the OAD tab, read the image *.bin (not the merge.bin).

10. Clicked send, and the firmware on the 2nd launchpad was successfully updated.

11. I went back to CCS, and changed the advertising name to something different.

12. Built only the application project.

13. Went back to Btool, was able to connect to the device. Went to program new *.bin file, and the dialog box says " Waiting for Device Reset"

From here the Bluetooth connection drops, I cannot see the device advertising on the BLE Scanner application until I hit the physical reset button on the launchpad. When I go back to smartRF Flash Program, I can program the original merge.bin file onto the 2nd launchpad. From there, I can successfully perform an oad update. However, it only works once, and then I get the timeout issue again.

Any help would be greatly appreciated!

Thanks,

Tyler

  • When I connect using BLE scanner on my phone to the target device when the application is running (not the persistent app) I cannot reset the device by writing to FFD0 which is the OAD reset service. Is the example setup to reset when writing to FFD1?
  • When I view the diagnostics using the uart, I get the following message.

    Num Conns: 1
    0x546C0EA04C6D

    Reset Cmd Sign/Verify Failed
  • Found my issue. The problem was caused by using the incorrect host_test application, BTool version, and Target OAD project.

    Originally I used the host_test application from the blestack folder in simplelink_cc2640r2_sdk_2_20_00_49 and used the BTool version of v1.41.21 that was supplied in simplelink_cc2640r2_sdk_1_50_00_58. The Target OAD project was in the blestack folder of simplelink_cc2640r2_sdk_2_20_00_49.

    When you use the host_test application for BLE and not BLE5, Btool in simplelink_cc2640r2_sdk_2_20_00_49 gives you gapinit errors, so I used the previous sdk version and it could connect.

    It is a bit confusing when your oad examples are under the blestack folder and not in ble5.
  • Hi Tyler,

    Can you re-try with the host_test image from blestack in simplelink_cc2640r2_sdk_2_20_00_49, and open BTool by opening C:\ti\simplelink_cc2640r2_sdk_2_20_00_49\tools\blestack\btool\Run_BTool.bat