| ??? 09/28/00 14:34 Read: times |
#5386 - RE: Software Reset. |
Hi Craig,
this question seems ever be a topic. How about a point in the tutorial about this ? Hi Leonid, it seems, you want to force a reset from an interrupt handler. Then a new interrupt can never be entered, before a RETI was executed. Solution: Define an unused interrupt function and call it before you jump to 0x0000. Since 2 interrupt priorities on the 8051, also 2 interrupts can be in execution. So call it twice to finish both. See the C example below: #define CALL(addr) (((void(*)(void))(char code *)addr)()) void reti(void) interrupt 31{} void softreset(void) { CALL( reti ); // clear interrupt hardware for high priority CALL( reti ); // clear interrupt hardware for low priority CALL( 0x0000 ); // reset } Peter |
| Topic | Author | Date |
| Software Reset. | 01/01/70 00:00 | |
RE: Software Reset. | 01/01/70 00:00 |



