port.c File Reference
#include "FreeRTOS.h"
#include "task.h"
Include dependency graph for port.c:

Macros

#define configKERNEL_INTERRUPT_PRIORITY   255
 
#define configSYSTICK_CLOCK_HZ   configCPU_CLOCK_HZ
 
#define portNVIC_SYSTICK_CLK_BIT   ( 1UL << 2UL )
 
#define portNVIC_SYSTICK_CTRL_REG   ( * ( ( volatile uint32_t * ) 0xe000e010 ) )
 
#define portNVIC_SYSTICK_LOAD_REG   ( * ( ( volatile uint32_t * ) 0xe000e014 ) )
 
#define portNVIC_SYSTICK_CURRENT_VALUE_REG   ( * ( ( volatile uint32_t * ) 0xe000e018 ) )
 
#define portNVIC_SYSPRI2_REG   ( * ( ( volatile uint32_t * ) 0xe000ed20 ) )
 
#define portNVIC_SYSTICK_INT_BIT   ( 1UL << 1UL )
 
#define portNVIC_SYSTICK_ENABLE_BIT   ( 1UL << 0UL )
 
#define portNVIC_SYSTICK_COUNT_FLAG_BIT   ( 1UL << 16UL )
 
#define portNVIC_PENDSVCLEAR_BIT   ( 1UL << 27UL )
 
#define portNVIC_PEND_SYSTICK_CLEAR_BIT   ( 1UL << 25UL )
 
#define portNVIC_PENDSV_PRI   ( ( ( uint32_t ) configKERNEL_INTERRUPT_PRIORITY ) << 16UL )
 
#define portNVIC_SYSTICK_PRI   ( ( ( uint32_t ) configKERNEL_INTERRUPT_PRIORITY ) << 24UL )
 
#define portFIRST_USER_INTERRUPT_NUMBER   ( 16 )
 
#define portNVIC_IP_REGISTERS_OFFSET_16   ( 0xE000E3F0 )
 
#define portAIRCR_REG   ( * ( ( volatile uint32_t * ) 0xE000ED0C ) )
 
#define portMAX_8_BIT_VALUE   ( ( uint8_t ) 0xff )
 
#define portTOP_BIT_OF_BYTE   ( ( uint8_t ) 0x80 )
 
#define portMAX_PRIGROUP_BITS   ( ( uint8_t ) 7 )
 
#define portPRIORITY_GROUP_MASK   ( 0x07UL << 8UL )
 
#define portPRIGROUP_SHIFT   ( 8UL )
 
#define portVECTACTIVE_MASK   ( 0xFFUL )
 
#define portINITIAL_XPSR   ( 0x01000000UL )
 
#define portMAX_24_BIT_NUMBER   ( 0xffffffUL )
 
#define portMISSED_COUNTS_FACTOR   ( 45UL )
 
#define portSTART_ADDRESS_MASK   ( ( StackType_t ) 0xfffffffeUL )
 
#define portTASK_RETURN_ADDRESS   prvTaskExitError
 

Functions

void vPortSetupTimerInterrupt (void)
 
void xPortPendSVHandler (void xPortSysTickHandler void)
 
void vPortSVCHandler (void)
 OS "supervisor" call to start first FreeRTOS task. More...
 
BaseType_t xPortStartScheduler (void)
 
void vPortEndScheduler (void)
 
void vPortEnterCritical (void)
 
void vPortExitCritical (void)
 
void xPortPendSVHandler (void)
 Context switch is performed using this interrupt. More...
 
void xPortSysTickHandler (void)
 OS timer or tick interrupt (for time slicing tasks) More...
 
 __attribute__ ((weak))
 

Macro Definition Documentation

#define configKERNEL_INTERRUPT_PRIORITY   255
#define configSYSTICK_CLOCK_HZ   configCPU_CLOCK_HZ
#define portAIRCR_REG   ( * ( ( volatile uint32_t * ) 0xE000ED0C ) )
#define portFIRST_USER_INTERRUPT_NUMBER   ( 16 )
#define portINITIAL_XPSR   ( 0x01000000UL )
#define portMAX_24_BIT_NUMBER   ( 0xffffffUL )
#define portMAX_8_BIT_VALUE   ( ( uint8_t ) 0xff )
#define portMAX_PRIGROUP_BITS   ( ( uint8_t ) 7 )
#define portMISSED_COUNTS_FACTOR   ( 45UL )
#define portNVIC_IP_REGISTERS_OFFSET_16   ( 0xE000E3F0 )
#define portNVIC_PEND_SYSTICK_CLEAR_BIT   ( 1UL << 25UL )
#define portNVIC_PENDSV_PRI   ( ( ( uint32_t ) configKERNEL_INTERRUPT_PRIORITY ) << 16UL )
#define portNVIC_PENDSVCLEAR_BIT   ( 1UL << 27UL )
#define portNVIC_SYSPRI2_REG   ( * ( ( volatile uint32_t * ) 0xe000ed20 ) )
#define portNVIC_SYSTICK_CLK_BIT   ( 1UL << 2UL )
#define portNVIC_SYSTICK_COUNT_FLAG_BIT   ( 1UL << 16UL )
#define portNVIC_SYSTICK_CTRL_REG   ( * ( ( volatile uint32_t * ) 0xe000e010 ) )
#define portNVIC_SYSTICK_CURRENT_VALUE_REG   ( * ( ( volatile uint32_t * ) 0xe000e018 ) )
#define portNVIC_SYSTICK_ENABLE_BIT   ( 1UL << 0UL )
#define portNVIC_SYSTICK_INT_BIT   ( 1UL << 1UL )
#define portNVIC_SYSTICK_LOAD_REG   ( * ( ( volatile uint32_t * ) 0xe000e014 ) )
#define portNVIC_SYSTICK_PRI   ( ( ( uint32_t ) configKERNEL_INTERRUPT_PRIORITY ) << 24UL )
#define portPRIGROUP_SHIFT   ( 8UL )
#define portPRIORITY_GROUP_MASK   ( 0x07UL << 8UL )
#define portSTART_ADDRESS_MASK   ( ( StackType_t ) 0xfffffffeUL )
#define portTASK_RETURN_ADDRESS   prvTaskExitError
#define portTOP_BIT_OF_BYTE   ( ( uint8_t ) 0x80 )
#define portVECTACTIVE_MASK   ( 0xFFUL )

Function Documentation

__attribute__ ( (weak)  )
void vPortEndScheduler ( void  )
void vPortEnterCritical ( void  )
void vPortExitCritical ( void  )
void vPortSetupTimerInterrupt ( void  )
void vPortSVCHandler ( void  )

OS "supervisor" call to start first FreeRTOS task.

void xPortPendSVHandler ( void xPortSysTickHandler  void)
void xPortPendSVHandler ( void  )

Context switch is performed using this interrupt.

BaseType_t xPortStartScheduler ( void  )
void xPortSysTickHandler ( void  )

OS timer or tick interrupt (for time slicing tasks)

FreeRTOS Interrupt Handlers