The STM32 interrupt function

In this paper we do interrupt the index function, help us find the interrupt function names, function parameters and interrupt service routine interrupt their source, so that we can program.

1) If a project is only a break, then we can be two steps on it:

           Enable interrupt channels          

           Write interrupt service routine

2) Example:

void Tim6_Init (PSC U16, U16 ARR) 
{ 
    // ............................
     // Enable interrupt channel 
    NVIC_EnableIRQ (TIM6_DAC_IRQn) ;   
} 
// interrupt service function 
void TIM6_DAC_IRQHandler ( void ) 
{ 
    // . . . . . . . . . . 
}

Interrupt service function name can be found in "startup_stm32f40_41xxx.s" file:

Interrupt channel number can be found in "stm32f4xx.h" files can also be interrupted NVIC manual to find the vector table:

 

 

 

 If a project has multiple interrupts, it must be considered a priority problem, you can refer to my previous article:

     https://www.cnblogs.com/anSn/p/11619048.html

Guess you like

Origin www.cnblogs.com/anSn/p/11619313.html