GLOBAL_SCU_XMC1: GLOBAL_SCU_XMC1

GLOBAL_SCU_XMC1

GLOBAL_SCU_XMC1
GLOBAL_SCU_XMC1

Data Structures

struct  GLOBAL_SCU_XMC1_CONFIG
struct  GLOBAL_SCU_XMC1

Defines

#define GLOBAL_SCU_XMC1_EVENT_WDT_WARNING   XMC_SCU_INTERRUPT_EVENT_WDT_WARN
#define GLOBAL_SCU_XMC1_EVENT_RTC_PERIODIC   XMC_SCU_INTERRUPT_EVENT_RTC_PERIODIC
#define GLOBAL_SCU_XMC1_EVENT_RTC_ALARM   XMC_SCU_INTERRUPT_EVENT_RTC_ALARM
#define GLOBAL_SCU_XMC1_EVENT_VDDPI   XMC_SCU_INTERRUPT_EVENT_VDDPI
#define GLOBAL_SCU_XMC1_EVENT_VDROP   XMC_SCU_INTERRUPT_EVENT_VDROP
#define GLOBAL_SCU_XMC1_EVENT_LOCI   XMC_SCU_INTERRUPT_EVENT_LOCI
#define GLOBAL_SCU_XMC1_EVENT_PESRAM   XMC_SCU_INTERRUPT_EVENT_PESRAM
#define GLOBAL_SCU_XMC1_EVENT_PEUSIC0   XMC_SCU_INTERRUPT_EVENT_PEUSIC0
#define GLOBAL_SCU_XMC1_EVENT_FLASH_ERROR   XMC_SCU_INTERRUPT_EVENT_FLASH_ERROR
#define GLOBAL_SCU_XMC1_EVENT_FLASH_COMPLETED   XMC_SCU_INTERRUPT_EVENT_FLASH_COMPLETED
#define GLOBAL_SCU_XMC1_EVENT_VCLIP   XMC_SCU_INTERRUPT_EVENT_VCLIP
#define GLOBAL_SCU_XMC1_EVENT_STDBYCLKFAIL   XMC_SCU_INTERRUPT_EVENT_STDBYCLKFAIL
#define GLOBAL_SCU_XMC1_EVENT_RTCCTR_UPDATED   XMC_SCU_INTERRUPT_EVENT_RTCCTR_UPDATED
#define GLOBAL_SCU_XMC1_EVENT_RTCATIM0_UPDATED   XMC_SCU_INTERRUPT_EVENT_RTCATIM0_UPDATED
#define GLOBAL_SCU_XMC1_EVENT_RTCATIM1_UPDATED   XMC_SCU_INTERRUPT_EVENT_RTCATIM1_UPDATED
#define GLOBAL_SCU_XMC1_EVENT_RTCTIM0_UPDATED   XMC_SCU_INTERRUPT_EVENT_RTCTIM0_UPDATED
#define GLOBAL_SCU_XMC1_EVENT_RTCTIM1_UPDATED   XMC_SCU_INTERRUPT_EVENT_RTCTIM1_UPDATED
#define GLOBAL_SCU_XMC1_EVENT_TSE_DONE   XMC_SCU_INTERRUPT_EVENT_TSE_DONE
#define GLOBAL_SCU_XMC1_EVENT_TSE_HIGH   XMC_SCU_INTERRUPT_EVENT_TSE_HIGH
#define GLOBAL_SCU_XMC1_EVENT_TSE_LOW   XMC_SCU_INTERRUPT_EVENT_TSE_LOW
#define GLOBAL_SCU_XMC1_EVENT_LOSS_EXT_CLOCK   XMC_SCU_INTERRUPT_EVENT_LOSS_EXT_CLOCK
#define GLOBAL_SCU_XMC1_EVENT_DCO1_OUT_SYNC   XMC_SCU_INTERRUPT_EVENT_DCO1_OUT_SYNC
#define GLOBAL_SCU_XMC1_EVENT_ACMP3   XMC_SCU_INTERRUPT_EVENT_ACMP3
typedef XMC_SCU_INTERRUPT_EVENT_t GLOBAL_SCU_XMC1_EVENT_t
typedef struct
GLOBAL_SCU_XMC1_CONFIG 
GLOBAL_SCU_XMC1_CONFIG_t
typedef struct GLOBAL_SCU_XMC1 GLOBAL_SCU_XMC1_t
GLOBAL_SCU_XMC1_STATUS_t GLOBAL_SCU_XMC1_Init (GLOBAL_SCU_XMC1_t *const handle)
 Initialize the GLOBAL_SCU_XMC1 APP.
