??? 04/21/05 22:35 Modified: 04/21/05 22:36 Read: times |
#92096 - The watchdog, timed access, and errata Responding to: ???'s previous message |
Thomas Skyt said:
I just tried to reset the watchdog to its "off"-state. Which failed ...
I used the bootloader for this purpose and flipped the watchdog-button to "disabled", killed the flash-memory (the shortcut for "wipe memory" is a "k", so it must mean kill, right?), and re-read the registers, just to see that there was no change. I couldn't change them manually from the bootloader and the "timed access" has me confused, as it isn't described at what point in time I am supposed to write to that part of memory. The timed access procedure looks relatively straightforward. From page 34 of the user's guide: 1. Write 0xAA to TA (SFR 0xC7) 2. Write 0x55 to TA within 3 cycles 3. Modify timed-access protected register within 3 cycles. You want to clear bit 1 of WDCON. (SFR 0xD8). If you feel compelled to used C code to do this, make sure you look at the disassembly to guarantee those three things happen within 3 instructions of one another. Note that this procedure does not affect the content of the option control register, meaning if the watchdog timer was enabled, it will be again enabled at boot. You can do an in-application programming procedure if you want to manipulate the OCR in your software, however. Details for this are in the data sheet, rather than the manual that I've been citing all day. Now, all discussion of timed access and IAP, have you done Erik's test to see if the watchdog is enabled? Following these experiences I had a little check-up on the errata for the controller and found out that revision A3 (which I consider myself unfortunate to own) has exactly this one bug concerning the OCR not being reset during kill-procedures (I just love the tone of that). Wow. That's not nice. Early revisions of all these parts, '420 included, seem to have their share of issues. Of course, I don't have any other flash-based micro's from Dallas in a DIP-case and don't want to mess around with PLCC-sockets and lots of jumper wires. So I ordered two samples of the '420 in the hope that they arrive in a new version.
/Thomas Have you looked at the errata sheet for the latest revision level of the '420? It's rather long. Perhaps what you really want is an A4 revision of the '450. --Sasha Jevtic |