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.

LAUNCHXL-CC1352P: Multi role using command with uart

Part Number: LAUNCHXL-CC1352P


Tool/software:

Hi TIs

After removing the two-button menu,
I want to control the BLE discovery and connection actions through commands sent by the host via UART.
However, after initialization is done, when I send a command to execute multi_role_doDiscoverDevices,
the system seems to get stuck after GAPScan_enable, and the UART stops functioning.
It seems like the system is frozen.
Do you have any suggestions on how to resolve this?

bool multi_role_doDiscoverDevices(uint8_t index)
{
  (void) index;

#if (DEFAULT_DEV_DISC_BY_SVC_UUID == TRUE)
  // Scanning for DEFAULT_SCAN_DURATION x 10 ms.
  // The stack does not need to record advertising reports
  // since the application will filter them by Service UUID and save.

  // Reset number of scan results to 0 before starting scan
  numScanRes = 0;
  GapScan_enable(0, DEFAULT_SCAN_DURATION, 0);
#else // !DEFAULT_DEV_DISC_BY_SVC_UUID
  // Scanning for DEFAULT_SCAN_DURATION x 10 ms.
  // Let the stack record the advertising reports as many as up to DEFAULT_MAX_SCAN_RES.
  GapScan_enable(0, DEFAULT_SCAN_DURATION, DEFAULT_MAX_SCAN_RES);
#endif // DEFAULT_DEV_DISC_BY_SVC_UUID
  // Enable only "Stop Discovering" and disable all others in the main menu
  //tbm_setItemStatus(&mrMenuMain, MR_ITEM_STOPDISC,
  //                  (MR_ITEM_ALL & ~MR_ITEM_STOPDISC));

  return (true);
}