| 数据搜索系统,热门电子元器件搜索 |
|
ST62T35B 数据表(PDF) 26 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
ST62T35B 数据表(HTML) 26 Page - STMicroelectronics |
|
26 / 82 page ![]() 26/82 ST62T35B/E35B IINTERRUPTS (Cont’d) 3.3.2 Interrupt Procedure The interrupt procedure is very similar to a call procedure, indeed the user can consider the inter- rupt as an asynchronous call procedure. As this is an asynchronous event, the user cannot know the context and the time at which it occurred. As a re- sult, the user should save all Data space registers which may be used within the interrupt routines. There are separate sets of processor flags for nor- mal, interrupt and non-maskable interrupt modes, which are automatically switched and so do not need to be saved. The following list summarizes the interrupt proce- dure: MCU – The interrupt is detected. – The C and Z flags are replaced by the interrupt flags (or by the NMI flags). – The PC contents are stored in the first level of the stack. – The normal interrupt lines are inhibited (NMI still active). – The first internal latch is cleared. – The associated interrupt vector is loaded in thePC. WARNING: In some circumstances, when a maskable interrupt occurs while the ST6 core is in NORMAL mode and especially during the execu- tion of an ”ldi IOR, 00h” instruction (disabling all maskable interrupts): if the interrupt arrives during the first 3 cycles of the ”ldi” instruction (which is a 4-cycle instruction) the core will switch to interrupt mode BUT the flags CN and ZN will NOT switch to the interrupt pair CI and ZI. User – User selected registers are saved within the in- terrupt service routine (normally on a software stack). – The source of the interrupt is found by polling the interrupt flags (if more than one source is asso- ciated with the same vector). – The interrupt is serviced. – Return from interrupt (RETI) MCU – Automatically the MCU switches back to the nor- mal flag set (or the interrupt flag set) and pops the previous PC value from the stack. The interrupt routine usually begins by the identi- fying the device which generated the interrupt re- quest (by polling). The user should save the regis- ters which are used within the interrupt routine in a software stack. After the RETI instruction is exe- cuted, the MCU returns to the main routine. Figure 16. Interrupt Processing Flow Chart I NS TRUC TION FETCH IN STRU CTION EXEC UTE INS TRUCT ION WAS THE IN STRU CTION ARE TI ? ? CLEAR I NTER RU PT MASK SELECT PROGRAM FLAGS ”POP” THE STAC KED PC ? C HEC K IF THER E IS AN IN TERRU PT RE QUEST AN D INT ER RU PT MASK SELECT INTE RN AL MODE FLAG PUSH THE PC I NTO THE STAC K LOAD PC FROM IN TERR UPT VEC TOR (FFC/ FFD) SET I NTERR UP T MASK NO NO YES I S THE COR E ALREADY IN NOR MAL MOD E? VA000014 YES NO YES 25 |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| 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 |