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

Interrupt Handling

Hello Experts,

   I am new to Nordic devices. I am trying to understand the interrupt. I have some questions - 

1. How to enable interrupt?

2. Do we need to write 1 in ISER (Interrupt Set Enable Register)? to enable interrupt.

3. Do we need to initialize the service routine of that interrupt?

4. How to define/see interrupt priority?

5. How to define interrupt handler?

6. To disable interrupt do we need to set 1 in ICER (Interrupt Clear Enable Register) register?

7. Can you provide me the Interrupt vector table?

8. What is soft device based and normal interrupts?

9. It would be great if you provide me the simplest code to get a better understanding of interrupts.

Parents Reply Children
  • Hi, 

    Sorry for the delay because of the labor's day which is the holiday in Norway.

           1. How to enable interrupt?

           2. Do we need to write 1 in ISER (Interrupt Set Enable Register)? to enable interrupt.

    For 1. and 2., Set INTEN to enable or disable interrupt in our chip.

    3. Do we need to initialize the service routine of that interrupt?

    If you develop the ISR, you need to initial and assing interrupt. In our SDK, Master boot record will do that.

    4. How to define/see interrupt priority?

    Interrupt priority levels shows the info.

    5. How to define interrupt handler?

     Please refer to SoftDevice SoC event handler configuration.

    6. To disable interrupt do we need to set 1 in ICER (Interrupt Clear Enable Register) register?

    Clear an interrupt by writing 0 to an event register, or disabling an interrupt by the INTENCLR register in our chip. More details are in Interrupts.

    7. Can you provide me the Interrupt vector table?

    See the example for the Interrupt vector table. It's located at the start of flash memory

    8. What is soft device based and normal interrupts?

    SoftDevices is a precompiled and linked binary software implementing a wireless protocol developed by Nordic Semiconductor.

    I do not know what normal interrupts means. Where do you find it in our documents?

    9. It would be great if you provide me the simplest code to get a better understanding of interrupts.

    nRF5 SDK v15.3.0: Pin Change Interrupt Example which demonstrates interrupts on PIN_IN change. PIN_OUT is configured as output and toggled in the PIN_IN change interrupt handler.

    Best regards,

    Amanda

Related