STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
port.c File Reference
#include "FreeRTOS.h"
#include "task.h"
Include dependency graph for port.c:

Go to the source code of this file.

Macros

#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_SHPR3_REG   ( *( ( volatile uint32_t * ) 0xe000ed20 ) )
#define portNVIC_SYSTICK_CLK_BIT   ( 1UL << 2UL )
#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_SET_BIT   ( 1UL << 26UL )
#define portNVIC_PEND_SYSTICK_CLEAR_BIT   ( 1UL << 25UL )
#define portCPUID   ( *( ( volatile uint32_t * ) 0xE000ed00 ) )
#define portCORTEX_M7_r0p1_ID   ( 0x410FC271UL )
#define portCORTEX_M7_r0p0_ID   ( 0x410FC270UL )
#define portMIN_INTERRUPT_PRIORITY   ( 255UL )
#define portNVIC_PENDSV_PRI   ( ( ( uint32_t ) portMIN_INTERRUPT_PRIORITY ) << 16UL )
#define portNVIC_SYSTICK_PRI   ( ( ( uint32_t ) portMIN_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 portFPCCR   ( ( volatile uint32_t * ) 0xe000ef34 ) /* Floating point context control register. */
#define portASPEN_AND_LSPEN_BITS   ( 0x3UL << 30UL )
#define portINITIAL_XPSR   ( 0x01000000 )
#define portINITIAL_EXC_RETURN   ( 0xfffffffd )
#define portMAX_24_BIT_NUMBER   ( 0xffffffUL )
#define portSTART_ADDRESS_MASK   ( ( StackType_t ) 0xfffffffeUL )
#define portMISSED_COUNTS_FACTOR   ( 94UL )
#define configSYSTICK_CLOCK_HZ   ( configCPU_CLOCK_HZ )
#define portNVIC_SYSTICK_CLK_BIT_CONFIG   ( portNVIC_SYSTICK_CLK_BIT )
#define portTASK_RETURN_ADDRESS   prvTaskExitError

Functions

void vPortSetupTimerInterrupt (void)
void xPortPendSVHandler (void xPortSysTickHandler void)
static void prvTaskExitError (void)
void vPortSVCHandler (void)
static void prvPortStartFirstTask (void)
BaseType_t xPortStartScheduler (void)
void vPortEndScheduler (void)
void vPortEnterCritical (void)
void vPortExitCritical (void)
void xPortPendSVHandler (void)
void xPortSysTickHandler (void)
 __attribute__ ((weak))
static void vPortEnableVFP (void)

Macro Definition Documentation

◆ configSYSTICK_CLOCK_HZ

#define configSYSTICK_CLOCK_HZ   ( configCPU_CLOCK_HZ )

Definition at line 102 of file port.c.

Referenced by __attribute__().

◆ portAIRCR_REG

#define portAIRCR_REG   ( *( ( volatile uint32_t * ) 0xE000ED0C ) )

Definition at line 68 of file port.c.

◆ portASPEN_AND_LSPEN_BITS

#define portASPEN_AND_LSPEN_BITS   ( 0x3UL << 30UL )

Definition at line 80 of file port.c.

Referenced by xPortStartScheduler().

◆ portCORTEX_M7_r0p0_ID

#define portCORTEX_M7_r0p0_ID   ( 0x410FC270UL )

Definition at line 59 of file port.c.

Referenced by xPortStartScheduler().

◆ portCORTEX_M7_r0p1_ID

#define portCORTEX_M7_r0p1_ID   ( 0x410FC271UL )

Definition at line 58 of file port.c.

Referenced by xPortStartScheduler().

◆ portCPUID

#define portCPUID   ( *( ( volatile uint32_t * ) 0xE000ed00 ) )

Definition at line 57 of file port.c.

Referenced by xPortStartScheduler().

◆ portFIRST_USER_INTERRUPT_NUMBER

#define portFIRST_USER_INTERRUPT_NUMBER   ( 16 )

Definition at line 66 of file port.c.

Referenced by xPortStartScheduler().

