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.

Version:

Driver Version 1.0.1

Functions

Function Documentation

SYSTEM_CORCONInitialize()

inline static void SYSTEM_CORCONInitialize ( )

Initializes the CPU core control register.

Returns:
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.

Parameters:
in modeValue

- SYSTEM_CORCON_MODES initialization mode specifier

Returns:

none

SYSTEM_CORCONRegisterValueGet()

inline static uint16_t SYSTEM_CORCONRegisterValueGet (void )

This inline function gets the value of CPU core control register.

Returns:
SYSTEM_CORCONRegisterValueSet()

inline static void SYSTEM_CORCONRegisterValueSet (uint16_t value)

This inline function sets the value of CPU core control register.

Parameters:
in value

- value that needs to be written to the CPU core control register

Returns:

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.

Returns:
SYSTEM_Initialize()

void SYSTEM_Initialize (void )

Initializes the System module.

Returns:

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

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.

Detailed Description

This is the generated driver types header file for the System driver.

MAIN Generated Driver Types Header File

Version:

Driver Version 1.0.1

Typedef Documentation

SYSTEM_CORCON_MODES

typedef enum CORCON_MODE_TYPE SYSTEM_CORCON_MODES