EmbeddedRelated.com
Forums

PIO Interrupt not recognised after Software Reset

Started by saiberion June 30, 2008
I have a strange interrupt behaviour.

First a bit explanation of my set up and expected behaviour:
Communication between controllers:
- RS485 Bus
- input/output control lines
The RS485 master drives the input lines of the slaves, the inputs
generate a PIO IRQ of the slaves.

Slave controllers:
- Watchdog enabled, counter set to ca. 3s
- Watchdog resets at PIO interrupt on designated input control line.
- On watchdog underflow an interrupt is generated that calls a reset
function
- Reset function resets external peripheral by software and afterwards
resets the controller itself by writing 0xA5000005 to RSTC_RCR
- Over RS485 a reset can be issued that calls the reset function

Master controller:
- The input control line for watchdog reset on slaves is driven high
for ca. 50ms then low for ca. 2000ms

After power up all works fine. The master drives the input control
line as expected and the slaves do not reset.
But if I issue a reset over RS485 it seems that the watchdog is not
resetted anymore on this controller although the master still toggles
the line. Sometimes the slaves recovers after a few resets.

What I found out is that I have best result whenn letting the master
drive the line high ca. 1500ms and low ca. 500ms.
I have no problms as long as the reset over RS485 is processed while
the input line is driven high. But as soon as input line is low while
processing reset the PIO IRQ isn't recognised anymore.

I'd appreciate suggestions.

P.S.: Hardware reset is not desired because it causes unknown logic
states on EMP effect
Hello "saiberion",

What is the PIO IRQ seting used?
Level or Edge triggerd?

Regards
Vinay

--- In A..., "saiberion"
wrote:
>
> I have a strange interrupt behaviour.
>
> First a bit explanation of my set up and expected behaviour:
> Communication between controllers:
> - RS485 Bus
> - input/output control lines
> The RS485 master drives the input lines of the slaves, the
inputs
> generate a PIO IRQ of the slaves.
>
> Slave controllers:
> - Watchdog enabled, counter set to ca. 3s
> - Watchdog resets at PIO interrupt on designated input control
line.
> - On watchdog underflow an interrupt is generated that calls a
reset
> function
> - Reset function resets external peripheral by software and
afterwards
> resets the controller itself by writing 0xA5000005 to RSTC_RCR
> - Over RS485 a reset can be issued that calls the reset function
>
> Master controller:
> - The input control line for watchdog reset on slaves is driven
high
> for ca. 50ms then low for ca. 2000ms
>
> After power up all works fine. The master drives the input control
> line as expected and the slaves do not reset.
> But if I issue a reset over RS485 it seems that the watchdog is not
> resetted anymore on this controller although the master still
toggles
> the line. Sometimes the slaves recovers after a few resets.
>
> What I found out is that I have best result whenn letting the
master
> drive the line high ca. 1500ms and low ca. 500ms.
> I have no problms as long as the reset over RS485 is processed
while
> the input line is driven high. But as soon as input line is low
while
> processing reset the PIO IRQ isn't recognised anymore.
>
> I'd appreciate suggestions.
>
> P.S.: Hardware reset is not desired because it causes unknown logic
> states on EMP effect
>

It's edge triggered.

For additional information: the slave use the AT91SAM7S256 controller
and the master AT91SAM7X256

I can go with active WD Reset signal for most of the time and a short
pulse inactive WD reset. But still I'm a bit confused about that
behaviour

--- In A..., "vinaydand" wrote:
>
> Hello "saiberion",
>
> What is the PIO IRQ seting used?
> Level or Edge triggerd?
>
> Regards
> Vinay
>
> --- In A..., "saiberion"
> wrote:
> >
> > I have a strange interrupt behaviour.
> >
> > First a bit explanation of my set up and expected behaviour:
> > Communication between controllers:
> > - RS485 Bus
> > - input/output control lines
> > The RS485 master drives the input lines of the slaves, the
> inputs
> > generate a PIO IRQ of the slaves.
> >
> > Slave controllers:
> > - Watchdog enabled, counter set to ca. 3s
> > - Watchdog resets at PIO interrupt on designated input control
> line.
> > - On watchdog underflow an interrupt is generated that calls a
> reset
> > function
> > - Reset function resets external peripheral by software and
> afterwards
> > resets the controller itself by writing 0xA5000005 to RSTC_RCR
> > - Over RS485 a reset can be issued that calls the reset function
> >
> > Master controller:
> > - The input control line for watchdog reset on slaves is driven
> high
> > for ca. 50ms then low for ca. 2000ms
> >
> > After power up all works fine. The master drives the input control
> > line as expected and the slaves do not reset.
> > But if I issue a reset over RS485 it seems that the watchdog is
not
> > resetted anymore on this controller although the master still
> toggles
> > the line. Sometimes the slaves recovers after a few resets.
> >
> > What I found out is that I have best result whenn letting the
> master
> > drive the line high ca. 1500ms and low ca. 500ms.
> > I have no problms as long as the reset over RS485 is processed
> while
> > the input line is driven high. But as soon as input line is low
> while
> > processing reset the PIO IRQ isn't recognised anymore.
> >
> > I'd appreciate suggestions.
> >
> > P.S.: Hardware reset is not desired because it causes unknown
logic
> > states on EMP effect
>
Hello all,
has anyone found a fat file system lib that they like?

I'm looking to write 2-3 files at a time to a flash card and have looked at a few options.
I was wondering if you all have a staple that you like for this?

Thanks,
Tony Brenke
Tony

> I'm looking to write 2-3 files at a time to a flash card and have looked at a few options.
> I was wondering if you all have a staple that you like for this?

Take a look at www.hcc-embedded.com

--
42Bastian

Note: SPAM-only account, direct mail to bs42@...