This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Adding new IRQn to vector table on NRF52/Cortex M4

Hi there,

I am currently wondering if the following is possible?

As stated by the Cortex M4 reference manual states that a system can have 200+ seperate handlers within the vector table. From reading through the NRF52832 datasheet it states that 38 are actually used, this is also backed up within nrf52.h

Below can the last one can be seen.

FPU_IRQn =  38               /*!<  38  FPU

Now I was wondering would it be possible for me to extend this enum and add the following:

CUSTOM_IRQn = 39

I have added another handler procedure for this and adjusted the .s file so the reserved entry straight after FPU_IRQn now points to my handler procedure.

To test to see if this works I've been attempting to trigger the interrupt using software interrupts as follows:

NVIC_SetPriority(CUSTOM_IRQn, 10);
NVIC_EnableIRQ(CUSTOM_IRQn);

NVIC->STIR = CUSTOM_IRQn;

I breakpoint on my handler procedure and it is never called. Is adding custom/new interrupt vectors even possible?

Parents Reply Children
No Data
Related