Loading [MathJax]/extensions/tex2jax.js
XMC Peripheral Library for XMC1000 Family
All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
Peripheral Access Unit (PAU)

Data Structures

struct  XMC_PAU_t
 

Macros

#define XMC_PAU   ((XMC_PAU_t *) PAU_BASE)
 

Enumerations

enum  XMC_PAU_PERIPHERAL_t
 
enum  XMC_PAU_STATUS_t
 

Functions

void XMC_PAU_DisablePeripheralAccess (XMC_PAU_PERIPHERAL_t peripheral)
 
void XMC_PAU_EnablePeripheralAccess (XMC_PAU_PERIPHERAL_t peripheral)
 
uint32_t XMC_PAU_GetFlashSize (void)
 
uint32_t XMC_PAU_GetRAMSize (void)
 
uint32_t XMC_PAU_GetROMSize (void)
 
bool XMC_PAU_IsPeripheralAccessEnabled (XMC_PAU_PERIPHERAL_t peripheral)
 
bool XMC_PAU_IsPeripheralAvailable (XMC_PAU_PERIPHERAL_t peripheral)
 

Detailed Description

The Peripheral Access Unit (PAU) supports access control of memories and peripherals. It allows user application to enable/disable the access to the registers of a peripheral. It generates a HardFault exception when there is an access to a disabled or unassigned address location. It also provides information on the availability of peripherals and sizes of memories.

The PAU low level driver provides functions to check the availability of peripherals and to enable/disable peripheral access.

Macro Definition Documentation

◆ XMC_PAU

#define XMC_PAU   ((XMC_PAU_t *) PAU_BASE)

A convenient symbol for the PAU peripheral base address

Enumeration Type Documentation

◆ XMC_PAU_PERIPHERAL_t

PAU peripheral select

Enumerator
XMC_PAU_PERIPHERAL_FLASH 

Flash SFRs Privilege Disable Flag

XMC_PAU_PERIPHERAL_RAM_BLOCK1 

RAM Block 1 Privilege Disable Flag

XMC_PAU_PERIPHERAL_RAM_BLOCK2 

RAM Block 2 Privilege Disable Flag

XMC_PAU_PERIPHERAL_RAM_BLOCK3 

RAM Block 3 Privilege Disable Flag

XMC_PAU_PERIPHERAL_MATH_GLOBAL_AND_DIV 

MATH Global SFRs and Divider Privilege Disable Flag

XMC_PAU_PERIPHERAL_MATH_CORDIC 

MATH CORDIC Privilege Disable Flag

XMC_PAU_PERIPHERAL_USIC0_CH0 

USIC0 Channel 0 Privilege Disable Flag

XMC_PAU_PERIPHERAL_USIC0_CH1 

USIC0 Channel 1 Privilege Disable Flag

XMC_PAU_PERIPHERAL_USIC1_CH0 

USIC1 Channel 0 Privilege Disable Flag

XMC_PAU_PERIPHERAL_USIC1_CH1 

USIC1 Channel 1 Privilege Disable Flag

XMC_PAU_PERIPHERAL_PRNG 

PRNG Availability Flag

XMC_PAU_PERIPHERAL_CCU40_CC40_AND_GLOBAL 

CCU40_CC40 and CCU40 Kernel SFRs Privilege Disable Flag

XMC_PAU_PERIPHERAL_CCU41_CC40_AND_GLOBAL 

CCU41_CC40 and CCU41 Kernel SFRs Privilege Disable Flag

XMC_PAU_PERIPHERAL_CCU80_CC80_AND_GLOBAL 

CCU80_CC80 and CCU80 Kernel SFRs Privilege Disable Flag

XMC_PAU_PERIPHERAL_CCU81_CC80_AND_GLOBAL 

CCU81_CC80 and CCU81 Kernel SFRs Privilege Disable Flag

XMC_PAU_PERIPHERAL_POSIF0 

POSIF0 Privilege Disable Flag

XMC_PAU_PERIPHERAL_POSIF1 

POSIF1 Privilege Disable Flag