GLOBAL_SCU_XMC1_STATUS_t GLOBAL_SCU_XMC1_RegisterCallback (const GLOBAL_SCU_XMC1_EVENT_t event, const GLOBAL_SCU_XMC1_EVENT_HANDLER_t callback)
 Register an event callback routine This function registers an event callback routine for a specific event. Note: User needs to enable the event generation separately. See GLOBAL_SCU_XMC1_EnableEvent and GLOBAL_SCU_XMC1_DisableEvent.
__STATIC_INLINE void GLOBAL_SCU_XMC1_EnableIRQ (uint8_t irq_num)
 Enable the handling of events.
__STATIC_INLINE void GLOBAL_SCU_XMC1_DisableIRQ (uint8_t irq_num)
 Disable the handling of events.
__STATIC_INLINE void GLOBAL_SCU_XMC1_EnableEvent (const GLOBAL_SCU_XMC1_EVENT_t event)
 Enable a specific event.
__STATIC_INLINE void GLOBAL_SCU_XMC1_DisableEvent (const GLOBAL_SCU_XMC1_EVENT_t event)
 Disable a specific event.

Define Documentation

#define GLOBAL_SCU_XMC1_EVENT_ACMP3   XMC_SCU_INTERRUPT_EVENT_ACMP3

Analog comparator-3 output event.

Definition at line 127 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_DCO1_OUT_SYNC   XMC_SCU_INTERRUPT_EVENT_DCO1_OUT_SYNC

DCO1 Out of SYNC Event.

Definition at line 126 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_FLASH_COMPLETED   XMC_SCU_INTERRUPT_EVENT_FLASH_COMPLETED

Flash operation completion event.

Definition at line 110 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_FLASH_ERROR   XMC_SCU_INTERRUPT_EVENT_FLASH_ERROR

Flash ECC double bit error event.

Definition at line 109 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_LOCI   XMC_SCU_INTERRUPT_EVENT_LOCI

Loss of clock event.

Definition at line 103 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_LOSS_EXT_CLOCK   XMC_SCU_INTERRUPT_EVENT_LOSS_EXT_CLOCK

Loss of external OSC_HP clock event.

Definition at line 125 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_PESRAM   XMC_SCU_INTERRUPT_EVENT_PESRAM

PSRAM Parity error event.

Definition at line 104 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_PEUSIC0   XMC_SCU_INTERRUPT_EVENT_PEUSIC0

USIC0 Parity error event.

Definition at line 105 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_RTC_ALARM   XMC_SCU_INTERRUPT_EVENT_RTC_ALARM

RTC alarm event.

Definition at line 84 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_RTC_PERIODIC   XMC_SCU_INTERRUPT_EVENT_RTC_PERIODIC

RTC periodic event.

Definition at line 83 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_RTCATIM0_UPDATED   XMC_SCU_INTERRUPT_EVENT_RTCATIM0_UPDATED

RTCATIM0 register update event.

Definition at line 114 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_RTCATIM1_UPDATED   XMC_SCU_INTERRUPT_EVENT_RTCATIM1_UPDATED

RTCATIM1 register update event.

Definition at line 115 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_RTCCTR_UPDATED   XMC_SCU_INTERRUPT_EVENT_RTCCTR_UPDATED

RTCCTR register update event.

Definition at line 113 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_RTCTIM0_UPDATED   XMC_SCU_INTERRUPT_EVENT_RTCTIM0_UPDATED

RTCTIM0 register update event.

Definition at line 116 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_RTCTIM1_UPDATED   XMC_SCU_INTERRUPT_EVENT_RTCTIM1_UPDATED

RTCTIM1 register update event.

Definition at line 117 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_STDBYCLKFAIL   XMC_SCU_INTERRUPT_EVENT_STDBYCLKFAIL

Standby clock failure event.

Definition at line 112 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_TSE_DONE   XMC_SCU_INTERRUPT_EVENT_TSE_DONE

