| ??? 12/11/01 11:20 Read: times |
#17515 - RE: ljmp to zero = reset ? |
Maziar,
An important initialization, yet frequently forgotten, is the reset of the interrupt control mechanism. If your MCU is within an ISR when it jumps to zero, interrupts will remain disabled (for the same or lower priority). Moreover, you usually want to reset the MCU after detecting some faulty condition, that is, when you don't depend on MCU operation. Therefore it is a good idea to include the interrupt control initialization in your SW reset. This can be done using two RETI instructions before jumping to zero (for standard MCUs with only two priority levels). For example: clr EA lcall clean lcall clean ljmp 0 clean: reti I think that this question (SW reset) was discussed in the forum recently. Regards, Alfredo del Rio. |
| Topic | Author | Date |
| ljmp to zero = reset ? | 01/01/70 00:00 | |
| RE: ljmp to zero = reset ? | 01/01/70 00:00 | |
| RE: ljmp to zero = reset ?-to Jacek Bog | 01/01/70 00:00 | |
| RE: ljmp to zero = reset ?-to Jacek Bog | 01/01/70 00:00 | |
| RE: ljmp to zero = reset ? | 01/01/70 00:00 | |
| RE: ljmp to zero = reset ? | 01/01/70 00:00 | |
| RE: ljmp to zero = reset ? | 01/01/70 00:00 | |
| RE: ljmp to zero = reset ?-to Jacek Bog | 01/01/70 00:00 | |
| RE: ljmp to zero = reset ?-to Jacek Bog | 01/01/70 00:00 | |
| RE: ljmp to zero = reset ? | 01/01/70 00:00 | |
| RE: ljmp to zero = reset ? - Bryan | 01/01/70 00:00 | |
| RE: ljmp to zero = reset ? - Bryan | 01/01/70 00:00 | |
| RE: ljmp to zero = reset ? - Bryan | 01/01/70 00:00 | |
| RE: ljmp to zero = reset ? | 01/01/70 00:00 | |
RE: ljmp to zero = reset ? | 01/01/70 00:00 |



