cancel
Showing results for 
Search instead for 
Did you mean: 

I need an example to understand NVIC with stm32f4-Discovery

salahuddinash
Associate II
Posted on April 09, 2014 at 10:27

Hi guys

I'm trying to understand NVIC with STM32F4-Discovery, I've read the user manual and programming manual (the partition related with NVIC and Exceptions) and I've searched the web for a full simple example that help me understanding

-how NVIC works

-how to write a simple handler

-what is the difference between event and interrupt 

-what is the difference between NVIC and EXTI ?

either I found a complex example with USART for example, or a snippet of code, not full one

I hope some example, with comments wherever possible, that toggle LEDs to make it clearer for me

I hope I'm not asking too much.. thanks in advance
5 REPLIES 5
Posted on April 09, 2014 at 13:50

Suggest you find yourself a copy of

https://www.google.com/search?q=Joseph+Yiu%27s+Essential+Cortex-M3&ie=utf-8&oe=utf-8&aq=t

/4
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
salahuddinash
Associate II
Posted on April 09, 2014 at 14:34

Suggest you find yourself a copy of 

https://www.google.com/search?q=Joseph+Yiu%27s+Essential+Cortex-M3&ie=utf-8&oe=utf-8&aq=t

/4

OK, I've got one now, and I'll start studying it

But I'll be really grateful if you provide me a simple working code to start with.

Hope not bothering :)
Posted on April 09, 2014 at 17:26

Hope not bothering :)

Not so much, but I don't like repeating myself either.

I think there are examples within the firmware libraries and here that demonstrate EXTI.

The NVIC is the interrupt controller integrated with the Cortex-M3/4, unlike earlier ARM (or other archs) where everyone implemented their own.

The EXTI peripheral is ST's solution to handling external interrupting signals, edges, etc, and then propagating those to the NVIC for dispatch.

https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/STM32F4%20User%20Push%20Button%20Interrupt%20Issue&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F&curren...

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on April 10, 2014 at 00:44

The associations are architecturally defined, most likely in the Data Sheet/Manual, and also then reflected in the startup_stm32f4xx.s

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..