Energy Micro IEC60355 Library Example Project 1.0 (internal use only!) GCC-Version
Example project demonstrating POST and BIST library functions

Exceptions and default vectors

This module defines a set of default handlers for the device
specific interrupts. The module is an extension for CMSIS library.
The handler can be replaced because they are defined "weak". More...

Collaboration diagram for Exceptions and default vectors:

Functions

void START (void)
 alternative start label for some compiler
int main (void)
 main routine testing the library content
void FaultHandler (void)
 handle all error conditions
void DefaultNMI_Handler (void)
void DefaultHardFault_Handler (void)
void DefaultMemManage_Handler (void)
void DefaultBusFault_Handler (void)
void DefaultUsageFault_Handler (void)
void DefaultDebugMon_Handler (void)
void DefaultSVC_Handler (void)
void DefaultPendSV_Handler (void)
void DefaultSysTick_Handler (void)
void DefaultHandler (void)
 Interrupt entry point for any unexpected exception should never been executed.
void NMI_Handler (void)
void HardFault_Handler (void)
void MemManage_Handler (void)
void BusFault_Handler (void)
void UsageFault_Handler (void)
void DebugMon_Handler (void)
void SVC_Handler (void)
void PendSV_Handler (void)
void SysTick_Handler (void)
 SysTick_Handler Interrupt Service Routine for system tick counter.

Variables

Reset Handler DCD NMI_Handler
 This function handles NMI exception.
NMI Handler DCD HardFault_Handler
 This function handles Hard Fault exception.
Hard Fault Handler DCD MemManage_Handler
 This function handles Memory Manage Fault exception.
MPU Fault Handler DCD BusFault_Handler
 This function handles Bus Fault exception.
Bus Fault Handler DCD UsageFault_Handler
 This function handles Usage Fault exception.
SVCall Handler DCD DebugMon_Handler
 This function handles Debug Monitor Fault exception.
Reserved DCD SVC_Handler
 This function handles SVC exception.
Reserved DCD PendSV_Handler
 This function handles Pending SVC exception.
PendSV Handler DCD SysTick_Handler
 This function handles SysTick exception.

Detailed Description

This module defines a set of default handlers for the device
specific interrupts. The module is an extension for CMSIS library.
The handler can be replaced because they are defined "weak".


Function Documentation

void BusFault_Handler ( void  )

Definition at line 60 of file startup_efm32.c.

{
  while(1);
}
void DebugMon_Handler ( void  )

Definition at line 75 of file startup_efm32.c.

{
  while(1);
}
void DefaultBusFault_Handler ( void  )

BusFaultException

Definition at line 99 of file efm32g890f128_interrupt.c.

References FaultHandler().

{
  FaultHandler();
}

Here is the call graph for this function:

void DefaultDebugMon_Handler ( void  )

DebugMonitor

Definition at line 115 of file efm32g890f128_interrupt.c.

References FaultHandler().

{
  FaultHandler();
}

Here is the call graph for this function:

DefaultHandler ( void  )

Interrupt entry point for any unexpected exception should never been executed.

DefaultHandler

Definition at line 145 of file efm32g890f128_interrupt.c.

Referenced by DefaultSysTick_Handler().

{
  /* Infinite loop. */
  while (1)
  {
  }
}

Here is the caller graph for this function:

void DefaultHardFault_Handler ( void  )

HardFault

Definition at line 83 of file efm32g890f128_interrupt.c.

References FaultHandler().

{
  FaultHandler();
}

Here is the call graph for this function:

void DefaultMemManage_Handler ( void  )

MemManageException

Definition at line 91 of file efm32g890f128_interrupt.c.

References FaultHandler().

{
  FaultHandler();
}

Here is the call graph for this function:

void DefaultNMI_Handler ( void  )

NMI

Definition at line 75 of file efm32g890f128_interrupt.c.

References FaultHandler().

{
  FaultHandler();
}

Here is the call graph for this function:

void DefaultPendSV_Handler ( void  )

PendSVC

Definition at line 130 of file efm32g890f128_interrupt.c.

{
}
void DefaultSVC_Handler ( void  )

SVCHandler

Definition at line 123 of file efm32g890f128_interrupt.c.

{
}
void DefaultSysTick_Handler ( void  )

SysTickHandler

Definition at line 137 of file efm32g890f128_interrupt.c.

References DefaultHandler().

Here is the call graph for this function:

void DefaultUsageFault_Handler ( void  )

UsageFaultException

Definition at line 107 of file efm32g890f128_interrupt.c.

References FaultHandler().

{
  FaultHandler();
}

Here is the call graph for this function:

void FaultHandler ( void  )

handle all error conditions

reference to linker symbols

FaultHandler to handle all error conditions

Note:
used as DefaultHandler

Definition at line 64 of file efm32g890f128_interrupt.c.

Referenced by DefaultBusFault_Handler(), DefaultDebugMon_Handler(), DefaultHardFault_Handler(), DefaultMemManage_Handler(), DefaultNMI_Handler(), and DefaultUsageFault_Handler().

{
  /* TODO: include a fault handler routine here */
  while (1)
  {
  }
}

Here is the caller graph for this function:

void HardFault_Handler ( void  )

Definition at line 50 of file startup_efm32.c.

{
  while(1);
}
int main ( void  )

main routine testing the library content

Prototypes

Note:
POST tests are located in the startup files

Definition at line 109 of file main.c.