◆ portFPCCR

#define portFPCCR   ( ( volatile uint32_t * ) 0xe000ef34 ) /* Floating point context control register. */

Definition at line 79 of file port.c.

Referenced by xPortStartScheduler().

◆ portINITIAL_EXC_RETURN

#define portINITIAL_EXC_RETURN   ( 0xfffffffd )

Definition at line 84 of file port.c.

Referenced by xPortPendSVHandler().

◆ portINITIAL_XPSR

#define portINITIAL_XPSR   ( 0x01000000 )

Definition at line 83 of file port.c.

Referenced by xPortPendSVHandler().

◆ portMAX_24_BIT_NUMBER

#define portMAX_24_BIT_NUMBER   ( 0xffffffUL )

Definition at line 87 of file port.c.

Referenced by __attribute__().

◆ portMAX_8_BIT_VALUE

#define portMAX_8_BIT_VALUE   ( ( uint8_t ) 0xff )

Definition at line 69 of file port.c.

Referenced by xPortStartScheduler().

◆ portMAX_PRIGROUP_BITS

#define portMAX_PRIGROUP_BITS   ( ( uint8_t ) 7 )

Definition at line 71 of file port.c.

Referenced by xPortStartScheduler().

◆ portMIN_INTERRUPT_PRIORITY

#define portMIN_INTERRUPT_PRIORITY   ( 255UL )

Definition at line 61 of file port.c.

◆ portMISSED_COUNTS_FACTOR

#define portMISSED_COUNTS_FACTOR   ( 94UL )

Definition at line 96 of file port.c.

Referenced by __attribute__().

◆ portNVIC_IP_REGISTERS_OFFSET_16

#define portNVIC_IP_REGISTERS_OFFSET_16   ( 0xE000E3F0 )

Definition at line 67 of file port.c.

Referenced by xPortPendSVHandler(), and xPortStartScheduler().

◆ portNVIC_PEND_SYSTICK_CLEAR_BIT

#define portNVIC_PEND_SYSTICK_CLEAR_BIT   ( 1UL << 25UL )

Definition at line 53 of file port.c.

◆ portNVIC_PEND_SYSTICK_SET_BIT

#define portNVIC_PEND_SYSTICK_SET_BIT   ( 1UL << 26UL )

Definition at line 52 of file port.c.

◆ portNVIC_PENDSV_PRI

#define portNVIC_PENDSV_PRI   ( ( ( uint32_t ) portMIN_INTERRUPT_PRIORITY ) << 16UL )

Definition at line 62 of file port.c.

Referenced by xPortStartScheduler().

◆ portNVIC_PENDSVCLEAR_BIT

#define portNVIC_PENDSVCLEAR_BIT   ( 1UL << 27UL )

Definition at line 51 of file port.c.

◆ portNVIC_SHPR3_REG

#define portNVIC_SHPR3_REG   ( *( ( volatile uint32_t * ) 0xe000ed20 ) )

Definition at line 45 of file port.c.

Referenced by xPortStartScheduler().

◆ portNVIC_SYSTICK_CLK_BIT

#define portNVIC_SYSTICK_CLK_BIT   ( 1UL << 2UL )

Definition at line 47 of file port.c.

◆ portNVIC_SYSTICK_CLK_BIT_CONFIG

#define portNVIC_SYSTICK_CLK_BIT_CONFIG   ( portNVIC_SYSTICK_CLK_BIT )

Definition at line 104 of file port.c.

Referenced by __attribute__().

◆ portNVIC_SYSTICK_COUNT_FLAG_BIT

#define portNVIC_SYSTICK_COUNT_FLAG_BIT   ( 1UL << 16UL )

Definition at line 50 of file port.c.

◆ portNVIC_SYSTICK_CTRL_REG

#define portNVIC_SYSTICK_CTRL_REG   ( *( ( volatile uint32_t * ) 0xe000e010 ) )

Definition at line 42 of file port.c.

Referenced by __attribute__().

◆ portNVIC_SYSTICK_CURRENT_VALUE_REG

