PDA

View Full Version : Watchdog timer on Isopod


MKEARNY
08-13-04, 04:50 AM
I would like to use the watchdog timer on my isopod to cause a reset after 10ms or so.

I'm controlling some motors that could destroy some expensive hardware, if the isopod were to pin the PWM output at 100%.

I have read the motorola 56805 datasheet and see that there is a COPTO and COPCTL register at 0x0F30 and 0x0F31. I have tried to write to the Computer Operating Properly Timeout (COPTO) register, but I can't read back the number I wrote.
Here's what I tried:

HEX
0100 0FC1 !

When I enable the watchdog timer by writing a 1 to the COPCTL register, my isopod just freezes up. Shouln't it perform a reset and return a ISOMAX prompt?

( I know I need to write a AAAA and 5555 to the COP service register before the timer times out. )

How do I get the watchdog timer to work?

Is this supported by Isomax? Does Isomax keep me from talking to certain registers?

Thanks,

Mike

RMDumse
08-13-04, 10:13 AM
Originally posted by MKEARNY
When I enable the watchdog timer by writing a 1 to the COPCTL register, my isopod just freezes up. Shouln't it perform a reset and return a ISOMAX prompt?


Well, I haven't played with the WD yet, but to get you an early answer, there is probably a different vector for the WD reset vs. the POR reset. I'd first guess the vector is not initialized. I'd start by looking at the write up on interrupts.


How do I get the watchdog timer to work?


Sounds like you just did. If it did nothing, then it wasn't working. I think it did work and now you have to decide what you want it to do when it works, and point the vector at your code to do it... best guess.


Is this supported by Isomax? Does Isomax keep me from talking to certain registers?


No, IsoMax(TM) is open and doesn't restrict you from any register access.

nmitech
08-13-04, 01:27 PM
Randy is correct that there is a different vector for IsoPod interrupts. IsoMax relocates the COP/Watchdog Reset vector to address $7D82. Refer to the manual section, "Using CPU Interrupts in the IsoPod" for how to write a service routine, and to the subsection "The User Interrupt Vector Table" for this and other vector locations. Also you need IsoMax V0.61 or higher in order to be able to write to the flash interrupt vector. So if you are using V0.6 and don't have a Jtag cable, you can purchase one and sign the license agreement we will email you the srecord to load, or send the unit back to NMI for free upgrade.

MKEARNY
08-13-04, 03:36 PM
Ok I am looking in Isomax.pdf and Isopodx.pdf and I can't find the sections that you're refering too.

Where can I get the "manual"?

You really need to add a "downloads" link to the main page of your web page. So I don't spend 20 minutes clicking on things looking for it.

Thanks,

Mike

nmitech
08-13-04, 03:42 PM
The download page also can be found on the very first thread of the Pod's discussion forum,
http://www.newmicros.com/store/product_details/download.html

Here is the direct link to the interrupt appnote,
http://www.newmicros.com/store/product_manual/interrupts1.pdf

I will try to find an appropriate spot on the main page to add the download button in the near future