Hi all,
I am having difficulty in understanding "interrupts". I am writing code for a stm32f303 microcontroller using ARMCC in Keil uVision 4 IDE.
After doing a couple of days of reading online and the compiler manual I have created an interrupt function that looks like this:
//////////////////////////////////////////////////////////////////// __irq void TimerInterrupt(void) // located in the source file {
.....statements....
} ///////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////// __irq void TimerInterrupt(void); // located in a header file ///////////////////////////////////////////////////////////////////
Now, what I am trying to do overall is to have a interrupt function that will be called when a timer reaches it's overflow and sets an interrupt bit.
Thankyou in advance if anyone has anything to contribute to this.
Sincerely, Jim
Do you mean interrupts in general (applicable to any architecture), interrupts in the Cortex-M4 hardware, or just how to handle interrupts in Keil's tools?
Note that the STM32F303 is a Cortex-M4:
www.st.com/.../252054.jsp
One of the key things about Cortex-Mx is that interrupt service routines (ISRs) aka "handlers" can be written entirely in standard 'C' - with no need for any special compiler options or extensions.
Keil provide plenty of examples, as do ST.
http://www.keil.com/download/list/arm.htm
View all questions in Keil forum