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.

CC2640: OAD do nothing (SDK v2.1.1)

Part Number: CC2640
Other Parts Discussed in Thread: CC2540EMK-USB

Hi,

First, some context :

Last year, I developed a custom board powered by CC2640 and some sensors for H.R measurements. At this time, the latest SDK was 2.1.1 so I used the HeartRate exemple and add a MAX30100 implementation. My firmware works great.

Now I need to implement the OAD feature to my firmware, so I read couple times the BLE OAD User guide in the SDK (2.1.1). I followed every step in off-chip OAD and I got two "bug" and after searching on the web and RTFM again and again, I'm feeling a little bit confused:

First bug :

I successfully installed python 2.7 and IntelHex script, I added commands lines under "step" tab and I can generate SUPER_IMAGE_FULL.hex (BIM+App+Stack) - ref 8.3 in the user guide.

But when I'm try to program my board with Flash Programmer 2 (1.6.2) I got an error during verification(error page 4).

With BLE device monitor (2.3.0), the CC2540EMK-USB programed with "Host" prog, scan nothing.

Second bug:

To avoid to be block, I tried a new methodology. With CCS, I program my board 3 times : BIM in first, after the stack and the app to finish.

On BLE device monitor, I successfully find my custom board and I can connect to them.

I can see the OAD services :

0x48 72 0x2800 GATT Primary Service Declaration F000FFC0-0451-4000-B000-000000000000 R OAD Service
0x49 73 0x2803 GATT Characteristic Declaration 1C:4A:00:00:00:00:00:00:00:00:B0:00:40:51:04:C1:FF:00:F0 R OAD Image Identify
0x4A 74 0xFFC1 OAD Image Identify WN Write '0' to identify image type 'A', '1' to identify 'B'. Data in notfication 8 bytes: image type (2), size/4 (2), user data (4).
0x4B 75 0x2902 Client Characteristic Configuration RW Write "01:00" to enable notifications, "00:00" to disable
0x4C 76 0x2901 Characteristic User Description R
0x4D 77 0x2803 GATT Characteristic Declaration 1C:4E:00:00:00:00:00:00:00:00:B0:00:40:51:04:C2:FF:00:F0 R OAD Image Block
0x4E 78 0xFFC2 OAD Image Block WN Image block (18 bytes). Block no. (2 bytes), OAD image block (16 bytes)
0x4F 79 0x2902 Client Characteristic Configuration RW Write "01:00" to enable notifications, "00:00" to disable
0x50 80 0x2901 Characteristic User Description R
0x51 81 0x2803 GATT Characteristic Declaration 0C:52:00:00:00:00:00:00:00:00:B0:00:40:51:04:C3:FF:00:F0 R OAD Image Count
0x52 82 0xFFC3 OAD Image Count W Number of images expected to be downloaded (1 byte)
0x53 83 0x2901 Characteristic User Description R

When I try to program, I choose the OADApp.hex, configure 1 Blk/conn, click on Start....and nothing :

12:30:40.838 > OAD started

12:30:40.854 > WriteRsp[FFC1]: st=0 n=0

wait 5 minutes, and still nothing.

I really don't have an idea on what's going on. Someone have a clue ?

regards

mRabla

  • Hi,

    If you use Flash Programmer 2 to flash each of the 3 images to the target device individually do you still encounter the error?

    What connection interval and supervision timeout values are you using in BLE Device Monitor?

    -Nathan
  • Hi Nathan,

    I tried Flash Programmer 2 in multiple mode :
    Same error :"Verification failed at address 0x000049A4 (in page 4). Expected 0x80, read 0x00."

    Individually :
    BIM : OK
    Stack : error : "Verification failed at address 0x000119A4 (in page 17). Expected 0xA0, read 0x00. »
    App : error : "Verification failed at address 0x000049B4 (in page 4). Expected 0x51, read 0x00."
    I don't understand why I got error with Flash Programmer but none with CCS.

    The BLE device monitor's configuration is :
    Min connection interval : 6
    Max connection interval : 6
    Slave latency : 0
    Supervision Timeout : 50

    and 1 Blk/conn.

    mRabla
  • Hi,

    Please try performing a mass erase with Flash Programmer 2 before flashing the images. If it still doesn't work with the individual images, then you may not have correctly set up the project for OAD.

    For the issue with BLE device monitor, I would suggest that you use min and max connection intervals of 20 ms, though your issue probably has to do with your first problem.

    -Nathan