#define portNVIC_SYSTICK_CURRENT_VALUE_REG   ( *( ( volatile uint32_t * ) 0xe000e018 ) )

Definition at line 44 of file port.c.

Referenced by __attribute__().

◆ portNVIC_SYSTICK_ENABLE_BIT

#define portNVIC_SYSTICK_ENABLE_BIT   ( 1UL << 0UL )

Definition at line 49 of file port.c.

Referenced by __attribute__().

◆ portNVIC_SYSTICK_INT_BIT

#define portNVIC_SYSTICK_INT_BIT   ( 1UL << 1UL )

Definition at line 48 of file port.c.

Referenced by __attribute__().

◆ portNVIC_SYSTICK_LOAD_REG

#define portNVIC_SYSTICK_LOAD_REG   ( *( ( volatile uint32_t * ) 0xe000e014 ) )

Definition at line 43 of file port.c.

Referenced by __attribute__().

◆ portNVIC_SYSTICK_PRI

#define portNVIC_SYSTICK_PRI   ( ( ( uint32_t ) portMIN_INTERRUPT_PRIORITY ) << 24UL )

Definition at line 63 of file port.c.

Referenced by xPortStartScheduler().

◆ portPRIGROUP_SHIFT

#define portPRIGROUP_SHIFT   ( 8UL )

Definition at line 73 of file port.c.

Referenced by xPortStartScheduler().

◆ portPRIORITY_GROUP_MASK

#define portPRIORITY_GROUP_MASK   ( 0x07UL << 8UL )

Definition at line 72 of file port.c.

Referenced by xPortStartScheduler().

◆ portSTART_ADDRESS_MASK

#define portSTART_ADDRESS_MASK   ( ( StackType_t ) 0xfffffffeUL )

Definition at line 91 of file port.c.

Referenced by xPortPendSVHandler().

◆ portTASK_RETURN_ADDRESS

#define portTASK_RETURN_ADDRESS   prvTaskExitError

Definition at line 116 of file port.c.

Referenced by xPortPendSVHandler().

◆ portTOP_BIT_OF_BYTE

#define portTOP_BIT_OF_BYTE   ( ( uint8_t ) 0x80 )

Definition at line 70 of file port.c.

Referenced by xPortStartScheduler().

◆ portVECTACTIVE_MASK

#define portVECTACTIVE_MASK   ( 0xFFUL )

Definition at line 76 of file port.c.

Referenced by vPortEnterCritical().

Function Documentation

◆ __attribute__()

◆ prvPortStartFirstTask()

void prvPortStartFirstTask ( void )
static

Definition at line 270 of file port.c.

Referenced by xPortStartScheduler().

◆ prvTaskExitError()

void prvTaskExitError ( void )
static

Definition at line 225 of file port.c.

References configASSERT, and portDISABLE_INTERRUPTS.

Referenced by xPortStartScheduler().

◆ vPortEnableVFP()

void vPortEnableVFP ( void )
static

Definition at line 784 of file port.c.

Referenced by xPortStartScheduler().

◆ vPortEndScheduler()

void vPortEndScheduler ( void )

Definition at line 423 of file port.c.

References configASSERT.

Referenced by vTaskEndScheduler().

◆ vPortEnterCritical()

void vPortEnterCritical ( void )

◆ vPortExitCritical()

void vPortExitCritical ( void )

Definition at line 448 of file port.c.

References configASSERT, and portENABLE_INTERRUPTS.

◆ vPortSetupTimerInterrupt()

void vPortSetupTimerInterrupt ( void )

Referenced by xPortStartScheduler().

◆ vPortSVCHandler()

void vPortSVCHandler ( void )

Definition at line 251 of file port.c.

◆ xPortPendSVHandler() [1/2]

◆ xPortPendSVHandler() [2/2]

void xPortPendSVHandler ( void )

Definition at line 460 of file port.c.

References configMAX_SYSCALL_INTERRUPT_PRIORITY.

◆ xPortStartScheduler()

◆ xPortSysTickHandler()

void xPortSysTickHandler ( void )