3.26.1 System Driver
Overview
System Driver is used to initialize various System drivers like Clock, Pin, Interrupt and other Peripheral Drivers which are added to the Project. Initialization is done through SYSTEM_Initialize function which in turn calls the initialization function of all the drivers added in the project. Application(main.c) should call SYSTEM_Initialize.
3.26.1.1 Module Documentation
3.26.1.1.1 System Driver
System driver using dsPIC MCUs.
Module description
System driver using dsPIC MCUs.
Driver Version 1.0.1 |
Enumerations
enum CORCON_MODE_TYPE { CORCON_MODE_PORVALUES = 0x0020, CORCON_MODE_ENABLEALLSATNORMAL_ROUNDBIASED = 0x00E2, CORCON_MODE_ENABLEALLSATNORMAL_ROUNDUNBIASED = 0x00E0, CORCON_MODE_DISABLEALLSAT_ROUNDBIASED = 0x0022, CORCON_MODE_DISABLEALLSAT_ROUNDUNBIASED = 0x0020, CORCON_MODE_ENABLEALLSATSUPER_ROUNDBIASED = 0x00F2, CORCON_MODE_ENABLEALLSATSUPER_ROUNDUNBIASED = 0x00F0 }
CORCON initialization type enumerator.
Functions
void SYSTEM_Initialize (void)
Initializes the System module.
static void SYSTEM_CORCONInitialize ()
Initializes the CPU core control register.
static void SYSTEM_CORCONModeOperatingSet (SYSTEM_CORCON_MODES modeValue)
This inline function sets the CPU core control register operating mode to a value that is decided by the SYSTEM_CORCON_MODES argument.
static void SYSTEM_CORCONRegisterValueSet (uint16_t value)
This inline function sets the value of CPU core control register.
static uint16_t SYSTEM_CORCONRegisterValueGet (void)
This inline function gets the value of CPU core control register.
static uint32_t SYSTEM_DeviceIdRegisterAddressGet (void)
This inline function gets the base address of the DEVID register for the currently selected device.
Function Documentation
SYSTEM_CORCONInitialize()
inline static void SYSTEM_CORCONInitialize ( )
Initializes the CPU core control register.
SYSTEM_CORCONModeOperatingSet()
inline static void SYSTEM_CORCONModeOperatingSet (SYSTEM_CORCON_MODES modeValue)
This inline function sets the CPU core control register operating mode to a value that is decided by the SYSTEM_CORCON_MODES argument.
in | modeValue |
- SYSTEM_CORCON_MODES initialization mode specifier |
none |
SYSTEM_CORCONRegisterValueGet()
inline static uint16_t SYSTEM_CORCONRegisterValueGet (void )
This inline function gets the value of CPU core control register.
SYSTEM_CORCONRegisterValueSet()
inline static void SYSTEM_CORCONRegisterValueSet (uint16_t value)
This inline function sets the value of CPU core control register.
in | value |
- value that needs to be written to the CPU core control register |
none |
SYSTEM_DeviceIdRegisterAddressGet()
inline static uint32_t SYSTEM_DeviceIdRegisterAddressGet (void )
This inline function gets the base address of the DEVID register for the currently selected device.
SYSTEM_Initialize()
void SYSTEM_Initialize (void )
Initializes the System module.
Enumeration Type Documentation
CORCON_MODE_TYPE
enum CORCON_MODE_TYPE
CORCON initialization type enumerator.
Section: Type defines
CORCON_MODE_PORVALUES |
Use POR values of CORCON |
CORCON_MODE_ENABLEALLSATNORMAL_ROUNDBIASED |
Enable saturation for ACCA, ACCB and Dataspace write, enable normal ACCA/ACCB saturation mode and set rounding to Biased (conventional) mode. Rest of CORCON settings are set to the default POR values. |
CORCON_MODE_ENABLEALLSATNORMAL_ROUNDUNBIASED |
Enable saturation for ACCA, ACCB and Dataspace write, enable normal ACCA/ACCB saturation mode and set rounding to Unbiased (convergent) mode. Rest of CORCON settings are set to the default POR values. |
CORCON_MODE_DISABLEALLSAT_ROUNDBIASED |
Disable saturation for ACCA, ACCB and Dataspace write and set rounding to Biased (conventional) mode. Rest of CORCON settings are set to the default POR values. |
CORCON_MODE_DISABLEALLSAT_ROUNDUNBIASED |
Disable saturation for ACCA, ACCB and Dataspace write and set rounding to Unbiased (convergent) mode. Rest of CORCON settings are set to the default POR values. |
CORCON_MODE_ENABLEALLSATSUPER_ROUNDBIASED |
Enable saturation for ACCA, ACCB and Dataspace write, enable super ACCA/ACCB saturation mode and set rounding to Biased (conventional) mode. Rest of CORCON settings are set to the default POR values. |
CORCON_MODE_ENABLEALLSATSUPER_ROUNDUNBIASED |
Enable saturation for ACCA, ACCB and Dataspace write, enable super ACCA/ACCB saturation mode and set rounding to Unbiased (convergent) mode. Rest of CORCON settings are set to the default POR values. |
3.26.1.2 File Documentation
3.26.1.2.1 source/system.h File Reference
#include "xc.h" #include "stdint.h" #include "system_types.h"
Functions
void SYSTEM_Initialize (void)
Initializes the System module.
static void SYSTEM_CORCONInitialize ()
Initializes the CPU core control register.
static void SYSTEM_CORCONModeOperatingSet (SYSTEM_CORCON_MODES modeValue)
This inline function sets the CPU core control register operating mode to a value that is decided by the SYSTEM_CORCON_MODES argument.
static void SYSTEM_CORCONRegisterValueSet (uint16_t value)
This inline function sets the value of CPU core control register.
static uint16_t SYSTEM_CORCONRegisterValueGet (void)
This inline function gets the value of CPU core control register.
static uint32_t SYSTEM_DeviceIdRegisterAddressGet (void)
This inline function gets the base address of the DEVID register for the currently selected device.
Macros
#define SYSTEM_H
Detailed Description
MAIN Generated Driver Header File
Macro Definition Documentation
SYSTEM_H
#define SYSTEM_H
3.26.1.2.2 source/system_types.h File Reference
This is the generated driver types header file for the System driver.
Typedefs
typedef enum CORCON_MODE_TYPE SYSTEM_CORCON_MODES
Enumerations
enum CORCON_MODE_TYPE { CORCON_MODE_PORVALUES = 0x0020, CORCON_MODE_ENABLEALLSATNORMAL_ROUNDBIASED = 0x00E2, CORCON_MODE_ENABLEALLSATNORMAL_ROUNDUNBIASED = 0x00E0, CORCON_MODE_DISABLEALLSAT_ROUNDBIASED = 0x0022, CORCON_MODE_DISABLEALLSAT_ROUNDUNBIASED = 0x0020, CORCON_MODE_ENABLEALLSATSUPER_ROUNDBIASED = 0x00F2, CORCON_MODE_ENABLEALLSATSUPER_ROUNDUNBIASED = 0x00F0 }
CORCON initialization type enumerator.
Detailed Description
This is the generated driver types header file for the System driver.
MAIN Generated Driver Types Header File
Driver Version 1.0.1 |
Typedef Documentation
SYSTEM_CORCON_MODES
typedef enum CORCON_MODE_TYPE SYSTEM_CORCON_MODES