Hi, I am studying EVM6474.the board consist of AIF, EDMA,FSync.
i have enable AIF, initialize the transmiss buffer and receive buffer, then configuration EDMA(event-trigger,not manually-trigger), AIF, Interrupt, fsync, and setup timer for UMTS fsync.
After EDMA transfer completion once, i want to update buffer values and start transfer again.how can i do?
thanks.
Fill a second PARAM set with the updated buffer values for the next transfer. In the LINK field of the original/active event-triggered DMA channel's PARAM set, put the bottom 16 bits of the address of the second PARAM set.
When the original transfer has completed, the link operation will occur and will copy the 8 words from the second PARAM set to the active PARAM set. This will leave the DMA channel ready for the next event with the new, updated buffer values.
Search for answers, Ask a question, click Verify when complete, Help others, Learn more.
My EDMA is triggered by fsync event continuously. I just want to update buffer values not buffer address when everytime the transfer is completed.
I have known that I should fill a second PARAM set with the updated buffer values for the next transfer.
When the original transfer has completed, the link operation will occur and will copy the 8 words from the second PARAM set to the active PARAM set.
But I want to know that the whether the second PARAM set is filled next to the original/active event-triggered DMA channel's PARAM set or filled after original transfer completion?
you know, my fsync module is connected to the timer and the fsync event is continuous, after the original transfer has completed, the link operation will occur. when my action of update
buffer values is occur? I have do some tries, but only the first receive data is correct, the other times the received data is still the first transfered data. In other words , my updated data is
not reloaded to the buffer.
how can i do? and what sequences should i do?for example , start /stop timer, start/stop event,update buffer values...
thanks,specially for RandyP!
zhengwen zhang When the original transfer has completed, the link operation will occur and will copy the 8 words from the second PARAM set to the active PARAM set. But I want to know that the whether the second PARAM set is filled next to the original/active event-triggered DMA channel's PARAM set or filled after original transfer completion?
I do not understand "is filled next to", but I think the meaning is clear enough. Before starting the original transfer, the CPU must write to the active PARAM set and to the second PARAM set. When the transfer is triggered by the event, the parameters in the active PARAM set will be used to implement the transfer. When the original transfer has completed, the second PARAM set will be copied into the active PARAM set. Then, the active PARAM is is ready for another event that will use the new parameters copied into the active PARAM set.
zhengwen zhang you know, my fsync module is connected to the timer and the fsync event is continuous, after the original transfer has completed, the link operation will occur. when my action of update buffer values is occur? I have do some tries, but only the first receive data is correct, the other times the received data is still the first transfered data. In other words , my updated data is not reloaded to the buffer. how can i do? and what sequences should i do?for example , start /stop timer, start/stop event,update buffer values...
You can observe the active PARAM set within a memory window or a watch window. After the transfer has completed, Address and count values will have changed or will be replaced by the LINK operation, but at least this change will indicate that a transfer has occurred. And you may get an interrupt indicating that the transfer has completed. These observations will help you to kn ow that the EDMA has at least tried to copy data.
If the EDMA did try to copy data, and still your buffer has the old values, then I can think of some possible problems:
Since you are using the EVM, I will recommend you try the IACLIB for Interprocessor Communication over the AIF. This will be a useful working example for you to figure out how to configure and use the AIF. You can find information on the IACLIB in the TI Wiki tiexpressdsp.com here .
thanks for your patience, RandyP.
What you say I have understand. In the process of initialize the EDMA, I setup two PARAM set, one is active PARAM set (links to reload PARAM set),the other is reload PARAM set(links to reload PARAM set itself). I set a breakpoint in the ISR of transfer completion, but I find that the two PARAM set's values is "identifier not found: hActiveParam" and "identifier not found: hReloadParam" showed by watch window. WHY?
And, my trigger event to EDMA's transfer is event 4 (up-link, carry data from AIF inbound RAM to DSP ULbuffer)and event 5 (down-link, carry data from DSP DLbuffer to AIF outbound RAM), generated by fsync . two events is continuous and periodic, In the ISR of transfer completion, Should I disable the two event (maybe disable the two event interrupt ?)and then update ULbuffer date and DLbuffer date ,at last, enable these events again? Maybe ,should I must do other things ? if I need not to do anything about the two PARAM set in the ISR?
At last , i found my received date in ULbuffer are all 0x0000FFFF,only correct in the first time, why ?
thank you very much again !
best wishes...
zhengwen zhang I set a breakpoint in the ISR of transfer completion, but I find that the two PARAM set's values is "identifier not found: hActiveParam" and "identifier not found: hReloadParam" showed by watch window. WHY?
I set a breakpoint in the ISR of transfer completion, but I find that the two PARAM set's values is "identifier not found: hActiveParam" and "identifier not found: hReloadParam" showed by watch window. WHY?
The identifiers are not found because they are not available in the scope of the ISR. If all you want to do is use them in the watch window, then you just need to move the declarations to global (outside a function) rather than local (within a function).
zhengwen zhang In the ISR of transfer completion, Should I disable the two event (maybe disable the two event interrupt ?)and then update ULbuffer date and DLbuffer date ,at last, enable these events again? Maybe ,should I must do other things ? if I need not to do anything about the two PARAM set in the ISR?
In the ISR of transfer completion, Should I disable the two event (maybe disable the two event interrupt ?)and then update ULbuffer date and DLbuffer date ,at last, enable these events again? Maybe ,should I must do other things ? if I need not to do anything about the two PARAM set in the ISR?
Please forgive me for this friendly suggestion: "date" means July 9th for example, and "data" means information in a variable or buffer.
Normally, you should not disable any events in the ISR. If you have continuous data flow and need to service all the periodic events from fsync, you should not disable these events at any time.
It is not clear to me what you want to do with the AIF data. For example, what does "update ULbuffer data and DLbuffer data" mean? From guessing, it would appear that you want the AIF inbound RAM to be copied to the DSP ULbuffer by the EDMA, then in the ISR copy that data to another location, and let the EDMA copy the next AIF inbound RAM data to the same DSP ULbuffer as before.
Please briefly describe how you intend to move the data, and please include the regions of memory the data will be located (L1/L2/DDR2) and the size of the buffers and data transfers.
Thank you very much and I am very sorry for my clerical error!
Now, I will describe to you about what I want to do
I want to do a project about AIF loopback. I define two array .each array have 15360 elements. one is for receiving data called ULbuffer[15360], the other is for sending data called DLbuffer[15360]. Both are allocated in SDRAM which origin is 0x80000000 and length is 0x00800000. AIF inbound RAM is for data received by serdes, and AIF outbound RAM is for data which is going to send by serdes. In the down-link, I want to move datas from DLbuffer[15360] to AIF outbound RAM by EDMA ,and prepareing to send them. After loopback , in the up-link , the received data stored in AIF inbound RAM . I want to move datas from AIF inbound RAM to ULbuffer[15360] by EDMA . AIF inbound RAM 's address is 0xA0400000,and AIF outbound is 0xA2400000. both length is enough. At last, I will decide whether it is equal in the ISR of transfer completion (aif inbound RAM-->ULbuffer)after compare the values between ULbuffer and DLbuffer.
I setup two PARAM set (active PARAM set which is link to reload param set , reload PARAM set which is link to reload PARAM set itself )for down-link and two (active PARAM set which link to reload param set , reload PARAM set which is link to reload PARAM set itself )for up-link.
After compartion in the ISR of transfer completion(aif inbound RAM-->ULbuffer), no matter whether it is equal, I want to update the DLbuffer[15360], move them to AIF outbound , and prepareing to send them again. then after loopback, I move data from AIF inbound RAM to ULbuffer, and compare again. just like this , I hope to do the way continuously.
Question:
1. In the first time, it is equal after compartion. After update the ULbuffer data when enter into transer completion interrupt , but in the second time ,and more, I find every element is not equal between DLbuffer and ULbuffer. and in the ULbuffer, its value is all 0x0000ffff or 0x0000ff3f. what's wrong ?
2. whether should i disable the trigger event before compartion in order to stop EDMA? or how to disable the trigger event? you know , after transer completion , the active PARAM set will copy contents from reload PARAM set, and wait for another trigger event. Since the trigger event is continuous generated by frame sync, maybe after enter into ISR of transfer completion, the trigger event can trigger another EDMA'S transfer , but at this time , my action of update DLbuffer data have not completed.
3.when and where do my action of update DLbuffer data?
thank you very much ,Randy.
best wishes