References CallIRQHandler, critical_uint32_t_struct::data, FLASH_CRC_Restart, IEC60335_ClassB_Clocktest_PollHandler(), IEC60335_ClassB_CPUregTest_BIST(), IEC60335_ClassB_CriticalDataInit, IEC60335_ClassB_CriticalDataPush, IEC60335_ClassB_CriticalDataValidate, IEC60335_ClassB_FLASHtest_BIST(), IEC60335_ClassB_initClockTest(), IEC60335_ClassB_InitInterruptTest(), IEC60335_ClassB_InterruptCheck(), IEC60335_ClassB_PCTest_BIST(), IEC60335_ClassB_RAMtest_BIST(), IEC60335_testFailed, IEC60335_testPassed, initController(), initSystick(), IRQTestData_t::MaxThres, and IRQTestData_t::MinThres.

{
  testResult_t  result = IEC60335_testFailed;                 /* test results */
/* critical data */
  critical_uint32_t Crit_test = IEC60335_ClassB_CriticalDataInit(12345678);
/* hardware setup */
  initController();

/* critical data */
  IEC60335_ClassB_CriticalDataPush(Crit_test, 0x87654321);    /* regular usage */
  result = IEC60335_ClassB_CriticalDataValidate(Crit_test);

/* not allowed by compiler */
// Crit_test = 34343434;
  result = IEC60335_ClassB_CriticalDataValidate(Crit_test);

  Crit_test.data = 89898989;                                  /* not allowed in runtime */
  result = IEC60335_ClassB_CriticalDataValidate(Crit_test);

/* clock/rtc test */
  IEC60335_ClassB_initClockTest(100, 5);                      /* init clock test */
  result = IEC60335_ClassB_Clocktest_PollHandler();           /* check evidence */

/* IRQ test */
  IRQtest.MaxThres = 1000;                                    /* IRQ test parameter */
  IRQtest.MinThres = 10;
  initSystick(1);
  IEC60335_ClassB_InitInterruptTest(SysTick_IRQn, CallIRQHandler, &IRQtest);
  while (IEC60335_ClassB_InterruptCheck(SysTick_IRQn) != IEC60335_testPassed)
  {}
/* IRQ test off */
  IEC60335_ClassB_InitInterruptTest(SVCall_IRQn, 0, 0);
  initSystick(0);

/* Flash test */
  result = IEC60335_ClassB_FLASHtest_BIST (FLASH_CRC_Restart);

  while (1)
  {
    result = IEC60335_ClassB_CPUregTest_BIST();

    result = IEC60335_ClassB_FLASHtest_BIST (0);

    result = IEC60335_ClassB_PCTest_BIST();

    result = IEC60335_ClassB_RAMtest_BIST (0x20000100, 0x10);

    if (result != IEC60335_testPassed)
    {
      /* Break point here to test with debugger */
      __NOP();
    }
  }
}

Here is the call graph for this function:

void MemManage_Handler ( void  )

Definition at line 55 of file startup_efm32.c.

{
  while(1);
}
void NMI_Handler ( void  )

Definition at line 45 of file startup_efm32.c.

{
  while(1);
}
void PendSV_Handler ( void  )

Definition at line 80 of file startup_efm32.c.

{
  while(1);
}
void START ( void  )

alternative start label for some compiler

void SVC_Handler ( void  )

Definition at line 70 of file startup_efm32.c.

{
  while(1);
}
void SysTick_Handler ( void  )

SysTick_Handler Interrupt Service Routine for system tick counter.

Definition at line 53 of file main.c.

References IEC60335_ClassB_Clocktest_TimerHandler().

Here is the call graph for this function:

void UsageFault_Handler ( void  )

Definition at line 65 of file startup_efm32.c.

{
  while(1);
}

Variable Documentation

void BusFault_Handler

This function handles Bus Fault exception.

Note:
uses DefaultHandler void DefaultBusFault_Handler (void)

Definition at line 58 of file arm/startup_efm32.s.

Referenced by Reset().

void DebugMon_Handler

This function handles Debug Monitor Fault exception.

Note:
uses DefaultHandler void DefaultDebugMon_Handler (void)

Definition at line 65 of file arm/startup_efm32.s.

Referenced by Reset().

void HardFault_Handler

This function handles Hard Fault exception.

Note:
uses DefaultHandler void DefaultHardFault_Handler (void)

Definition at line 56 of file arm/startup_efm32.s.

Referenced by Reset().

void MemManage_Handler

This function handles Memory Manage Fault exception.

Note:
uses DefaultHandler void DefaultMemManage_Handler (void)

Definition at line 57 of file arm/startup_efm32.s.

Referenced by Reset().

void NMI_Handler

This function handles NMI exception.

Note:
uses DefaultHandler

Definition at line 55 of file arm/startup_efm32.s.

Referenced by Reset().

void PendSV_Handler

This function handles Pending SVC exception.

Note:
uses DefaultHandler void DefaultPendSV_Handler (void)

Definition at line 67 of file arm/startup_efm32.s.

Referenced by Reset().

void SVC_Handler

This function handles SVC exception.

Note:
uses DefaultHandler void DefaultSVC_Handler (void)

Definition at line 64 of file arm/startup_efm32.s.

Referenced by Reset().

void SysTick_Handler

This function handles SysTick exception.

Note:
uses DefaultHandler

Definition at line 68 of file arm/startup_efm32.s.

Referenced by Reset().

void UsageFault_Handler

This function handles Usage Fault exception.

Note:
uses DefaultHandler void DefaultUsageFault_Handler (void)

Definition at line 59 of file arm/startup_efm32.s.

Referenced by Reset().