Digital Power Starter Kit 3 Firmware
dsPIC33C Boost Converter Voltage Mode Control Example
+ Collaboration diagram for Operating System Time Base:
volatile uint16_t sysOsTimer_Initialize (void)
 
volatile uint16_t sysOsTimer_Enable (volatile bool interrupt_enable, volatile uint8_t interrupt_priority)
 

Detailed Description

A simple 16-bit timer is used to generate the time base of the operating system. This timer is set to overflow after the time period specified by MAIN_EXECUTION_PERIOD in the hardware abstraction layer. This time period is used to pace the high- and low priority task sequences of the main program.

Two public functions are provided to initialize the time base, configuring its desired period as well as setting up the interrupt priority of the high priority task sequence execution, and an ENABLE function, enabling the high priority task sequence execution interrupt.

Once the OS Timer and its interrupts are enabled, the main program will start to execute the user tasks with their respective priority and in their given order.

Function Documentation

◆ sysOsTimer_Enable()

volatile uint16_t sysOsTimer_Enable ( volatile bool  interrupt_enable,
volatile uint8_t  interrupt_priority 
)

Definition at line 81 of file init_timer1.c.

◆ sysOsTimer_Initialize()

volatile uint16_t sysOsTimer_Initialize ( void  )

The internal PLL is set up to operate the CPU at maximum speed of 100 MIPS (100 MHz instruction cycle).

Definition at line 40 of file init_timer1.c.