Digital Power Starter Kit 3 Firmware
dsPIC33C Boost Converter Voltage Mode Control Example
boot.c
1 /*
2  * File: boot.c
3  * Author: M91406
4  *
5  * Created on June 18, 2021, 3:41 PM
6  */
7 
8 
9 #include <xc.h> // include processor files - each processor file is guarded.
10 #include <stdint.h> // include standard integer data types
11 #include <stdbool.h> // include standard boolean data types
12 #include <stddef.h> // include standard definition data types
13 
14 /* INCLUDE DEFAULT SYSTEM COMPONENT INITIALIZATION MODULES */
15 #include "boot/rtos_dsp.h"
16 #include "boot/rtos_fosc.h"
17 #include "boot/rtos_gpio.h"
18 #include "boot/rtos_pmd.h"
19 
20 /***********************************************************************************
21  * @fn volatile uint16_t Boot(void)
22  * @ingroup operating-system-device-boot
23  * @brief Initializes essential chip resources
24  * @return unsigned integer (0=failure, 1=success)
25  *
26  * @details
27  * The Boot function covers the initialization of essential chip
28  * resources such as main oscillator, auxiliary oscillator, watchdog timer and
29  * general purpose I/Os (GPIO). All other, design specific peripherals are
30  * initialized in the User Peripheral Initialization or by the respective
31  * User Task Device Drivers included in the firmware project
32  *
33  **********************************************************************************/
34 
35 volatile uint16_t Boot(void)
36 {
37  volatile uint16_t retval=1;
38 
39  retval &= osFosc_Initialize();
40  retval &= osAclk_Initialize();
41  retval &= osGpio_Initialize();
42  retval &= osDsp_Initialize();
43 
44  return(retval);
45 }
46 
47 // end of file