Tool/software: Code Composer Studio
Dear
I open scanning in the code with interface GapScan_enable(0, 0, 0) after scan inited based on project multi_role,after hours later, the code will report insufficient memeory and stop the scan.so, what should i atttentin or somwhere shoudle be modified in the code?some related code as follow:
{
uint8_t temp8;
uint16_t temp16;
// For more information, see the GAP section in the User's Guide:
// software-dl.ti.com/.../
GapScan_registerCb(multi_role_scanCB, NULL);
GapScan_setEventMask(GAP_EVT_SCAN_ENABLED | GAP_EVT_SCAN_DISABLED |
GAP_EVT_ADV_REPORT);
GapScan_setPhyParams(DEFAULT_SCAN_PHY, SCAN_TYPE_PASSIVE,
SCAN_PARAM_DFLT_INTERVAL, SCAN_PARAM_DFLT_WINDOW);
temp16 = MR_ADV_RPT_FIELDS;
GapScan_setParam(SCAN_PARAM_RPT_FIELDS, &temp16);
// Set Scanning Primary PHY
temp8 = DEFAULT_SCAN_PHY;
GapScan_setParam(SCAN_PARAM_PRIM_PHYS, &temp8);
// Set LL Duplicate Filter
temp8 = SCAN_FLT_DUP_ENABLE;
GapScan_setParam(SCAN_PARAM_FLT_DUP, &temp8);
temp16 = SCAN_FLT_PDU_ADV_ONLY | SCAN_FLT_PDU_SCANRSP_ONLY | SCAN_FLT_PDU_COMPLETE_ONLY;
GapScan_setParam(SCAN_PARAM_FLT_PDU_TYPE, &temp16);
}
{
(void) index;
// 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.
numScanRes = 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));
}