Multiprotocol#
Multiprotocol scheduler APIs to support multiple time-sliced PHYs.
Modules#
Enumerations#
Multiprotocol scheduler status returned by RAIL_GetSchedulerStatus().
Multiprotocol radio operation task types, used with RAIL_SetTaskPriority().
Multiprotocol scheduler status returned by sl_rail_get_scheduler_status().
Multiprotocol radio operation task types, used with sl_rail_set_task_priority().
Functions#
Yield the radio to other configurations.
Get the status of the RAIL scheduler.
Get the status of the RAIL scheduler, specific to the radio operation, along with RAIL_Status_t returned by RAIL API invoked by the RAIL scheduler.
Change the priority of a specified task type in multiprotocol.
Get the time needed to switch between protocols.
Set the time needed to switch between protocols.
Yield the radio to other configurations.
Get the status of the RAIL scheduler, specific to the radio operation, along with sl_rail_status_t returned by RAIL API invoked by the RAIL scheduler.
Change the priority of a specified task type in multiprotocol.
Get the time needed to switch between protocols.
Set the time needed to switch between protocols.
Macros#
Radio Scheduler Status mask within RAIL_SchedulerStatus_t values.
Radio Scheduler Status shift within RAIL_SchedulerStatus_t values.
Radio Scheduler Task mask within RAIL_SchedulerStatus_t values.
Radio Scheduler Task shift within RAIL_SchedulerStatus_t values.
Radio Scheduler Status mask within sl_rail_scheduler_status_t values.
Radio Scheduler Status shift within sl_rail_scheduler_status_t values.
Radio Scheduler Task mask within sl_rail_scheduler_status_t values.
Radio Scheduler Task shift within sl_rail_scheduler_status_t values.
Enumeration Documentation#
RAIL_SchedulerStatus_t#
RAIL_SchedulerStatus_t
Multiprotocol scheduler status returned by RAIL_GetSchedulerStatus().
Multiprotocol scheduler status is a combination of the upper 4 bits which constitute the type of scheduler task and the lower 4 bits which constitute the type of scheduler error.
DeprecatedRAIL 2.x synonym of sl_rail_scheduler_status_t.
| Enumerator | |
|---|---|
| RAIL_SCHEDULER_STATUS_NO_ERROR | Multiprotocol scheduler reports no error. |
| RAIL_SCHEDULER_STATUS_UNSUPPORTED | The scheduler is disabled or the requested scheduler operation is unsupported. |
| RAIL_SCHEDULER_STATUS_EVENT_INTERRUPTED | The scheduled task was started but was interrupted by a higher-priority event before it could be completed. |
| RAIL_SCHEDULER_STATUS_SCHEDULE_FAIL | Scheduled task could not be scheduled given its priority and the other tasks running on the system. |
| RAIL_SCHEDULER_STATUS_TASK_FAIL | Calling the RAIL API associated with the Radio scheduler task returned an error code. |
| RAIL_SCHEDULER_STATUS_INTERNAL_ERROR | An internal error occurred in scheduler data structures, which should not happen and indicates a problem. |
| RAIL_SCHEDULER_TASK_EMPTY | Radio scheduler has no task. |
| RAIL_SCHEDULER_TASK_SCHEDULED_RX | Radio scheduler calls RAIL_ScheduleRx(). |
| RAIL_SCHEDULER_TASK_SCHEDULED_TX | Radio scheduler calls RAIL_StartScheduledTx(). |
| RAIL_SCHEDULER_TASK_SINGLE_TX | Radio scheduler calls RAIL_StartTx(). |
| RAIL_SCHEDULER_TASK_SINGLE_CCA_CSMA_TX | Radio scheduler calls RAIL_StartCcaCsmaTx(). |
| RAIL_SCHEDULER_TASK_SINGLE_CCA_LBT_TX | Radio scheduler calls RAIL_StartCcaLbtTx(). |
| RAIL_SCHEDULER_TASK_SCHEDULED_CCA_CSMA_TX | Radio scheduler calls RAIL_StartScheduledCcaCsmaTx(). |
| RAIL_SCHEDULER_TASK_SCHEDULED_CCA_LBT_TX | Radio scheduler calls RAIL_StartScheduledCcaLbtTx(). |
| RAIL_SCHEDULER_TASK_TX_STREAM | Radio scheduler calls RAIL_StartTxStream(). |
| RAIL_SCHEDULER_TASK_AVERAGE_RSSI | Radio scheduler calls RAIL_StartAverageRssi(). |
| RAIL_SCHEDULER_STATUS_SCHEDULED_TX_FAIL | RAIL_StartScheduledTx() returned error status. |
| RAIL_SCHEDULER_STATUS_SINGLE_TX_FAIL | RAIL_StartTx() returned error status. |
| RAIL_SCHEDULER_STATUS_CCA_CSMA_TX_FAIL | RAIL_StartCcaCsmaTx() returned error status. |
| RAIL_SCHEDULER_STATUS_CCA_LBT_TX_FAIL | RAIL_StartCcaLbtTx() returned error status. |
| RAIL_SCHEDULER_STATUS_SCHEDULED_RX_FAIL | RAIL_ScheduleRx() returned error status. |
| RAIL_SCHEDULER_STATUS_TX_STREAM_FAIL | RAIL_StartTxStream() returned error status. |
| RAIL_SCHEDULER_STATUS_AVERAGE_RSSI_FAIL | RAIL_StartAverageRssi() returned error status. |
| RAIL_SCHEDULER_SCHEDULED_RX_INTERNAL_ERROR | Multiprotocol scheduled receive function internal error. |
| RAIL_SCHEDULER_SCHEDULED_RX_SCHEDULING_ERROR | Multiprotocol scheduled receive scheduling error. |
| RAIL_SCHEDULER_SCHEDULED_RX_INTERRUPTED | RAIL_ScheduleRx() operation interrupted |
| RAIL_SCHEDULER_SCHEDULED_TX_INTERNAL_ERROR | Multiprotocol scheduled TX internal error. |
| RAIL_SCHEDULER_SCHEDULED_TX_SCHEDULING_ERROR | Multiprotocol scheduled TX scheduling error. |
| RAIL_SCHEDULER_SCHEDULED_TX_INTERRUPTED | RAIL_StartScheduledTx() operation interrupted. |
| RAIL_SCHEDULER_SINGLE_TX_INTERNAL_ERROR | Multiprotocol instantaneous TX internal error. |
| RAIL_SCHEDULER_SINGLE_TX_SCHEDULING_ERROR | Multiprotocol instantaneous TX scheduling error. |
| RAIL_SCHEDULER_SINGLE_TX_INTERRUPTED | RAIL_StartTx() operation interrupted. |
| RAIL_SCHEDULER_SINGLE_CCA_CSMA_TX_INTERNAL_ERROR | Multiprotocol single CSMA transmit function internal error. |
| RAIL_SCHEDULER_SINGLE_CCA_CSMA_TX_SCHEDULING_ERROR | Multiprotocol single CSMA transmit scheduling error. |
| RAIL_SCHEDULER_SINGLE_CCA_CSMA_TX_INTERRUPTED | RAIL_StartCcaCsmaTx() operation interrupted. |
| RAIL_SCHEDULER_SINGLE_CCA_LBT_TX_INTERNAL_ERROR | Multiprotocol single LBT transmit function internal error. |
| RAIL_SCHEDULER_SINGLE_CCA_LBT_TX_SCHEDULING_ERROR | Multiprotocol single LBT transmit scheduling error. |
| RAIL_SCHEDULER_SINGLE_CCA_LBT_TX_INTERRUPTED | RAIL_StartCcaLbtTx() operation interrupted. |
| RAIL_SCHEDULER_SCHEDULED_CCA_CSMA_TX_INTERNAL_ERROR | Multiprotocol scheduled CSMA transmit function internal error. |
| RAIL_SCHEDULER_SCHEDULED_CCA_CSMA_TX_FAIL | RAIL_StartScheduledCcaCsmaTx() returned error status. |
| RAIL_SCHEDULER_SCHEDULED_CCA_CSMA_TX_SCHEDULING_ERROR | Multiprotocol scheduled CSMA transmit scheduling error. |
| RAIL_SCHEDULER_SCHEDULED_CCA_CSMA_TX_INTERRUPTED | RAIL_StartScheduledCcaCsmaTx() operation interrupted. |
| RAIL_SCHEDULER_SCHEDULED_CCA_LBT_TX_INTERNAL_ERROR | Multiprotocol scheduled LBT transmit function internal error. |
| RAIL_SCHEDULER_SCHEDULED_CCA_LBT_TX_FAIL | RAIL_StartScheduledCcaLbtTx() returned error status. |
| RAIL_SCHEDULER_SCHEDULED_CCA_LBT_TX_SCHEDULING_ERROR | Multiprotocol scheduled LBT transmit scheduling error. |
| RAIL_SCHEDULER_SCHEDULED_CCA_LBT_TX_INTERRUPTED | RAIL_StartScheduledCcaLbtTx() operation interrupted. |
| RAIL_SCHEDULER_TX_STREAM_INTERNAL_ERROR | Multiprotocol stream transmit function internal error. |
| RAIL_SCHEDULER_TX_STREAM_SCHEDULING_ERROR | Multiprotocol stream transmit scheduling error. |
| RAIL_SCHEDULER_TX_STREAM_INTERRUPTED | RAIL_StartTxStream() operation interrupted. |
| RAIL_SCHEDULER_AVERAGE_RSSI_INTERNAL_ERROR | Multiprotocol RSSI averaging function internal error. |
| RAIL_SCHEDULER_AVERAGE_RSSI_SCHEDULING_ERROR | Multiprotocol RSSI average scheduling error. |
| RAIL_SCHEDULER_AVERAGE_RSSI_INTERRUPTED | RAIL_StartAverageRssi() operation interrupted. |
RAIL_TaskType_t#
RAIL_TaskType_t
Multiprotocol radio operation task types, used with RAIL_SetTaskPriority().
DeprecatedRAIL 2.x synonym of sl_rail_task_type_t.
| Enumerator | |
|---|---|
| RAIL_TASK_TYPE_START_RX | Indicate a task started using RAIL_StartRx(). |
| RAIL_TASK_TYPE_OTHER | Indicate a task started functions other than RAIL_StartRx(). |
sl_rail_scheduler_status_t#
sl_rail_scheduler_status_t
Multiprotocol scheduler status returned by sl_rail_get_scheduler_status().
Multiprotocol scheduler status is a combination of the upper 4 bits which constitute the type of scheduler task and the lower 4 bits which constitute the type of scheduler error.
| Enumerator | |
|---|---|
| SL_RAIL_SCHEDULER_STATUS_NO_ERROR | Multiprotocol scheduler reports no error. |
| SL_RAIL_SCHEDULER_STATUS_UNSUPPORTED | The scheduler is disabled or the requested scheduler operation is unsupported. |
| SL_RAIL_SCHEDULER_STATUS_EVENT_INTERRUPTED | The scheduled task was started but was interrupted by a higher-priority event before it could be completed. |
| SL_RAIL_SCHEDULER_STATUS_SCHEDULE_FAIL | Scheduled task could not be scheduled given its priority and the other tasks running on the system. |
| SL_RAIL_SCHEDULER_STATUS_TASK_FAIL | Calling the RAIL API associated with the Radio scheduler task returned an error code. |
| SL_RAIL_SCHEDULER_STATUS_INTERNAL_ERROR | An internal error occurred in scheduler data structures, which should not happen and indicates a problem. |
| SL_RAIL_SCHEDULER_TASK_EMPTY | Radio scheduler has no task. |
| SL_RAIL_SCHEDULER_TASK_SCHEDULED_RX | Radio scheduler calls sl_rail_start_scheduled_rx(). |
| SL_RAIL_SCHEDULER_TASK_SCHEDULED_TX | Radio scheduler calls sl_rail_start_scheduled_tx(). |
| SL_RAIL_SCHEDULER_TASK_SINGLE_TX | Radio scheduler calls sl_rail_start_tx(). |
| SL_RAIL_SCHEDULER_TASK_SINGLE_CCA_CSMA_TX | Radio scheduler calls sl_rail_start_cca_csma_tx(). |
| SL_RAIL_SCHEDULER_TASK_SINGLE_CCA_LBT_TX | Radio scheduler calls sl_rail_start_cca_lbt_tx(). |
| SL_RAIL_SCHEDULER_TASK_SCHEDULED_CCA_CSMA_TX | Radio scheduler calls sl_rail_start_scheduled_cca_csma_tx(). |
| SL_RAIL_SCHEDULER_TASK_SCHEDULED_CCA_LBT_TX | Radio scheduler calls sl_rail_start_scheduled_cca_lbt_tx(). |
| SL_RAIL_SCHEDULER_TASK_TX_STREAM | Radio scheduler calls sl_rail_start_tx_stream(). |
| SL_RAIL_SCHEDULER_TASK_AVERAGE_RSSI | Radio scheduler calls sl_rail_start_average_rssi(). |
| SL_RAIL_SCHEDULER_STATUS_SCHEDULED_TX_FAIL | sl_rail_start_scheduled_tx() returned error status. |
| SL_RAIL_SCHEDULER_STATUS_SINGLE_TX_FAIL | sl_rail_start_tx() returned error status. |
| SL_RAIL_SCHEDULER_STATUS_CCA_CSMA_TX_FAIL | sl_rail_start_cca_csma_tx() returned error status. |
| SL_RAIL_SCHEDULER_STATUS_CCA_LBT_TX_FAIL | sl_rail_start_cca_lbt_tx() returned error status. |
| SL_RAIL_SCHEDULER_STATUS_SCHEDULED_RX_FAIL | sl_rail_start_scheduled_rx() returned error status. |
| SL_RAIL_SCHEDULER_STATUS_TX_STREAM_FAIL | sl_rail_start_tx_stream() returned error status. |
| SL_RAIL_SCHEDULER_STATUS_AVERAGE_RSSI_FAIL | sl_rail_start_average_rssi() returned error status. |
| SL_RAIL_SCHEDULER_SCHEDULED_RX_INTERNAL_ERROR | Multiprotocol scheduled receive function internal error. |
| SL_RAIL_SCHEDULER_SCHEDULED_RX_SCHEDULING_ERROR | Multiprotocol scheduled receive scheduling error. |
| SL_RAIL_SCHEDULER_SCHEDULED_RX_INTERRUPTED | sl_rail_start_scheduled_rx() operation interrupted |
| SL_RAIL_SCHEDULER_SCHEDULED_TX_INTERNAL_ERROR | Multiprotocol scheduled TX internal error. |
| SL_RAIL_SCHEDULER_SCHEDULED_TX_SCHEDULING_ERROR | Multiprotocol scheduled TX scheduling error. |
| SL_RAIL_SCHEDULER_SCHEDULED_TX_INTERRUPTED | sl_rail_start_scheduled_tx() operation interrupted. |
| SL_RAIL_SCHEDULER_SINGLE_TX_INTERNAL_ERROR | Multiprotocol instantaneous TX internal error. |
| SL_RAIL_SCHEDULER_SINGLE_TX_SCHEDULING_ERROR | Multiprotocol instantaneous TX scheduling error. |
| SL_RAIL_SCHEDULER_SINGLE_TX_INTERRUPTED | sl_rail_start_tx() operation interrupted. |
| SL_RAIL_SCHEDULER_SINGLE_CCA_CSMA_TX_INTERNAL_ERROR | Multiprotocol single CSMA transmit function internal error. |
| SL_RAIL_SCHEDULER_SINGLE_CCA_CSMA_TX_SCHEDULING_ERROR | Multiprotocol single CSMA transmit scheduling error. |
| SL_RAIL_SCHEDULER_SINGLE_CCA_CSMA_TX_INTERRUPTED | sl_rail_start_cca_csma_tx() operation interrupted. |
| SL_RAIL_SCHEDULER_SINGLE_CCA_LBT_TX_INTERNAL_ERROR | Multiprotocol single LBT transmit function internal error. |
| SL_RAIL_SCHEDULER_SINGLE_CCA_LBT_TX_SCHEDULING_ERROR | Multiprotocol single LBT transmit scheduling error. |
| SL_RAIL_SCHEDULER_SINGLE_CCA_LBT_TX_INTERRUPTED | sl_rail_start_cca_lbt_tx() operation interrupted. |
| SL_RAIL_SCHEDULER_SCHEDULED_CCA_CSMA_TX_INTERNAL_ERROR | Multiprotocol scheduled CSMA transmit function internal error. |
| SL_RAIL_SCHEDULER_SCHEDULED_CCA_CSMA_TX_FAIL | sl_rail_start_scheduled_cca_csma_tx() returned error status. |
| SL_RAIL_SCHEDULER_SCHEDULED_CCA_CSMA_TX_SCHEDULING_ERROR | Multiprotocol scheduled CSMA transmit scheduling error. |
| SL_RAIL_SCHEDULER_SCHEDULED_CCA_CSMA_TX_INTERRUPTED | sl_rail_start_scheduled_cca_csma_tx() operation interrupted. |
| SL_RAIL_SCHEDULER_SCHEDULED_CCA_LBT_TX_INTERNAL_ERROR | Multiprotocol scheduled LBT transmit function internal error. |
| SL_RAIL_SCHEDULER_SCHEDULED_CCA_LBT_TX_FAIL | sl_rail_start_scheduled_cca_lbt_tx() returned error status. |
| SL_RAIL_SCHEDULER_SCHEDULED_CCA_LBT_TX_SCHEDULING_ERROR | Multiprotocol scheduled LBT transmit scheduling error. |
| SL_RAIL_SCHEDULER_SCHEDULED_CCA_LBT_TX_INTERRUPTED | sl_rail_start_scheduled_cca_lbt_tx() operation interrupted. |
| SL_RAIL_SCHEDULER_TX_STREAM_INTERNAL_ERROR | Multiprotocol stream transmit function internal error. |
| SL_RAIL_SCHEDULER_TX_STREAM_SCHEDULING_ERROR | Multiprotocol stream transmit scheduling error. |
| SL_RAIL_SCHEDULER_TX_STREAM_INTERRUPTED | sl_rail_start_tx_stream() operation interrupted. |
| SL_RAIL_SCHEDULER_AVERAGE_RSSI_INTERNAL_ERROR | Multiprotocol RSSI averaging function internal error. |
| SL_RAIL_SCHEDULER_AVERAGE_RSSI_SCHEDULING_ERROR | Multiprotocol RSSI average scheduling error. |
| SL_RAIL_SCHEDULER_AVERAGE_RSSI_INTERRUPTED | sl_rail_start_average_rssi() operation interrupted. |
sl_rail_task_type_t#
sl_rail_task_type_t
Multiprotocol radio operation task types, used with sl_rail_set_task_priority().
| Enumerator | |
|---|---|
| SL_RAIL_TASK_TYPE_START_RX | Indicate a task started using sl_rail_start_rx(). |
| SL_RAIL_TASK_TYPE_OTHER | Indicate a task started functions other than sl_rail_start_rx(). |
Function Documentation#
RAIL_YieldRadio#
RAIL_Status_t RAIL_YieldRadio (RAIL_Handle_t railHandle)
Yield the radio to other configurations.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| RAIL_Handle_t | [in] | railHandle | A RAIL instance handle. |
Returns
Status code indicating success of the function call.
This function is used to indicate that the previous transmit or scheduled receive operation has completed. It must be used in multiprotocol RAIL because the scheduler assumes that any transmit or receive operation that is started can go on indefinitely based on state transitions and your protocol. RAIL will not allow a lower priority tasks to run until this is called so it can negatively impact performance of those protocols if this is omitted or delayed. It is also possible to call the RAIL_Idle() API to both terminate the operation and idle the radio. In single protocol RAIL this API does nothing, however, if RAIL Power Manager is initialized, calling RAIL_YieldRadio() after scheduled TX/RX and instantaneous TX completion, is required, to indicate to the Power Manager that the the radio is no longer busy and can be idled for sleeping.
See Yielding the Radio for more details.
DeprecatedRAIL 2.x synonym of sl_rail_yield_radio().
RAIL_GetSchedulerStatus#
RAIL_SchedulerStatus_t RAIL_GetSchedulerStatus (RAIL_Handle_t railHandle)
Get the status of the RAIL scheduler.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| RAIL_Handle_t | [in] | railHandle | A RAIL instance handle. |
Returns
RAIL_SchedulerStatus_t status.
This function can only be called from a callback context after the RAIL_EVENT_SCHEDULER_STATUS event occurs.
DeprecatedThis RAIL 2.x function has been replaced in RAIL 3 by sl_rail_get_scheduler_status() with additional parameters and a broader set of sl_rail_scheduler_status_t values that can be reported.
RAIL_GetSchedulerStatusAlt#
RAIL_Status_t RAIL_GetSchedulerStatusAlt (RAIL_Handle_t railHandle, RAIL_SchedulerStatus_t * pSchedulerStatus, RAIL_Status_t * pRailStatus)
Get the status of the RAIL scheduler, specific to the radio operation, along with RAIL_Status_t returned by RAIL API invoked by the RAIL scheduler.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| RAIL_Handle_t | [in] | railHandle | A RAIL instance handle. |
| RAIL_SchedulerStatus_t * | [out] | pSchedulerStatus | An application-provided pointer to store RAIL_SchedulerStatus_t status. Can be NULL as long as pRailStatus is not NULL. |
| RAIL_Status_t * | [out] | pRailStatus | An application-provided pointer to store RAIL_Status_t of the RAIL API invoked by the RAIL scheduler. Can be NULL as long as pSchedulerStatus is not NULL. |
Returns
Status code indicating success of the function call.
This function can only be called from a callback context after the RAIL_EVENT_SCHEDULER_STATUS event occurs.
DeprecatedRAIL 2.x synonym of sl_rail_get_scheduler_status().
RAIL_SetTaskPriority#
RAIL_Status_t RAIL_SetTaskPriority (RAIL_Handle_t railHandle, uint8_t priority, RAIL_TaskType_t taskType)
Change the priority of a specified task type in multiprotocol.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| RAIL_Handle_t | [in] | railHandle | A RAIL instance handle. |
| uint8_t | [in] | priority | Desired new priority for the railHandle's active task |
| RAIL_TaskType_t | [in] | taskType | Type of task whose priority should be updated |
Returns
Status code indicating success of the function call.
While the application can use this function however it likes, a major use case is being able to increase an infinite receive priority while receiving a packet. In other words, a given RAIL_Handle_t can maintain a very low priority background receive, but upon getting a RAIL_EVENT_RX_SYNC1_DETECT_SHIFT or RAIL_EVENT_RX_SYNC2_DETECT_SHIFT event, the app can call this function to increase the background RX priority to lower the risk another protocol might preempt during packet reception.
DeprecatedRAIL 2.x synonym of sl_rail_set_task_priority().
RAIL_GetTransitionTime#
RAIL_Time_t RAIL_GetTransitionTime (void )
Get the time needed to switch between protocols.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Returns
RAIL_Time_t Approximate time, in microseconds, needed to switch between protocols.
Note
The transition time determines how early the scheduler starts processing a protocol switch relative to a scheduled event. This value is approximate and actual transition time may vary slightly due to system overhead.
DeprecatedThis RAIL 2.x function has been replaced in RAIL 3 by sl_rail_get_transition_time() with its additional sl_rail_handle_t parameter.
RAIL_SetTransitionTime#
void RAIL_SetTransitionTime (RAIL_Time_t transitionTime)
Set the time needed to switch between protocols.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| RAIL_Time_t | [in] | transitionTime | Time, in microseconds, needed to switch between protocols. |
Call this API only once, before any protocol is initialized via RAIL_Init(). Changing this value during normal operation can result in improper scheduling behavior.
Note
The transition time determines how early the scheduler starts processing a protocol switch relative to a scheduled event. This value is approximate and does not account for all system overhead. Setting this value too low may cause scheduling issues or missed events.
DeprecatedThis RAIL 2.x function has been replaced in RAIL 3 by sl_rail_set_transition_time() with its additional sl_rail_handle_t parameter.
sl_rail_yield_radio#
sl_rail_status_t sl_rail_yield_radio (sl_rail_handle_t rail_handle)
Yield the radio to other configurations.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_rail_handle_t | [in] | rail_handle | A real RAIL instance handle. |
Returns
Status code indicating success of the function call.
This function is used to indicate that the previous transmit or scheduled receive operation has completed. It must be used in multiprotocol RAIL because the scheduler assumes that any transmit or receive operation that is started can go on indefinitely based on state transitions and your protocol. RAIL will not allow a lower priority tasks to run until this is called so it can negatively impact performance of those protocols if this is omitted or delayed. It is also possible to call the sl_rail_idle() API to both terminate the operation and idle the radio. In single protocol RAIL this API does nothing, however, if RAIL Power Manager is initialized, calling sl_rail_yield_radio() after scheduled TX/RX and instantaneous TX completion, is required, to indicate to the Power Manager that the the radio is no longer busy and can be idled for sleeping.
See Yielding the Radio for more details.
sl_rail_get_scheduler_status#
sl_rail_status_t sl_rail_get_scheduler_status (sl_rail_handle_t rail_handle, sl_rail_scheduler_status_t * p_scheduler_status, sl_rail_status_t * p_rail_status)
Get the status of the RAIL scheduler, specific to the radio operation, along with sl_rail_status_t returned by RAIL API invoked by the RAIL scheduler.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_rail_handle_t | [in] | rail_handle | A real RAIL instance handle. |
| sl_rail_scheduler_status_t * | [out] | p_scheduler_status | An application-provided pointer to store sl_rail_scheduler_status_t status. Can be NULL as long as p_rail_status is not NULL. |
| sl_rail_status_t * | [out] | p_rail_status | An application-provided pointer to store sl_rail_status_t of the RAIL API invoked by the RAIL scheduler. Can be NULL as long as p_scheduler_status is not NULL. |
Returns
Status code indicating success of the function call.
This function can only be called from a callback context after the SL_RAIL_EVENT_SCHEDULER_STATUS event occurs.
sl_rail_set_task_priority#
sl_rail_status_t sl_rail_set_task_priority (sl_rail_handle_t rail_handle, uint8_t priority, sl_rail_task_type_t task_type)
Change the priority of a specified task type in multiprotocol.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_rail_handle_t | [in] | rail_handle | A real RAIL instance handle. |
| uint8_t | [in] | priority | Desired new priority for the rail_handle's active task |
| sl_rail_task_type_t | [in] | task_type | Type of task whose priority should be updated |
Returns
Status code indicating success of the function call.
While the application can use this function however it likes, a major use case is being able to increase an infinite receive priority while receiving a packet. In other words, a given sl_rail_handle_t can maintain a very low priority background receive, but upon getting a SL_RAIL_EVENT_RX_SYNC_0_DETECT_SHIFT or SL_RAIL_EVENT_RX_SYNC_1_DETECT_SHIFT event, the app can call this function to increase the background RX priority to lower the risk another protocol might preempt during packet reception.
sl_rail_get_transition_time#
sl_rail_time_t sl_rail_get_transition_time (sl_rail_handle_t radio_handle)
Get the time needed to switch between protocols.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_rail_handle_t | [in] | radio_handle | A radio-generic RAIL handle. |
Returns
sl_rail_time_t Time, in microseconds, needed to switch between protocols.
Note
This API provides an accurate transition time by accounting for system overhead. The transition time determines how early the scheduler starts processing a protocol switch relative to a scheduled event.
sl_rail_set_transition_time#
sl_rail_status_t sl_rail_set_transition_time (sl_rail_handle_t radio_handle, sl_rail_time_t transition_time_us)
Set the time needed to switch between protocols.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_rail_handle_t | [in] | radio_handle | A radio-generic RAIL handle. |
| sl_rail_time_t | [in] | transition_time_us | Time, in microseconds, needed to switch between protocols. |
Call this API only once, before any protocol is initialized via sl_rail_init(). Changing this value during normal operation can result in improper scheduling behavior.
Returns
Status code indicating success of the function call.
Note
This API provides an accurate transition time by accounting for system overhead. The transition time determines how early the scheduler starts processing a protocol switch relative to a scheduled event. Setting this value too low may cause scheduling issues or missed events.