I have some code running on the DSP side of the L137 part. It's pretty solid, stable code, with many, many thousands of hours of run time on it. It runs inside the internal RAM on the device. It boots out of SPI based flash. I wanted to move it to the external SDRAM, so I relocated everything to reside in SDRAM. It's based on DSP/BIOS 5.
Now a few strange things happen:
The code always runs through the main() function and then gets into the various threads which were created. In every case, the thread is blocked, usually on a TSK_sleep() call.
1) The Timer1 interrupt for the kernel isn't happening. The timer itself is running, and the interrupts are enabled, but if I set a breakpoint in the vector table for INT15, it doesn't get hit, unless I manually set the interrupt in the DSP core registers. DSP/BIOS sets up and handles the timer.
2) Occasionally Interrupt event 127 is showing up as being triggered. It's not enabled, so the flag just remains set until I reset the system. Docs say it's EMC_BUSERR, but there's next to no info about what that actually means. Best I can find is the Misc registers in the megamodule: BUSERR = 80000e01, which decodes to CFG write status error detected, transaction ID of E, and it's an addressing error. And this appears to be occurring somewhere inside the kernel. All the threads are blocked. It occurs after the last call to TSK_sleep(). Any way to find out what the bad address is? or who/what code address tried to make the bad access? What is a transaction ID and what is significant about 'E'?
3) Once the system gets into this state, if I download the version of the code that runs out of internal RAM, it will also hang most of the time. I have to perform a reset through the emulator to get the internal RAM version working again.
I have compared all the obvious registers from the register view (timers, gpio config, system config, interrupt controller, etc) between the two versions at the point it hangs, and everything is pretty much the same.
The code uses the EMAC controller and the EDMA3 controller, but neither one is initialized yet at the point where it hangs. There is nothing in EMIFA or EMIFB registers that looks like something went wrong.
Any info on debugging this BUSERR issue or why running out of external RAM would behave differently would be appreciated.
Thanks.