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: custom OAD downloader can't start

Part Number: CC2640R2F


HI,

I've implemented the custom OAD downloader to my TI-CC2640R2 launcher board running demo OAD Persists App.  I have completed all the image block transfer and enable the new application, but after resetting the board, it is still running the Persists App instead of the simple peripheral app.

According to the documentation below, sending "Start OAD process cmd" to image control characteristic by 0x03 will get notification of 6 bytes data such as "12:00:00:00:00:00". However, I am only getting "03:05" back. 

dev.ti.com/.../oad_profile.html

Updated:  after reading the oad source code on the OAD target end, START_OAD requires the state = OAD_CONFIG which should be set after the image ID is done. but it is not the case for me. 

I have the image ID done with status return 0. what else am I missing?

case OAD_EXT_CTRL_START_OAD:
        {
            if(state == OAD_CONFIG)
            {
                // Reset OAD variables
                oadBlkNum = 0;

                // Send the first block request to kick off the OAD
                oadGetNextBlockReq(connHandle, oadBlkNum, OAD_SUCCESS);

                // This is an exception case where a RSP is not sent
                return (OAD_SUCCESS);
            }
            else
            {
                // Cannot start an OAD before image ID
                pRspPldlen = sizeof(genericExtCtrlRsp_t);
                pCmdRsp = ICall_malloc(pRspPldlen);
                genericExtCtrlRsp_t *rsp = (genericExtCtrlRsp_t *)pCmdRsp;
                rsp->cmdID = OAD_EXT_CTRL_START_OAD;
                rsp->status = OAD_NOT_STARTED;
            }
            break;
        }

  • Hello Yan,

    All of the OAD code is provided in full source so you should be able to use the debugger to follow the code execution. Can you, with the aid of the debugger, identify the sate when OAD_EXT_CTRL_START_OAD is entered?

    Best wishes