XMC_PAU_PERIPHERAL_LEDTS0 

LEDTS0 Privilege Disable Flag

XMC_PAU_PERIPHERAL_LEDTS1 

LEDTS1 Privilege Disable Flag

XMC_PAU_PERIPHERAL_LEDTS2 

LEDTS2 Privilege Disable Flag

XMC_PAU_PERIPHERAL_BCCU0 

BCCU0 Privilege Disable Flag

XMC_PAU_PERIPHERAL_MCAN_OBJECTS 

MCAN Message Objects Privilege Disable Flag

◆ XMC_PAU_STATUS_t

Status return values for PAU low level driver

Enumerator
XMC_PAU_STATUS_OK 

Operation successful

XMC_PAU_STATUS_BUSY 

Busy with a previous request

XMC_PAU_STATUS_ERROR 

Operation unsuccessful

Function Documentation

◆ XMC_PAU_DisablePeripheralAccess()

void XMC_PAU_DisablePeripheralAccess ( XMC_PAU_PERIPHERAL_t  peripheral)
Parameters
peripheralPeripheral of type XMC_PAU_PERIPHERAL_t for which access needs to be disabled
Returns
None
Description:
Disable the peripheral access
The function sets the PRIVDISx.PDISy bit to disable the access to the registers of a peripheral during run time. An access to a disabled or unassigned address location generates a hardfault exception.
Related APIs:
XMC_PAU_EnablePeripheralAccess()

◆ XMC_PAU_EnablePeripheralAccess()

void XMC_PAU_EnablePeripheralAccess ( XMC_PAU_PERIPHERAL_t  peripheral)
Parameters
peripheralPeripheral of type XMC_PAU_PERIPHERAL_t for which access needs to be enabled
Returns
None
Description:
Enable the peripheral access
The function resets the PRIVDISx.PDISy bit to enable the access to the registers of a peripheral during run time.
Related APIs:
XMC_PAU_DisablePeripheralAccess()

◆ XMC_PAU_GetFlashSize()

uint32_t XMC_PAU_GetFlashSize ( void  )
Returns
uint32_t Returns flash size
Description:
Gets the flash size
The function checks the FLSIZE.ADDR bitfield to indicate the available size of FLASH in the device in Kbytes.

◆ XMC_PAU_GetRAMSize()

uint32_t XMC_PAU_GetRAMSize ( void  )
Returns
uint32_t Returns RAM size
Description:
Gets RAM size
The function checks the RAM0SIZE.ADDR bitfield to indicate the available size of RAM in the device in bytes.

◆ XMC_PAU_GetROMSize()

uint32_t XMC_PAU_GetROMSize ( void  )
Returns
uint32_t Returns ROM size
Description:
Gets the ROM size
The function checks the ROMSIZE.ADDR bitfield to indicate the available size of ROM in the device in bytes.

◆ XMC_PAU_IsPeripheralAccessEnabled()

bool XMC_PAU_IsPeripheralAccessEnabled ( XMC_PAU_PERIPHERAL_t  peripheral)
Parameters
peripheralPeripheral of type XMC_PAU_PERIPHERAL_t for which access enabled status to be checked
Returns
bool "false" if peripheral access is enabled, "true" otherwise
Description:
Checks if the peripheral access is enabled or not
The function checks the PRIVDISx.PDISy bit to know whether the access to the registers of a peripheral during run time is enabled or not.
Related APIs:
XMC_PAU_DisablePeripheralAccess(), XMC_PAU_EnablePeripheralAccess()

◆ XMC_PAU_IsPeripheralAvailable()

bool XMC_PAU_IsPeripheralAvailable ( XMC_PAU_PERIPHERAL_t  peripheral)
Parameters
peripheralPeripheral of type XMC_PAU_PERIPHERAL_t for which access needs to be disabled
Returns
bool Returns "true" if peripheral is available, "false" otherwise
Description:
Checks if a peripheral is available or not
The function checks the AVAILx.AVAILy bit to know whether the peripheral is available or not for the particular device variant.