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: Flashing error and other error message on CC2640R2

Part Number: CC2640R2F
Other Parts Discussed in Thread: SYSBIOS

Hi  Sir / Madam,

I am using simplelink_cc2640r2_sdk_1_00_00_22 and CC2640R2F development board with simple peripheral project as my base.

When I flash in and debug my code,  I encounter this error message.  After click skip, twoce for  chipinfo.c and chipinfo.h, I can get to the main as start point.

In my C drive , I do not have folder called  Jenkins.

May I know what has cause this error and how to solve it ?

//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

In another problem, the same code, sometimes I have this error when flash in and debug my code, although I still can goto main as start point, after click OK:

May I know what has happen and how can I solve this ?

//----------------------------------------------------------------------------------------------------------------------------------------------------------------------

With refer to the first problem, I am trying to find chipinfo.c and   .h, but unable to find it in simplelink_cc2640r2_sdk_1_00_00_22. 

But, if not recollect wrongly, I manage to find it in tirtos_cc13xx_cc26xx_2_20_01_08.

Am I correct on this ?  may I knwo what is the purpose and chipinfo file ?

Please help.

Cheers,

KF

  

  • Can't see your attached images. Can you attach it again?
  • Hi YK Chen,

    Thank you for your reply.
    One of the message is :

    could not find the following source file:
    C:\Jenkins\jobs\FWGroup-DriverLib\workspace\modules\output\cc26xx_ch2_1_0_ext\driverlib\chipinfo.c


    could not find the following source file:
    C:\Jenkins\jobs\FWGroup-DriverLib\workspace\modules\output\cc26xx_ch2_1_0_ext\driverlib\chipinfo.h


    My project is based on simpleperipheral project.
    This also happens when I move my function to the following function:
    void FoboBridgeBLEPeripheral_createTask(void) ----------------------------> this is inside simple_peripheral.c
    {
    Task_Params taskParams;

    // Configure task
    Task_Params_init(&taskParams);
    taskParams.stack = sbpTaskStack;
    taskParams.stackSize = SBP_TASK_STACK_SIZE;
    taskParams.priority = SBP_TASK_PRIORITY;

    /* [kf] debug */
    //GapProfileApp__Init(); -----------------> This is the added function. when it is here, I press start, the error message will pop up

    Task_construct(&sbpTask, fbBriBLEPeripheral_taskFxn, &taskParams, NULL);
    }


    -------> this is inside GapProfileApp.c, located at: fbBri_kfchoong\FOBO_Bridge\src\app
    void GapProfileApp__Init(void)
    {
    /* Setup the GAP */
    GAP_SetParamValue(TGAP_CONN_PAUSE_PERIPHERAL, DEFAULT_CONN_PAUSE_PERIPHERAL);
    return;
    }


    File structure is :
    D:\Project\fbBri\fbBri_kfchoong\fbBri
    D:\Project\fbBri\fbBri_kfchoong\simplelink_cc2640r2_sdk_1_00_00_22
    D:\Project\fbBri\fbBri_kfchoong\xdctools_3_32_01_22_core


    Please help.

    Thank you very much.

    Cheers,
    KF
  • Do you use CCS? If so, which CCS version do you use?
  • Hello KF,
    Could you try to Load TI-RTOS in ROM Symbols as is explained here:
    software-dl.ti.com/.../index.html
    "Loading TI-RTOS in ROM Symbols"
  • Hi Eirik,


    I cannot find "Loading TI-RTOS in ROM Symbols" in the page :
    software-dl.ti.com/.../index.html

    Would you please advice more detail ?

    Thank you very much.

    Cheers,
    KF
  • Hi YK Chen,

    Thank you for your reply.

    I am using IAR version 7.80, full version.

    Please advice.
    Thank you very much.

    Cheers,
    KF
  • Hi Eirik,

    Many thanks for your reply.
    I get it now, in the developer guide --------------- >>>> 9.7.4 Loading RTOS in ROM Symbols

    Thank you very much.

    Cheers,
    KF
  • You find it in the debugging chapter.
  • I just build the example with my IAR 7.80 and there's no similar issue. Try to reinstall the SDK and test again.
  • Hi Eirik,

    Thank you very much for your help.
    May I know where can I find the rom image, which I need to downloaded, inside
    simplelink_cc2640r2_sdk_1_00_00_22 ?

    According to the document:
    I need to copy from where in the new sdk --- simplelink_cc2640r2_sdk_1_00_00_22 ? ( the old sdk is C:\TI\tirtos_cc13xx_cc26xx_2_18_00_03\products\bios_6_45_02_31\packages\ti\sysbios\rom\cortexm\
    cc26xx\golden\CC26xx\rtos_rom_syms.xem3)

    to fbBridge_kfchoong\fb_Bri\tirtos\iar\stack\FlashROM\Exe . Am I correct ?



    Thank you very much.

    Cheers,
    KF
  • Hi YK Chen,

    Many thanks for your reply.
    I have try it with the recommended location and this problem does not occur.

    I will troubleshoot from this point as now I have one with problem and another without problem.
    May I have your advice on this ?


    Thank you very much.

    Cheers,
    KF
  • I couldn't understand your question. Can you elaborate?
  • Hi F Chng,

    GAP_SetParamValue(TGAP_CONN_PAUSE_PERIPHERAL, DEFAULT_CONN_PAUSE_PERIPHERAL);

    is already called within SimpleBLEPeripheral_init(). There is no good to putting it in a C function GapProfileApp__Init() and then called within XXXXXXBLEPeripheral_createTask().

    - kel

  • Hi YK Chen,

    Many thanks for your reply.

    I build Bridge project based on simple_peripheral provided by TI.

    Initially, Bridge is located at the same folder as simple_peripheral. It is working fine when it is inside the following path:
    D:\ti\simplelink_cc2640r2_sdk_1_00_00_22\examples\rtos\CC2640R2_LAUNCHXL\blestack\Bridge

    Due to my project requirement, I have to relocate Bridge to outside simplelink_cc2640r2_sdk_1_00_00_22 folder.
    which is like the following:
    D:\Project\Bridge\Bridge_kfchoong\Bridge
    D:\Project\Bridge\Bridge_kfchoong\simplelink_cc2640r2_sdk_1_00_00_22
    D:\Project\Bridge\Bridge_kfchoong\xdctools_3_32_01_22_core

    In this new location, all the settings sand path is redefined for this new environment. And, I Rebuild All, it successful.
    It also can execute successfully before it is modify.

    However, due to project requirement, I need to do some modification. My first modification is to create the following function :

    void GapProfileApp__Init(void)
    {
    /* Setup the GAP */
    GAP_SetParamValue(TGAP_CONN_PAUSE_PERIPHERAL, DEFAULT_CONN_PAUSE_PERIPHERAL);
    return;
    }

    This function to be replacing a statement inside void BridgeBLEPeripheral_init(void), which is previously named void simpleBLEPeripheral_init(void). It will replace a statement named :
    // Setup the GAP
    GAP_SetParamValue(TGAP_CONN_PAUSE_PERIPHERAL, DEFAULT_CONN_PAUSE_PERIPHERAL);


    So, from the following code :

    void BridgeBLEPeripheral_init(void)
    {
    // ******************************************************************
    // N0 STACK API CALLS CAN OCCUR BEFORE THIS CALL TO ICall_registerApp
    // ******************************************************************
    // Register the current thread as an ICall dispatcher application
    // so that the application can send and receive messages.
    ICall_registerApp(&selfEntity, &syncEvent);

    #ifdef USE_RCOSC
    RCOSC_enableCalibration();
    #endif // USE_RCOSC

    #if defined( USE_FPGA )
    // configure RF Core SMI Data Link
    IOCPortConfigureSet(IOID_12, IOC_PORT_RFC_GPO0, IOC_STD_OUTPUT);
    IOCPortConfigureSet(IOID_11, IOC_PORT_RFC_GPI0, IOC_STD_INPUT);

    // configure RF Core SMI Command Link
    IOCPortConfigureSet(IOID_10, IOC_IOCFG0_PORT_ID_RFC_SMI_CL_OUT, IOC_STD_OUTPUT);
    IOCPortConfigureSet(IOID_9, IOC_IOCFG0_PORT_ID_RFC_SMI_CL_IN, IOC_STD_INPUT);

    // configure RF Core tracer IO
    IOCPortConfigureSet(IOID_8, IOC_PORT_RFC_TRC, IOC_STD_OUTPUT);
    #else // !USE_FPGA
    #if defined( DEBUG_SW_TRACE )
    // configure RF Core tracer IO
    IOCPortConfigureSet(IOID_8, IOC_PORT_RFC_TRC, IOC_STD_OUTPUT | IOC_CURRENT_4MA | IOC_SLEW_ENABLE);
    #endif // DEBUG_SW_TRACE
    #endif // USE_FPGA

    // Create an RTOS queue for message from profile to be sent to app.
    appMsgQueue = Util_constructQueue(&appMsg);

    // Create one-shot clocks for internal periodic events.
    Util_constructClock(&periodicClock, FoboBridgeBLEPeripheral_clockHandler, SBP_PERIODIC_EVT_PERIOD, 0, false, SBP_PERIODIC_EVT); /* [kf] change function name */

    dispHandle = Display_open(SBP_DISPLAY_TYPE, NULL);

    // Setup the GAP
    GAP_SetParamValue(TGAP_CONN_PAUSE_PERIPHERAL, DEFAULT_CONN_PAUSE_PERIPHERAL);

    // Setup the GAP Peripheral Role Profile
    {
    // For all hardware platforms, device starts advertising upon initialization
    uint8_t initialAdvertEnable = TRUE;

    // By setting this to zero, the device will go into the waiting state after
    // being discoverable for 30.72 second, and will not being advertising again
    // until the enabler is set back to TRUE
    uint16_t advertOffTime = 0;

    uint8_t enableUpdateRequest = DEFAULT_ENABLE_UPDATE_REQUEST;
    uint16_t desiredMinInterval = DEFAULT_DESIRED_MIN_CONN_INTERVAL;
    uint16_t desiredMaxInterval = DEFAULT_DESIRED_MAX_CONN_INTERVAL;
    uint16_t desiredSlaveLatency = DEFAULT_DESIRED_SLAVE_LATENCY;
    uint16_t desiredConnTimeout = DEFAULT_DESIRED_CONN_TIMEOUT;

    // Set the GAP Role Parameters
    GAPRole_SetParameter(GAPROLE_ADVERT_ENABLED, sizeof(uint8_t),
    &initialAdvertEnable);
    GAPRole_SetParameter(GAPROLE_ADVERT_OFF_TIME, sizeof(uint16_t),
    &advertOffTime);

    GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, sizeof(scanRspData),
    scanRspData);
    GAPRole_SetParameter(GAPROLE_ADVERT_DATA, sizeof(advertData), advertData);

    // Set the GAP Role Parameters
    /* [kf] Refer CC26..BLE Dev..Guide.pdf, Pg.76. The following is initialise the Gap Role parameters.
    It should occur in the application initialization function. That is FOBOBridge_peripheral_init().
    For explanation of GAPROLE_MIN_CONN_INTERVAL,..., etc, can refer to page 72, 5.1.1 Connection Parameters. */
    GAPRole_SetParameter(GAPROLE_ADVERT_ENABLED, sizeof(uint8_t), &initialAdvertEnable);
    GAPRole_SetParameter(GAPROLE_ADVERT_OFF_TIME, sizeof(uint16_t), &advertOffTime);
    GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, sizeof(scanRspData), scanRspData);
    GAPRole_SetParameter(GAPROLE_ADVERT_DATA, sizeof(advertData), advertData);
    GAPRole_SetParameter(GAPROLE_PARAM_UPDATE_ENABLE, sizeof(uint8_t), &enableUpdateRequest);
    GAPRole_SetParameter(GAPROLE_MIN_CONN_INTERVAL, sizeof(uint16_t), &desiredMinInterval);
    GAPRole_SetParameter(GAPROLE_MAX_CONN_INTERVAL, sizeof(uint16_t), &desiredMaxInterval);
    GAPRole_SetParameter(GAPROLE_SLAVE_LATENCY, sizeof(uint16_t), &desiredSlaveLatency);
    GAPRole_SetParameter(GAPROLE_TIMEOUT_MULTIPLIER, sizeof(uint16_t), &desiredConnTimeout);
    }
    .
    .
    .
    .
    .
    .

    It has become ------ :
    void BridgeBLEPeripheral_init(void)
    {
    // ******************************************************************
    // N0 STACK API CALLS CAN OCCUR BEFORE THIS CALL TO ICall_registerApp
    // ******************************************************************
    // Register the current thread as an ICall dispatcher application
    // so that the application can send and receive messages.
    ICall_registerApp(&selfEntity, &syncEvent);

    #ifdef USE_RCOSC
    RCOSC_enableCalibration();
    #endif // USE_RCOSC

    #if defined( USE_FPGA )
    // configure RF Core SMI Data Link
    IOCPortConfigureSet(IOID_12, IOC_PORT_RFC_GPO0, IOC_STD_OUTPUT);
    IOCPortConfigureSet(IOID_11, IOC_PORT_RFC_GPI0, IOC_STD_INPUT);

    // configure RF Core SMI Command Link
    IOCPortConfigureSet(IOID_10, IOC_IOCFG0_PORT_ID_RFC_SMI_CL_OUT, IOC_STD_OUTPUT);
    IOCPortConfigureSet(IOID_9, IOC_IOCFG0_PORT_ID_RFC_SMI_CL_IN, IOC_STD_INPUT);

    // configure RF Core tracer IO
    IOCPortConfigureSet(IOID_8, IOC_PORT_RFC_TRC, IOC_STD_OUTPUT);
    #else // !USE_FPGA
    #if defined( DEBUG_SW_TRACE )
    // configure RF Core tracer IO
    IOCPortConfigureSet(IOID_8, IOC_PORT_RFC_TRC, IOC_STD_OUTPUT | IOC_CURRENT_4MA | IOC_SLEW_ENABLE);
    #endif // DEBUG_SW_TRACE
    #endif // USE_FPGA

    // Create an RTOS queue for message from profile to be sent to app.
    appMsgQueue = Util_constructQueue(&appMsg);

    // Create one-shot clocks for internal periodic events.
    Util_constructClock(&periodicClock, FoboBridgeBLEPeripheral_clockHandler, SBP_PERIODIC_EVT_PERIOD, 0, false, SBP_PERIODIC_EVT); /* [kf] change function name */

    dispHandle = Display_open(SBP_DISPLAY_TYPE, NULL);

    // Setup the GAP
    //GAP_SetParamValue(TGAP_CONN_PAUSE_PERIPHERAL, DEFAULT_CONN_PAUSE_PERIPHERAL);

    GapProfileApp__Init();

    // Setup the GAP Peripheral Role Profile
    {
    // For all hardware platforms, device starts advertising upon initialization
    uint8_t initialAdvertEnable = TRUE;

    // By setting this to zero, the device will go into the waiting state after
    // being discoverable for 30.72 second, and will not being advertising again
    // until the enabler is set back to TRUE
    uint16_t advertOffTime = 0;

    uint8_t enableUpdateRequest = DEFAULT_ENABLE_UPDATE_REQUEST;
    uint16_t desiredMinInterval = DEFAULT_DESIRED_MIN_CONN_INTERVAL;
    uint16_t desiredMaxInterval = DEFAULT_DESIRED_MAX_CONN_INTERVAL;
    uint16_t desiredSlaveLatency = DEFAULT_DESIRED_SLAVE_LATENCY;
    uint16_t desiredConnTimeout = DEFAULT_DESIRED_CONN_TIMEOUT;

    // Set the GAP Role Parameters
    GAPRole_SetParameter(GAPROLE_ADVERT_ENABLED, sizeof(uint8_t),
    &initialAdvertEnable);
    GAPRole_SetParameter(GAPROLE_ADVERT_OFF_TIME, sizeof(uint16_t),
    &advertOffTime);

    GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, sizeof(scanRspData),
    scanRspData);
    GAPRole_SetParameter(GAPROLE_ADVERT_DATA, sizeof(advertData), advertData);

    // Set the GAP Role Parameters
    /* [kf] Refer CC26..BLE Dev..Guide.pdf, Pg.76. The following is initialise the Gap Role parameters.
    It should occur in the application initialization function. That is FOBOBridge_peripheral_init().
    For explanation of GAPROLE_MIN_CONN_INTERVAL,..., etc, can refer to page 72, 5.1.1 Connection Parameters. */
    GAPRole_SetParameter(GAPROLE_ADVERT_ENABLED, sizeof(uint8_t), &initialAdvertEnable);
    GAPRole_SetParameter(GAPROLE_ADVERT_OFF_TIME, sizeof(uint16_t), &advertOffTime);
    GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, sizeof(scanRspData), scanRspData);
    GAPRole_SetParameter(GAPROLE_ADVERT_DATA, sizeof(advertData), advertData);
    GAPRole_SetParameter(GAPROLE_PARAM_UPDATE_ENABLE, sizeof(uint8_t), &enableUpdateRequest);
    GAPRole_SetParameter(GAPROLE_MIN_CONN_INTERVAL, sizeof(uint16_t), &desiredMinInterval);
    GAPRole_SetParameter(GAPROLE_MAX_CONN_INTERVAL, sizeof(uint16_t), &desiredMaxInterval);
    GAPRole_SetParameter(GAPROLE_SLAVE_LATENCY, sizeof(uint16_t), &desiredSlaveLatency);
    GAPRole_SetParameter(GAPROLE_TIMEOUT_MULTIPLIER, sizeof(uint16_t), &desiredConnTimeout);
    }


    When I execute this new code, my program halt.
    The error is show in disassembly code :
    0x37f8: 0xbeab BKPT -------> the program stops here.



    I have troubleshoot it, my effort is as follows:

    (1) I have put GapProfileApp__Init(); inside int main() , between GAPRole_createTask(); and fbBriBLEPeripheral_createTask();
    , It is not causing program halt.


    (2) Then, I have put GapProfileApp__Init(); inside void fbBriBLEPeripheral_createTask(void),
    before statement : Task_construct(&sbpTask, FoboBridgeBLEPeripheral_taskFxn, &taskParams, NULL); ,
    , It is not causing program halt.


    (3) Then, I have put GapProfileApp__Init(); inside static void fbBriBLEPeripheral_taskFxn(UArg a0, UArg a1), before statement: fbBriBLEPeripheral_init(); , , It is not causing program halt.


    (3) Then have put GapProfileApp__Init(); inside void fbBriBLEPeripheral_init(void), as the first statement, which is before ICall_registerApp(&selfEntity, &syncEvent); , It is not causing program halt.

    (4) But when I put it after ICall_registerApp(&selfEntity, &syncEvent); ,
    program halt after execute GapProfileApp__Init(); statement.



    May I have your advice on the root cause that causing this error ? Program halt if it is put after ICall_registerApp.


    I have no idea how to start troubleshoot from here. Adding more paths ?
    Or move Bridge project one level at a time from its original location (same as simple_peripheral)?


    Please help.
    Thank you very much for your help.


    Cheers,
    KF
  • Thanks Kel. This is my project requirement. There is a requirement of how this file should be organised inside our SCM server.
    This is to separate the code which we modify from the stack (unlikely to modify). So that when there is a new stack coming in, we can just used it with minimal modification. When the official Bluetooth 5.0 stack coming in, we will have another round of configuration. But less effort is needed because we have separate it now.

    Please advice.
    Thank you very much.

    Cheers,
    KF
  • Hi F Chng,

    Maybe there is a wrong understanding how the folder structure should be placed in SCM. As you can see the app and stack are already separate projects.

    - kel
  • Hi Kel,

    You are right.
    But what the requirement wants is something outside of SDK --- simplelink_cc2640r2_sdk_1_00_00_22.

    This has bring in a lot of problem.

    Please advice.
    Thank you very much.

    Cheers,
    KF
  • Hi F Chng,

    Maybe the requirements are wrong. You can export the IAR app and stack project. The exported IAR app and stack projects is what can be put in SCM.

    - kel
  • Thanks YK Chen. I have send my explanation to you. I am troubleshooting it now.
    Will let you know my findings which you might be interested.

    Cheers,
    KF
  • Hi YK Chen,

    Many thanks for your advice so far.
    I have successfully Rebuild All, flash into dev board and run the program within my project requirement scope.
    I am start from a working program in TI recommended location. Then move out level by level. Until to my desired level.
    However, the root cause still unknown. I suspected is due to wrong path setting somewhere inside configurations.

    Anyway, thank you very much.


    Cheers,
    KF
  • Thanks Kel. My program now work within my requirement scope. I redo it and spend efforts to move it one level at a time.

    Cheers,
    KF
  • Do what you think is right and move the app and stack to C:\ti\simplelink_cc2640r2_sdk_1_00_00_22. But, I have already shown you that the folder location for Application and Stack are already separated. See, below.

    Application:

    C:\ti\simplelink_cc2640r2_sdk_1_00_00_22\examples\rtos\CC2640R2_LAUNCHXL\blestack

    Stack:

    C:\ti\simplelink_cc2640r2_sdk_1_00_00_22\source\ti\blestack

    I am not going to do the same because there is no relevance to doing that. You will also encounter compile errors if you do that.

    - kel
  • Thanks Kel. No choice, with this training now, we are already number one when comes to moving around. Cheers, KF :)
  • Thank YK Chen. the Jenkins problem also solved. I added chipinfo.c into startup folder. It will not pop then.

    Cheers,
    KF
  • Cool! It's good to know you solve the issue.