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.

CC2340R5: unable to send data after connection program is going into the abort() function

Part Number: CC2340R5

Tool/software:

Hi,

IDE: Code Composer Studio v12.5
Device: CC2340R5
SDK version: simplelink_lowpower_f3_sdk_7_40_00_64

We are using the CC2340R5 device in multirole mode. By default, the device role is set to peripheral. However, when a button is pressed, the device switches from peripheral to central mode for a scan duration of 2 seconds with a scan interval of 100 ms.

when we press switch on the device then device will change role from peripheral to central.

After changing to central mode, the device connects to another peripheral device. During this connection, we attempt to send data to the peripheral device. While this operation works sometimes, other times it fails, and the program seems to enter an abort() location.

I have attached some screenshots for your reference. Could you please review them and advise if there is an issue with our implementation? Any suggestions for resolving this problem would be greatly appreciated

void Scan_connect(void)
{
    bStatus_t status;
   for(int i=0;i<10;i++)
   {
       if(connect_flag != 1)
       {
           i=10;
           const BLEAppUtil_ScanStart_t centralScanStartParams =
           {
            /*! Zero for continuously scanning */
            .scanPeriod     = 10 ,//DEFAULT_SCAN_PERIOD, /* Units of 1.28sec */

            /*! Scan Duration shall be greater than to scan interval,*/
            /*! Zero continuously scanning. */
            .scanDuration   = 200, //DEFAULT_SCAN_DURATION, /* Units of 10ms */

            /*! If non-zero, the list of advertising reports will be */
            /*! generated and come with @ref GAP_EVT_SCAN_DISABLED.  */
            .maxNumReport   = 20 //APP_MAX_NUM_OF_ADV_REPORTS
           };

           BLEAppUtil_scanStart(&centralScanStartParams);
       }
              vTaskDelay(pdMS_TO_TICKS(500));
//              LED_disconnect();
   }
   if(connect_flag)
   {
       status = BLEAppUtil_gattwrite(1);
       vTaskDelay(pdMS_TO_TICKS(100));
       LED_connect();
//      write_data();
   }
}
//

please helps us for the same.

Thanks, and Regards

Balaji Wankhede

  • Hello Balaji,

    Thanks for reaching out.

    Could you please confirm if this is an automotive application? Are you using the CC2340R5-Q1 device?

    From where are you calling Scan_connect() function? Is this from a GPIO callback ("when a button is pressed, the device switches from peripheral to central mode")?

    BR,

    David.