Tool/software: Code Composer Studio
CCS version: 7.1.0.00015
Platform: ezDSP dev board with C5515 (on board XDS100v2 emulator/debugger)
OS: Ubuntu 17.04
I'm connecting to the ezDSP board via a USB cable. There's nothing else connected to the board, no power, no SD card, nothing.
I've been going through a cycle of programming/debugging/etc. successfully for weeks now, but now I'm trying more complicated things I've suddenly encountered a problem. When trying to debug a program, I can't get the registers on the C5515 to revert to their reset state.
For example, looking at the register browser, the DMA transfer status (DMACH0TCR2 STATUS) seems "stuck" at 1 - no matter how many times I reset, restart, reprogram or even unplug and replug the USB cable. Same for the CPU register BERR (bus error).
I have stripped my code down to nothing more than:
int main(void) { return 0 }
I try resetting the CPU, restarting it, filling the memory with 0. I've also tried writing firmware to write to certain registers to reset them, but nope. Changing them in the GUI doesn't have any effect, the GUI control just resets to the unwanted register value. Here's a screenshot of what I mean:
Sometimes the code runs. In my "empty main" example, it just runs to the end of main. In more complicated code, I can step through until I do something that relies on these registers (eg. wait for DMA activity to stop, or USB clock stop ACK) and then the code acts as though the register is set to the value I see... which makes sense, but it suggests that it's not just that CCS is showing the wrong value or that the XDS is mistaken; the registers must really be set to those values. It's as though the CPU reset and even a power cycle does not actually make those registers revert to their expected post-reset state.
If I mess around with CCS enough, either it'll freeze up totally or I'll get the error:
Error connecting to the target:
(Error -1138 @ 0x5F)
Device refused to allow debug mode. Power-cycle the board. If error persists, confirm configuration and/or try more reliable JTAG settings (e.g. lower TCLK).
(Emulation package 6.0.576.0)
Note also that if I power it off (by disconnecting USB) and plug it back in, it starts up with some strobing lights and LCD scrolling text - not code that I've ever written. Presumably the ezDSP starts up by loading some program off external memory into the C5515... could this be messing with the registers?
Anyway, I'm at a total loss as to what to do. Unfortunately I don't have other boards to test against. How do I proceed? How can I get the CPU to reset all of its registers to their post-reset values?