Skip to content

Commit

Permalink
Add RP2350 specific values to the exception_number enum (raspberrypi#…
Browse files Browse the repository at this point in the history
  • Loading branch information
davexroth authored Oct 17, 2024
1 parent 91dfbd0 commit 3708588
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions src/rp2_common/hardware_exception/include/hardware/exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,19 @@ extern "C" {
*
* On Arm these are vector table indices:
*
* Name | Value | Exception
* ---------------------|-------|-----------------------
* NMI_EXCEPTION | 2 | Non Maskable Interrupt
* HARDFAULT_EXCEPTION | 3 | HardFault
* SVCALL_EXCEPTION | 11 | SV Call
* PENDSV_EXCEPTION | 14 | Pend SV
* SYSTICK_EXCEPTION | 15 | System Tick
* Name | Value | Exception
* ----------------------|-------|-----------------------
* NMI_EXCEPTION | 2 | Non Maskable Interrupt
* HARDFAULT_EXCEPTION | 3 | HardFault
* \if rp2350_specific
* MEMMANAGE_EXCEPTION | 4 | MemManage
* BUSFAULT_EXCEPTION | 5 | BusFault
* USAGEFAULT_EXCEPTION | 6 | UsageFault
* SECUREFAULT_EXCEPTION | 7 | SecureFault
* \endif
* SVCALL_EXCEPTION | 11 | SV Call
* PENDSV_EXCEPTION | 14 | Pend SV
* SYSTICK_EXCEPTION | 15 | System Tick
*
* \if rp2350_specific
* On RISC-V these are exception cause numbers:
Expand Down Expand Up @@ -88,11 +94,17 @@ enum exception_number {
enum exception_number {
// Assigned to VTOR indices
MIN_EXCEPTION_NUM = 2,
NMI_EXCEPTION = 2, ///< Non Maskable Interrupt
HARDFAULT_EXCEPTION = 3, ///< HardFault Interrupt
SVCALL_EXCEPTION = 11, ///< SV Call Interrupt
PENDSV_EXCEPTION = 14, ///< Pend SV Interrupt
SYSTICK_EXCEPTION = 15, ///< System Tick Interrupt
NMI_EXCEPTION = 2, ///< Non Maskable Interrupt
HARDFAULT_EXCEPTION = 3, ///< HardFault Interrupt
#if PICO_RP2350
MEMMANAGE_EXCEPTION = 4, ///< MemManage Interrupt
BUSFAULT_EXCEPTION = 5, ///< BusFault Interrupt
USAGEFAULT_EXCEPTION = 6, ///< UsageFault Interrupt
SECUREFAULT_EXCEPTION = 7, ///< SecureFault Interrupt
#endif
SVCALL_EXCEPTION = 11, ///< SV Call Interrupt
PENDSV_EXCEPTION = 14, ///< Pend SV Interrupt
SYSTICK_EXCEPTION = 15, ///< System Tick Interrupt
MAX_EXCEPTION_NUM = 15
};
#endif
Expand Down

0 comments on commit 3708588

Please sign in to comment.