I am using TMS320C6424 EVM evaluation Board.We have written our own McBsp driver,which is using DMA for the data transfer.
Can anybody tell how to access the current DMA pointer at any point of time.
Regards,
Kiran Kumar G R.
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.
I am using TMS320C6424 EVM evaluation Board.We have written our own McBsp driver,which is using DMA for the data transfer.
Can anybody tell how to access the current DMA pointer at any point of time.
Regards,
Kiran Kumar G R.
If "DMA pointer" means the current source or destination address for the next word to be transferred, then you can find it by looking at the active PARAM set for the DMA channel that is handling the McBSP transfers. The PARAM is in visible memory-mapped data space and can be accessed by the CPU. The method you use for programming the DMA channel's registers will also support reading from the PARAM to access the appropriate SRC or DST location.
If this answers your question, please click Verify Answer on this posting. If not, please reply back with additional information.
Yes DMA pointer is current source or destination address.I I have already read the SRC and DST pointers ,which is always giving the starting address of ping/pong buffers.
We are getting the Video interrupt,so when the interrupt comes ,i have read the Dst pointer so that i can read the latest contents of the current DST pointer of the Ping/Pong buffers.But the problem is whenever there is an interrupt,DST pointer is always showing the starting address of ping/pong buffer.So i will not be able to trace the current location.
I am giving breakpoint in ISR to check the address.Will it create any problem.
Regards,
Kiran Kumar G R.
For McBSP0 transmit, DMA channel 2 is mapped to the XEVT0 event and PARAM set 2 is mapped to DMA channel 2. This is your active PARAM set. It will show the current status, which also means that it shows the current count and the SRC address for the next word to be read from memory.
You will also have two other PARAM sets defined and loaded to provide the ping/pong buffer locations when a link operation occurs when one buffer has completely filled. This is also nearly coincident with the occurrence of the EDMA interrupt. Both the link operation and the interrupt may be triggered at the same time, but that depends on your setup.
So if you look at PARAM set 2 when the EDMA interrupt occurs, it will have just be linked with the next ping/pong buffer address.
If you just randomly read the SRC entry, you should see it change as each word is transmitted.
kiran kumar said:I am giving breakpoint in ISR to check the address.Will it create any problem.
Probably a breakpoint in an ISR will cause a problem. But it also provides the best method to debug certain problems, once, then you may have to reset the application and reload the program.
Interrupt in coming in McBsp1 .REVT1 is mapped to DMA Channel 5.There are two ISR routines,one for completion of DMA interrupts.Other for receiving GPIO interupt,here is where i am giving breakpoint.As soon as gpio interrupt comes ,next data what is coming in McBsp1 port is required.
So I am reading DST pointer of this param set when GPIO interrupt occurs.At this point of time ,i should get the DST address which will be other than the Starting address of Ping/Pong buffers,but i always get starting address.
We are using external memory for DMA buffers and cache is not enabled,Will this have an issue.
We are using CCS version 4.1,and DSP/BIOS 6_21_00_13.If i have to enable cache will these functions suffice,please clarify
Cache_enable(L2_Type);
Cache_wbInv( );
Cache_wait( );
Regards,
Kiran Kumar G R.
kiran kumar said:I am reading DST pointer of this param set when GPIO interrupt occurs.
What hexadecimal address are you reading? Use the debugger to stop on the breakpoint in the GPIO and use the watch window to observe the address.