cancel
Showing results for 
Search instead for 
Did you mean: 

External Interrupt in STM32F103C8T6

Vivek yadav1
Associate III

I am using STM32F103C8T6(Blue Pill) with STM32IDE.

> I am trying to learn external Interrupt. So as a reference i am using 3 main thing.

# Reference Manual

# DataSheat

# Cortex™-M3 Devices Generic User Guide

> I wrote a code for this. I made changes into registers.

Here is my Github link.

https://github.com/viveky1794/stm32f103c8_scratch/blob/master/gpio_Driver_001/myDriver_001/SRC/gpio_Driver.c

> When i am trying to set NVIC_ISER0 Register it set my desired bit but NVIC_ICER0 Register also set same bit. Which is Strange for me and I don't Know why is it happening ?

# If NVIC_ISER0 bit set means Interrupt at that IRQ is Enable.

# if NVIC_ICER0 bit set means Interrupt at that IRQ is Disable.

> When I am giving Interrupt Then the Pending bit of EXTI->PR register and I also saw that NVIC_ISPR0 Bit(1<<IRQ) also set when i give interrupt. But Still I am not getting any call for my ISR.

> At last my ISR is not called and Control goes to unknown location.

3 REPLIES 3

> EXTI_IRQHandler()

There is no such thing. Look into the startup code (startup_stm32xxxx.s -- e.g. https://github.com/STMicroelectronics/stm32f1xx_hal_driver if you use gcc-based compiler), there you see the vectors table, you should use only names from that.

JW

>> EXTI_IRQHandler()

> There is no such thing.

And, interrupt handlers do not have any arguments either.

Vivek yadav1
Associate III

Thanks @Community member​  and @Ozone​ You saw my code.

> EXIT_IRQHandler() is define by me where I am setting NVIC interrupt Register.

> I saw in Startup file and get useful ISR which is weak So I write by my Self in main.

>> For your Kind Information that My code is running and I am getting Interrupt as Required.