2006-02-28 11:50 PM
2006-02-23 09:31 PM
Hello.
I wanna force micro to make selfreset by executing of illegal opcode. Can anybody suggest me any illegal opcodes? Tnx.2006-02-23 10:06 PM
I found :-]
0x31, 0x32, 0x3b, 0x41, 0x65, 0x72 right?2006-02-23 11:03 PM
Hi Luter,
to reset my µC I use - starving the watchdog in an endless loop or - setting WDGCR to 0xFF followed by 0x80 (clearing T6). You can also use the HALT instruction with WDG is activated (but: see chapter 11.1.4.1). WoRo2006-02-24 12:36 AM
To woro.
I need to distinguish between wdg reset and my own reset when micro starts up. illegal opcode execution does not set wgd reset flag in SICSR. What do u mean under ''chapter 11.1.4.1'' ? What kind of an is it?2006-02-27 08:09 PM
Sorry I forgot about to say: I refere to the main document - the datasheet.
I wouldn't take an illegal opcode to restart because you never can be sure they will abide this instruction. They might change it at any time without notice. Alternation: Fix a memory cell e.g. with 0xA5 before triggering the watchdog and read this before initialising your memory. WoRo2006-02-27 11:16 PM
Quote:
On 28-02-2006 at 09:39, Anonymous wrote: Sorry I forgot about to say: I refere to the main document - the datasheet. I am still not getting you. What type of datasheet do u mean?Quote:
I wouldn't take an illegal opcode to restart because you never can be sure they will abide this instruction. They might change it at any time without notice. Alternation: Fix a memory cell e.g. with 0xA5 before triggering the watchdog and read this before initialising your memory. WoRo Tnx for advice, but my micro st7mc2 has flash memory only, and it is a bit complex to store some byte there.2006-02-28 01:08 AM
Hi Luter,
sorry I supposed a ST7Lite2x but with your micro you must read: But: see chapter 10.1.4 Using Halt Mode with the WDG. What I mean with the memory cell is that you can determine any unused RAM cell, set it to a special value e.g. 0xA5 and then force a watchdog reset. Immediately after a reset you should fetch the value and reset the RAM memory to a base value e.g. 0x00. Thus checking the fetched value you can recognise whether you have passed a tagged (0xA5) watchdog reset or not (0x00). WoRo2006-02-28 02:16 AM
Now, I understand your idea. It is pretty good. But are u sure that reset doesn't disturb ram memory? As far as i know the content of ram memory is undefined after reset. Is anywhere notice about memory state after reset? I would be very appreciated if u give me a link.
2006-02-28 06:46 PM