I am developing on the 28069 Experimenter's Board, using Sys/Bios, and am having a problem with the DMA. I have my DMA channel setup to read data out of the ADC Results register. Now my DMA interrupt is triggered, so I assume that this means the DMA buffer has been filled. Now what I want to happen in the ISR is using a ping pong buffer scheme I read the data out of the DMA buffer, perform some averaging and send a Mailbox Post.
What is actually happening is hard to tell. It appears that the ISR is called, stops mid way, and starts at the top of the ISR again. It does this a couple times and then hangs. The way I have been diagnosing this is by using the debugger and printf statements. A printf statement at the start of the ISR is called 3 times, then it hangs. It never prints the printf statement at the end of the ISR. I also have a task that is spawned and pends for the Mailbox Post at the end of the ISR, but the Mailbox Message is never read, whether that is because no message is sent or execution never leaves ISR, I don't know. When I try to set breakpoints to step through, I usually get some weird things happening, like the following:
C28xx: Trouble Setting Breakpoint with the Action "Continue or Finish Stepping" at 0x3ddeb4: Error 0x00000008/-1066 Error during: Break Point, Cannot set/verify breakpoint at 0x003DDEB4
This message happens after I read the data out of the DMA buffer and am stepping through code creating a mailbox message to post. My guess is this is where the execution of the ISR would revert back to the start. Also when stepping through the code, printf statements generate runtime erros when being stepped over, and I have to comment them out. This seems like a separate issue, but not sure what the cause is.
So lots of confusion, is this an issue with how the DMA is set up, or am I making an error on how I am trying to debug it?