> Make sure that you clear NMI (bit 15) in the TFR prior to return.
many thanks for this accurate hint. It works like expected. There
is no bouncing at the NMI and I can count the number of edges...
Reply by Mr Rogers●February 9, 20042004-02-09
"Janvi" <janvi@despammed.com> wrote in message
news:pan.2004.02.08.22.08.04.544775.2422@despammed.com...
> we have 2 Infineon Demo boards V202b for the XC164
> and the XC161. In the meantime my application runs
> well including correct speed and PLL but the thing
> crashs if a NMI occurs. The correct vector location
Make sure that you clear NMI (bit 15) in the TFR prior to return. If you
don't it will immediately interrupt again thus causing the system to hang.
All Class A & B Interrupts require this to function correctly.
Heath
Reply by Gary Kato●February 8, 20042004-02-08
>but the thing crashs if a NMI occurs. The correct vector location
>(n+8) has been terminated by RETI and I assume this
>is correct.
I believe you assume wrong. Read up on NMI. For normal peripheral interrupts,
the interrupt flag is cleared by the CPU before entering the ISR. Not so for
NMI and traps.
>The file is toggle_pin.hex what I load into flash.
>This works fine and yellow LED is blinking with and
>without debugger if board is in internal standalone
>mode. If I press the NMI button the progam crashs and
>yellow LED stops blinking.
Does the code for toggle_pin show that it handles NMI? Don't assume that the
person who wrote the demo program handles every possible occurence. Many times,
the demo code is the bare minimum code.
Reply by Janvi●February 8, 20042004-02-08
we have 2 Infineon Demo boards V202b for the XC164
and the XC161. In the meantime my application runs
well including correct speed and PLL but the thing
crashs if a NMI occurs. The correct vector location
(n+8) has been terminated by RETI and I assume this
is correct.
Now I tried to load the Altium example from the CD
what has been shipped as add-on with the demo board.
The file is toggle_pin.hex what I load into flash.
This works fine and yellow LED is blinking with and
without debugger if board is in internal standalone
mode. If I press the NMI button the progam crashs and
yellow LED stops blinking.
2 boards, 2 applications, same behavior.
Any bugs known?