This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

2812 Prototype board won't run code, but I can single step in debugger.

I have a prototype board that I am running some very basic code on. This code executes just fine as long as I single step through it on the debugger. If I let it run, it ends up trying to execute code in low memory 0x66. This same code, when run on the ezDSP works just fine in both modes. Any clues??

Thanks,

Phil

  • The boot ROM maps the illegal trap (ITRAP) to address 0x66.

    When you say "let it run" do you mean from a power on reset? If so I would check that the boot mode is set properly.

    One difference between stepping code and running code is stepping will not take interrupts. It is possible that an interrupt is putting the program counter into the weeds.
  • When I say "let it run", I mean when I run it in the debugger, instead of single stepping. I have replaced all of the interrupt vectors in the code with the code from "DSP281x_PieVect.c", but I still don't get to the default ESTOP that is in any of the ISRs. Also, when I get there, it looks like my stack is corrupted, because the SP is much larger than it should be. The code that I am running just toggles some GPIO's in a method, and calls a simple delay loop, all of which shouldn't use more than a few bytes on the stack.. This code also runs OK on  an ezDSP board. I am running completely out out M0,M1 and H0 SARAM, and always through the debugger. I suspect that there is a problem with this prototype board that I am working with, but I'm not sure where else to look. Any hints or tips to debug this issue would be appreciated.

  • Phil,

    What does your linker command file look like? Where are you mapping the stack and what is the size of the .stack section?

    sal
  • As I suspected, the prototype board had some hardware issues. A little electrical rework, and I am now able to run correctly.


    Thanks for all the help!

    Phil