NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Debugging an illegal address (NMI) problem on C24xx devices

From Texas Instruments Wiki
Jump to: navigation, search

The NMI cannot be debugged by simply stepping through your code and watch for the NMI to occur since all interrupts (including NMI) are disabled by the debugger in single-step mode. You must Run the code and let the NMI occur. In order to identify the part of your code that is causing the NMI, do the following.

1. Reset the DSP

2. Run your code and halt it after few seconds. Your code should be trapped at the NMI vector.

3. Open the CPU window in Code Composer so you can see the contents of the TOS by clicking View ---> CPU Registers ---> CPU Register.

Notice the contents of the TOS (Top Of Stack) register. This is the return address placed on the hardware stack when the NMI interrupt occured. Now Scroll through the Diassembly Window to the address indicated by the TOS to see the code that is causing the NMI.

Please keep in mind that the code will clear the pipeline before the interrupt is taken. For example, lets say, SPLK instruction causes the illegal address violation and it will cause this violation in the Execute phase of the pipeline. However, the next 3 instructions are already in process in the pipeline (i.e FETCH, DECODE, and READ pipeline phases), and they continue through to execute before the interrupt occurs. Therefore, the TOS register will be pointing to the fourth address after the address location that contains faulty code.

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Debugging an illegal address (NMI) problem on C24xx devices here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Debugging an illegal address (NMI) problem on C24xx devices here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Debugging an illegal address (NMI) problem on C24xx devices here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Debugging an illegal address (NMI) problem on C24xx devices here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Debugging an illegal address (NMI) problem on C24xx devices here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Debugging an illegal address (NMI) problem on C24xx devices here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Debugging an illegal address (NMI) problem on C24xx devices here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Debugging an illegal address (NMI) problem on C24xx devices here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Debugging an illegal address (NMI) problem on C24xx devices here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity