Infineon XC16x Boards (using the Altium Compiler)

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?
Reply to
Janvi
Loading thread data ...

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.

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 to
Gary Kato

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 to
Mr Rogers

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 to
Janvi

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.