Skip to main content
Oahme.1
Associate III
August 19, 2020
Solved

ADC Interrupt setup

  • August 19, 2020
  • 5 replies
  • 1582 views

Hi ,

Ive started configuring gpio's and ADC with stm32f103 in Assembly ,Can somone tell me the basic procedure to setup ADC interrupts ?? .There's alot to keep in mind while setting up the initialization and i've failed at it.

This topic has been closed for replies.
Best answer by TDK

The vector table has the name of the interrupt. Implement that function anywhere in your program.

5 replies

TDK
August 19, 2020

Enable the xxxIE bit in the ADC_IER register. Enable the corresponding global NVIC interrupt. Implement the right routine somewhere.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Oahme.1
Oahme.1Author
Associate III
August 19, 2020

Okay ,thanks I understand that , but how do I write the code where my interrupt service routine will occur ??, like in another mcu I used to write it as

__ADC_interrupt

....

....

....

return from interrupt

thanks ,

TDK
TDKBest answer
August 19, 2020

The vector table has the name of the interrupt. Implement that function anywhere in your program.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Oahme.1
Oahme.1Author
Associate III
August 19, 2020

okay , I see, ill write the proper code and update on this .

Thanks

Oahme.1
Oahme.1Author
Associate III
August 20, 2020

Hi,

I cannot quite get this part ,If i'm enabling the NVIC interrupt ,what does all the 32 bits correspond to in the NVIC_ISERx??,which bits do I have to enable ?