| поискавой системы для электроныых деталей |
|
ST72325 датащи(PDF) 192 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
ST72325 датащи(HTML) 192 Page - STMicroelectronics |
|
192 / 196 page ![]() 192/196 LD sema,A IRET Case 2: Writing to PxOR or PxDDR with Global In- terrupts Disabled: SIM ; set the interrupt mask LD A,PFDR AND A,#$02 LD X,A ; store the level before writing to PxOR/PxDDR LD A,#$90 LD PFDDR,A; Write into PFDDR LD A,#$ff LD PFOR,A ; Write to PFOR LD A,PFDR AND A,#$02 LD Y,A ; store the level after writing to PxOR/ PxDDR LD A,X ; check for falling edge cp A,#$02 jrne OUT TNZ Y jrne OUT LD A,#$01 LD sema,A ; set the semaphore to '1' if edge is detected RIM ; reset the interrupt mask LD A,sema ; check the semaphore status CP A,#$01 jrne OUT call call_routine; call the interrupt routine RIM OUT: RIM JP while_loop .call_routine ; entry to call_routine PUSH A PUSH X PUSH CC .ext1_rt ; entry to interrupt routine LD A,#$00 LD sema,A IRET 15.1.3 Clearing active interrupts outside interrupt routine When an active interrupt request occurs at the same time as the related flag is being cleared, an unwanted reset may occur. Note: clearing the related interrupt mask will not generate an unwanted reset Concurrent interrupt context The symptom does not occur when the interrupts are handled normally, i.e. when: – The interrupt flag is cleared within its own inter- rupt routine – The interrupt flag is cleared within any interrupt routine – The interrupt flag is cleared in any part of the code while this interrupt is disabled If these conditions are not met, the symptom can be avoided by implementing the following se- quence: Perform SIM and RIM operation before and after resetting an active interrupt request. Example: SIM reset interrupt flag RIM Nested interrupt context: The symptom does not occur when the interrupts are handled normally, i.e. when: – The interrupt flag is cleared within its own inter- rupt routine – The interrupt flag is cleared within any interrupt routine with higher or identical priority level – The interrupt flag is cleared in any part of the code while this interrupt is disabled If these conditions are not met, the symptom can be avoided by implementing the following se- quence: PUSH CC SIM reset interrupt flag POP CC |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю 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 |