Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

AN1776 Datasheet(PDF) 8 Page - STMicroelectronics

Part # AN1776
Description  INTERRUPT HANDLING FOR STR7 MICROCONTROLLERS
PDF  13 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN1776 Datasheet(HTML) 8 Page - STMicroelectronics

Back Button AN1776 Datasheet HTML 4Page - STMicroelectronics AN1776 Datasheet HTML 5Page - STMicroelectronics AN1776 Datasheet HTML 6Page - STMicroelectronics AN1776 Datasheet HTML 7Page - STMicroelectronics AN1776 Datasheet HTML 8Page - STMicroelectronics AN1776 Datasheet HTML 9Page - STMicroelectronics AN1776 Datasheet HTML 10Page - STMicroelectronics AN1776 Datasheet HTML 11Page - STMicroelectronics AN1776 Datasheet HTML 12Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 8 / 13 page
background image
8/13
INTERRUPT HANDLING FOR STR7 MICROCONTROLLERS
the IRQ interrupt vector is executed and branches to the IRQhandler subroutine. During this
time, IRQs are not allowed.
The IRQ handler starts by adjusting the lr_irq, then saves registers from 0 to 12, the spsr_irq
and the lr_irq register to the IRQ stack, before executing the instruction located in the IVR, a
return address is saved to the lr_irq. The IVR content is executed by pointing the PC to IVR
register address.
The instruction in the IVR in this example calls the Timer0 Interrupt Handler (T0TIMIIRQHandler)
where the mode is switched back into system mode to allow other IRQ interrupts once again.
The full handler user code written in C, in this example is the T0TIMI_IRQHandler subroutine
which can now be branched to. Now the core is in SYS mode so that the registers in IRQ mode
are preserved.
Once this has finished, the processor returns and the core is switched back to IRQ mode,
which once again disables other IRQs. Then the processor returns to the IRQHandler routine,
the pending bit is cleared in the EIC_IPR register, the saved registers are restored, the pro-
gram counter is restored from the link register and finally the cpsr is restored from the spsr of
the IRQ mode.
Normal operation can then resume back in the user program with SYS/USR mode restored.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com