Hi experts:
When I reading the document spru403n.pdf<<TMS320C6000 DSP/BIOS 5.31 Application Programming Interface (API) Reference Guide>>
I got following pieces of information. but not clean on the reasion, Not sure whether you can explain more.
1. Do not call HWI_enter, HWI_exit, or any other DSP/BIOS functions
from a non-maskable interrupt (NMI) service routine.
(question1: Software-generated exceptions. System calls that generate a SWE instruction are treated as exceptions. this exception share the same vector to NMI exception, whether we can call HWI_enter /HWI_exit in SWE handler?)
(question2: could you explain on more detail on why HWI_enter /HWI_exit can not be called from NMI handler ?)
due to details of the ’C6000 architecture, NMI disrupts the
code it interrupts to the point that it cannot be returned to. Therefore,
NMI should not be used to respond to run-time events. NMI should
be used only for exceptional processing that does not return to the
code it interrupted.
(question3: Whether it is possible to return from SWE exception?)
(question4: If I dynamically change one DSP code instruction to SWE instruction, then whe program execute to this instruction, a SWE exception will be trigger, whether it is possible to safely return from this SWE exception?)
Thanks.