Temperature measurement Completion event.

Definition at line 118 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_TSE_HIGH   XMC_SCU_INTERRUPT_EVENT_TSE_HIGH

Temperature too high event.

Definition at line 119 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_TSE_LOW   XMC_SCU_INTERRUPT_EVENT_TSE_LOW

Temperature too low event.

Definition at line 120 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_VCLIP   XMC_SCU_INTERRUPT_EVENT_VCLIP

VCLIP event.

Definition at line 111 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_VDDPI   XMC_SCU_INTERRUPT_EVENT_VDDPI

VDDP pre-warning event.

Definition at line 85 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_VDROP   XMC_SCU_INTERRUPT_EVENT_VDROP

VDROP event.

Definition at line 92 of file GLOBAL_SCU_XMC1.h.

#define GLOBAL_SCU_XMC1_EVENT_WDT_WARNING   XMC_SCU_INTERRUPT_EVENT_WDT_WARN

WDT pre-warning event.

Definition at line 82 of file GLOBAL_SCU_XMC1.h.


Typedef Documentation

Configuration parameters

typedef XMC_SCU_INTERRUPT_EVENT_t GLOBAL_SCU_XMC1_EVENT_t

Event type

Definition at line 165 of file GLOBAL_SCU_XMC1.h.

Runtime handler


Function Documentation

__STATIC_INLINE void GLOBAL_SCU_XMC1_DisableEvent ( const GLOBAL_SCU_XMC1_EVENT_t  event)

Disable a specific event.

Parameters:
eventEvents to be disabled. See GLOBAL_SCU_XMC1_EVENT_t.

Definition at line 317 of file GLOBAL_SCU_XMC1.h.

__STATIC_INLINE void GLOBAL_SCU_XMC1_DisableIRQ ( uint8_t  irq_num)

Disable the handling of events.

Parameters:
void

Definition at line 297 of file GLOBAL_SCU_XMC1.h.

__STATIC_INLINE void GLOBAL_SCU_XMC1_EnableEvent ( const GLOBAL_SCU_XMC1_EVENT_t  event)

Enable a specific event.

Parameters:
eventEvents to be enabled. See GLOBAL_SCU_XMC1_EVENT_t.

Definition at line 307 of file GLOBAL_SCU_XMC1.h.

__STATIC_INLINE void GLOBAL_SCU_XMC1_EnableIRQ ( uint8_t  irq_num)

Enable the handling of events.

Parameters:
void

Definition at line 287 of file GLOBAL_SCU_XMC1.h.

Initialize the GLOBAL_SCU_XMC1 APP.

This function initializes the required CPU_XMC1 APP if not yet done, sets the priority of the SCU_0/SCU_1/SCU_2 IRQ, and enables the IRQ if the user has selected so. This function is called from DAVE_Init() or top level APP requiring the GLOBAL_SCU_XMC1 APP.

Parameters:
handleRuntime handler
Returns:
GLOBAL_SCU_XMC1_STATUS_t Indicates initialization status

Definition at line 105 of file GLOBAL_SCU_XMC1.c.

References config, GLOBAL_SCU_XMC1_CONFIG::enable_at_init, GLOBAL_SCU_XMC1_STATUS_FAILURE, GLOBAL_SCU_XMC1_STATUS_SUCCESS, initialized, and GLOBAL_SCU_XMC1_CONFIG::priority.

Register an event callback routine This function registers an event callback routine for a specific event. Note: User needs to enable the event generation separately. See GLOBAL_SCU_XMC1_EnableEvent and GLOBAL_SCU_XMC1_DisableEvent.

Parameters:
eventEvent for which the callback is register
callbackRoutine to handle occurrence of event
Returns:
GLOBAL_SCU_XMC1_STATUS_t Indicates registration status
 #include <DAVE.h>

 void CbListener(void)
 {
   // Callback function implementation
 };

 int main(void)
 {
   DAVE_Init();

   GLOBAL_SCU_XMC1_RegisterCallback(GLOBAL_SCU_XMC1_EVENT_RTC_ALARM, CbListener);
   GLOBAL_SCU_XMC1_EnableEvent(GLOBAL_SCU_XMC1_EVENT_RTC_ALARM);
   while(1);
 }


Definition at line 214 of file GLOBAL_SCU_XMC1.c.