SWCU191 February 2022 CC1311P3 , CC1311R3 , CC2651P3 , CC2651R3 , CC2651R3SIPA
Two triggers to end the operation are set up by pParams->endTrigger/pParams->endTime and pParams->timeoutTrigger/pParams->timeoutTime, respectively. The triggers have the following behavior:
If the immediate command CMD_STOP is received by the radio CPU, it shall have the same meaning as the end trigger occurring, except that the status code after ending shall be CMD_DONE_STOPPED. Typically, timeoutTrigger can be used at the end of a scan window, while endTrigger can be used when scanning is to end entirely.
The output structure pOutput contains fields which give information on the command being run. The radio CPU shall not initialize the fields, so this must be done by the system CPU when a reset of the counters is desired. The fields shall be updated by the radio CPU as described below. The list also indicates when interrupts shall be raised in the system CPU.
A scanner operation shall end with one of the statuses listed in Table 26-153. The status field of the command structure after the operation is ended indicates the reason why the operation ended. In all cases, a Command_Done interrupt is raised. In each case, the result of TRUE, FALSE, or ABORT is indicated, which will decide the next action.
Condition | Status Code | Result |
---|---|---|
Performed action 2 with pParams->scanConfig.bEndOnRpt = 1 or when receiving on secondary channel | BLE_DONE_OK | TRUE |
Performed action 3 with pParams->scanConfig.bEndOnRpt = 1 or on secondary channel, and did not send SCAN_REQ or AUX_SCAN_REQ due to backoff | BLE_DONE_OK | TRUE |
Performed action 3 with pParams->scanConfig.bEndOnRpt = 1 or on secondary channel, sent SCAN_REQ or AUX_SCAN_REQ and received SCAN_RSP or AUX_SCAN_RSP with bCrcErr = 0 and bIgnore = 0 | BLE_DONE_OK | TRUE |
Performed action 1 or action 4 on secondary channel | BLE_DONE_RXERR | TRUE |
Performed action 3 with pParams->scanConfig.bEndOnRpt = 1 or on secondary channel, sent SCAN_REQ or AUX_SCAN_REQ and received SCAN_RSP or AUX_SCAN_RSP with bCrcErr = 1 or bIgnore = 1 | BLE_DONE_RXERR | TRUE |
Performed action 3 with pParams->scanConfig.bEndOnRpt = 1 or on secondary channel, sent SCAN_REQ or AUX_SCAN_REQ, but did not get sync or found wrong packet type or invalid length | BLE_DONE_NOSYNC | TRUE |
Observed trigger indicated by pParams->timeoutTrigger while waiting for sync on advertiser packet | BLE_DONE_RXTIMEOUT | TRUE |
Observed trigger indicated by pParams->timeoutTrigger while on primary channel, then performed actions 1, 2, 3, 4, or 5. | BLE_DONE_RXTIMEOUT | TRUE |
Observed trigger indicated by pParams->endTrigger while waiting for sync on advertiser packet | BLE_DONE_ENDED | FALSE |
Observed trigger indicated by pParams->endTrigger, then performed actions 1, 2, 3, 4, 5, or 6. | BLE_DONE_ENDED | FALSE |
Observed CMD_STOP while waiting for sync on advertiser packet | BLE_DONE_STOPPED | FALSE |
Observed CMD_STOP, then performed actions 1, 2, 3, 4, 5, or 6. | BLE_DONE_STOPPED | FALSE |
Performed action 6 with wait time to AUX packet more than pParams->maxWaitTimeForAuxCh. | BLE_DONE_AUX | FALSE |
Received CMD_ABORT | BLE_DONE_ABORT | ABORT |
No space in RX buffer to store received packet | BLE_ERROR_RXBUF | FALSE |
Illegal value of channel | BLE_ERROR_PAR | ABORT |
Scan request data length field has illegal value | BLE_ERROR_PAR | ABORT |