embedded systems developers tools, cross compilers
  Home  |   SwiftX Archive  |   SwiftForth Archive  |

Re: Exception Trouble

From: Noel Henson <noel_at_noels-lab.com>
Date: Thu, 9 Sep 2004 09:22:30 -0700

Fred,

You are right that initializing a port inside an ISR is undesirable. I did
not have a hand in the hardware design. I am working around that fact that
the interrupt is the NMI. I need to be able to turn it off and continue
execution before the interrupt is unmasked. In the 68331, I can only
re-initialize the port so the NMI pin becomes an input. Then the input
needs to be polled to determine if it really is a power down or noise on
the NMI. Anyway, I need to re-initialize the port so I can exit the
exception and (optionally) continue processing. It's a long story.

> true # do-powerdown? AB W MOV

Yes, that would work for a varible. I'm using a value for historical
reasons. Originally do-powerdown? was a routine that returned a flag. For
reasons of expediency I changed it to a value so I wouldn't have to change
all my do-powerdown? instances to do-powerdown? @ instances.

Noel

On Thursday 09 September 2004 08:03 am, you wrote:
> Hi Noel,
>
> Without knowing exactly what code is being generated by
> in powerdown , I would guess that you are not saving
> enough registers.
>
> Philosophically, initializing a port inside an ISR is
> unusual and perhaps even undesirable. Could the
> ISR be reduced to:
> true # do-powerdown? AB W MOV
>
> which as I recall requires no registers to be saved.
>
> Regards,
>
> Fred Carter
>
> ===========================================================
>
> The information in this email is confidential, and is intended solely for
> the addressee(s). Access to this email by anyone else is unauthorized and
> therefore prohibited. If you are not the intended recipient you are
> notified that disclosing, copying, distributing or taking any action in
> reliance on the contents of this information is strictly prohibited and may
> be unlawful.
>
> ===========================================================

-- 
------------------------------------------------------------------
  Noel Henson
  www.noels-lab.com	Chips, firmware and embedded systems
  www.vimoutliner.org	Work fast. Think well.
----------------------------------------------------------------------
swiftx_at_forth.com          The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe" to swiftx-request_at_forth.com
For list command help, send subject "help" to swiftx-request_at_forth.com
Message archives are located at http://www.forth.com/archive/swiftx
----------------------------------------------------------------------
This list is a forum for SwiftX users.  For product support and bug 
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Thu Sep 09 2004 - 09:20:55 PDT

This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 03:04:49 PST