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

I can't find where ADC_IRQHandler is called.

Hello, community. 

I am finding a point calling ADC_IRQHandler to modify the event_handler but I can't find the point calling the function. Where is the caller on ADC_IRQHandler?

Parents
  • Hi

    Interrupt handlers are called directly by the NVIC (Nested Vector Interrupt Controller) whenever an interrupt occurs in one of the hardware peripherals (or when the interrupt pending bit is set from software), assuming the code is not currently running an interrupt of higher or similar priority (lower or similar priority number). 

    In other words you normally won't find any code calling the interrupt handlers directly, they will be called by the system for you. 

    For the NVIC to know where the interrupt handlers can be found in memory there is an interrupt vector table, located at the start of the flash, containing the address of every interrupt in the system. 

    For more information about the ARM Cortext M exception model, and the interrupt vector table, please refer to chapter 2.3 (and 2.3.4 for the vector table) of this document

    The vector table in your project is set up through the startup file, called ses_startup_nrf52.s in the Segger Embedded Studio (SES) projects. 

    Best regards
    Torbjørn

  • What describes is standard for any ARM Cortex-M microcontroller - it is not specific to Nordic.

    Although the NVIC is specific to ARM Cortex-M, this same basic approach of interrupt handlers being called direct from hardware - not from software - is pretty much standard across all microcontrollers.

    https://en.wikipedia.org/wiki/Interrupt_handler

Reply Children
No Data
Related