MCUXpresso SDK API Reference Manual  Rev 2.15.000
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

Overview

Macros

#define FSL_OSA_BM_TIMER_NONE   0U
 Bare Metal does not use timer. More...
 
#define FSL_OSA_BM_TIMER_SYSTICK   1U
 Bare Metal uses SYSTICK as timer. More...
 
#define FSL_OSA_BM_TIMER_CONFIG   FSL_OSA_BM_TIMER_NONE
 Configure what timer is used in Bare Metal. More...
 
#define OSA_WAIT_FOREVER   0xFFFFFFFFU
 Constant to pass as timeout value in order to wait indefinitely. More...
 
#define TASK_MAX_NUM   7
 How many tasks can the bare metal support. More...
 
#define FSL_OSA_TIME_RANGE   0xFFFFFFFFU
 OSA's time range in millisecond, OSA time wraps if exceeds this value. More...
 
#define OSA_DEFAULT_INT_HANDLER   ((osa_int_handler_t)(&DefaultISR))
 The default interrupt handler installed in vector table. More...
 

Typedefs

typedef void * task_param_t
 Type for task parameter.
 
typedef uint32_t event_flags_t
 Type for an event flags group, bit 32 is reserved.
 

Functions

void DefaultISR (void)
 The default interrupt handler installed in vector table. More...
 
void OSA_ProcessTasks (void)
 Process OSA tasks. More...
 
uint8_t OSA_TaskShouldYield (void)
 Check OSA Task Should Yield. More...
 
void OSA_UpdateSysTickCounter (uint32_t corr)
 Correct OSA tick counter for when exiting sleep. More...
 

Thread management

#define PRIORITY_OSA_TO_RTOS(osa_prio)   (osa_prio)
 To provide unified priority for upper layer, OSA layer makes conversation.
 
#define PRIORITY_RTOS_TO_OSA(rtos_prio)   (rtos_prio)
 

Macro Definition Documentation

#define FSL_OSA_BM_TIMER_NONE   0U
#define FSL_OSA_BM_TIMER_SYSTICK   1U
#define FSL_OSA_BM_TIMER_CONFIG   FSL_OSA_BM_TIMER_NONE
#define OSA_WAIT_FOREVER   0xFFFFFFFFU
#define TASK_MAX_NUM   7
#define FSL_OSA_TIME_RANGE   0xFFFFFFFFU
#define OSA_DEFAULT_INT_HANDLER   ((osa_int_handler_t)(&DefaultISR))

Function Documentation

void DefaultISR ( void  )
void OSA_ProcessTasks ( void  )

This function is used to process registered tasks.

Example below shows how to use this API in baremetal.

* while(1) {
* }
*
uint8_t OSA_TaskShouldYield ( void  )

This function is used to check task should yield, When this function returns 1, an OSA task has to run. This function is typically used with Interrupt disabled before executing WFI instruction.

void OSA_UpdateSysTickCounter ( uint32_t  corr)

This function allows the tick counter used by the OSA functions for time keeping to be corrected with the sleep duration (taken from a low power timer. This is available only in BM context and only if the systick is used as a time source for the OSA.