M33 Architecture API

Module: CPU Architecture API

Modules

M33 Architecture Common CPU API

Functions

Name

void

Arch_M33_MemManageHandler(void )
MemManage Fault Handler.

uint32_t

Arch_M33_DataAccessViolationUserCallback(void )
Data Access Violation User callback function.

uint32_t

Arch_M33_InstructionAccessViolationUserCallback(void )
Instruction Access Violation User callback function.

Functions Documentation

function Arch_M33_MemManageHandler

void Arch_M33_MemManageHandler(
    void 
)

MemManage Fault Handler.

User needs to register this MemManage fault handler as the interrupt handler for MemoryManagement_IRQn.

This handler supports user callbacks to handle data access violations and instruction access violations.

The user callback functions are:

This handler based on the return value from the user callback functions decides whether to return to the faulting instruction itself or to the next instruction.

The advantages of using this handler are:

  • Application can decide to skip the faulting instruction.

  • Differentiation between data and instruction access violations.

    • This handler loops indefinitely if neither a data nor instruction access violation is detected.

If this is not desired, the default MemManage_Handler can be used instead.

function Arch_M33_DataAccessViolationUserCallback

uint32_t Arch_M33_DataAccessViolationUserCallback(
    void 
)

Data Access Violation User callback function.

Applications can define custom data access violation handling using this callback function.

Return zero to exit from the fault handler back to the instruction that generated the fault.

Return non-zero to exit to the “next” instruction after that generated the fault.

The default weak handler just loops indefinitely.

function Arch_M33_InstructionAccessViolationUserCallback

uint32_t Arch_M33_InstructionAccessViolationUserCallback(
    void 
)

Instruction Access Violation User callback function.

Applications can define custom instruction access violation handling using this callback function.

Return zero to exit from the fault handler back to the faulty instruction fetch.

Return non-zero to exit to the “next” instruction of the one which prefetched the invalid instruction.

The default weak handler just loops indefinitely.