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.

DMA and halting the target via debug

Hello,

I'm using EDMA with the McASP in read in and send out audio data to/from SDRAM. I'm connected to the C6747 on my custom board with an XDS100v2.

I put a breakpoint on a line in a function where I want to see the contents of the input buffer in which the EDMA writes the McASP Rx data. This buffer is in external SDRAM. L1D and L2 caches are disabled.

When the CPU halts at the breakpoint, the contents of the input buffer does not reflect the actions and status variables in the lines of code just prior to the breakpoint. My code stores the value of a memory location pointed to by a pointer.

data = *buf_ptr;

When the CPU halts after reading this location, I view the memory allocated to the buffer in the Memory window. The value supposed to be at the location (held in the pointer variable) is no where near. Does the EDMA continue to write between the moment of the breakpoint and the moment where the memory contents are visible?

I know from the EDMA datasheet that it cannot be halted by a debugger halt or breakpoint. I've seen proof of this because some contents of the buffer are modified every time I step. This is identified by red-colored values in the Memory window. What happens to the McASP peripheral on a CPU halt?

I absolutely need to see the contents of my input buffer when the CPU halts after a breakpoint. Is there a configuration that can acheive this?

Best regards,

SC

  • SC,

    scoutu75 said:

    Does the EDMA continue to write between the moment of the breakpoint and the moment where the memory contents are visible?

    I know from the EDMA datasheet that it cannot be halted by a debugger halt or breakpoint.

    You ask if the EDMA continues to run and then say that it cannot be halted, which is correct. You have answered your question. The EDMA does not have any hook that tells it to halt when the CPU halts.

    Neither does the McASP.

    scoutu75 said:
    L1D and L2 caches are disabled.

    I hope this is only for debug purposes, because disabling cache makes the system operate with less performance in almost all situations. What is your situation that has led you to disable the caches?

    scoutu75 said:
    I absolutely need to see the contents of my input buffer when the CPU halts after a breakpoint. Is there a configuration that can acheive this?

    What is the ultimate problem you are trying to solve? Finding a way to make things stop that are not designed to stop, that is a difficult task. You know this, because you have been trying for a while before posting this to the forum.

    Tell us some more about what is happening that you are trying to fix?

    The high-level statement of help for you is that as long as the McASP is receiving data and sending events to the EDMA, and as long as the EDMA is accepting events and PARAM is pointing to your input buffer, the input buffer will get filled at the McASP's data rate. So you will have to put a brake on the flow of data or misdirect it somewhere.

    Figuring out the best way to do that depends on what the eventual goal is, so that is why I ask the additional questions.

    Regards,
    RandyP

  • Hi RandyP,

    RandyP said:

    Does the EDMA continue to write between the moment of the breakpoint and the moment where the memory contents are visible?

    I know from the EDMA datasheet that it cannot be halted by a debugger halt or breakpoint.

    You have answered your question.

    [/quote]

    Yes, you're right, I did answer my own question! :)  I guess what I really wanted to know is if the McASP would continue to send Rx events. And you answered that by saying the McaSP continues to operate even when the CPU is halted.

     

    RandyP said:

    L1D and L2 caches are disabled.

    I hope this is only for debug purposes, because disabling cache makes the system operate with less performance in almost all situations. What is your situation that has led you to disable the caches?

    [/quote]

    Yes, I disabled cache only to debug this part of my code.

    To get back to the my issue, my code is continously looking at every new input data sample and waiting for a sequence. When it happens, I let pass a certain number of samples and then copy that amount into another buffer in internal RAM. The reason I posted my question is because the input buffer contents where different than the contents in the internal RAM buffer. I thought that the McASP events where stopped when the CPU was halted but now that I know that this is not the case, it explains the differences. I will use temporary buffers to analyze the data I'm looking for.

    Thanks for clearing this up for me.

    Best regards,

    SC