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.

CC2652R: After turning on the broadcast scanning, exception occurs

Part Number: CC2652R


Hi team,

Here's an issue from the customer may need your help:

When developing with simple_central_CC26X2R1_LAUNCHXL_tirtos7_ticlang, the original application is operated by a button through select "Discover Devices"  to call "SimpleCentral_doDiscoverDevices".

Currently they want to open it via task, and then executes SimpleCentral_doDiscoverDevices (0) directly in the task after the device has been running for some time, while an exception occurs as shown in the following figure(going to ICall_abort-->while(j);):

Could you help check this case? Thanks.

Best Regards,

Cherry

  • Hi Cherry,

    I am afraid the approach followed is not correct. I recommend you review the SimpleLink Academy trainings and the User's Guide in order to get more familiar with the stack and it ways of working.

    Generally speaking, scanning can be enabled using the function GapScan_enable()  when the event GAP_DEVICE_INIT_DONE_EVENT is received.

    You can review the code I have written for you:

    static void SimpleCentral_processGapMsg(gapEventHdr_t *pMsg)
    {
      switch (pMsg->opcode)
      {
        case GAP_DEVICE_INIT_DONE_EVENT:
        {
          // ...
    
          // Start scanning
          GapScan_enable(0, DEFAULT_SCAN_DURATION, DEFAULT_MAX_SCAN_RES);
          
          break;
        }
        
        // ...
      }
    }

    I hope this will help,

    Best regards,