- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can any one explain the usage of 'trq ' pin in DMA....and as well CyDmaChSetConfiguration(....uint8 tddone0, uint8 tddone1, uint8 tdstop);
The three parameters in this API....
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The trq pin can be used the end a DMA transfer prematurely. When it goes high during a running DMA transfer, it will be aborted (as if the transfer count has been reached). In all other cases it will get ignored.
This gets explained in the data sheet of the DMA component.
The three parameters you are looking at are not intended for use (AFAICS). In my project, they are set to (as generated by the DMA wizard IIRC):
CyDmaChSetConfiguration(DMA_DmaHandle,
BurstCount,
ReqestPerBurst,
DMA__TERMOUT0_SEL,
DMA__TERMOUT1_SEL,
DMA__TERMIN_SEL);
and then they get assigned by the CyFitter process (which fills in these constants).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I also have not found an example of the use of the trq. I plan to use it like this:
DMA makes the transfer of 1000 bytes from the devices in the real-time mode every 1000 MS, but the device does not always have time to prepare all the data.
I plugged the trq contact to the signal from the timer 1000 mSec.
If within the period of 1000mSec DMA will receive less than 1000 bytes - the trq will finish the transfer of forced and the new transmission will begin without delay.
I hope that I use trq correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, that sounds right. Other options might be to transfer one byte at a time, then your device signals when the next byte is ready. Or the device signals when the buffer of 1000 values is full.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
saw two variants:
1. The device knows that for the current TD data will no longer be. It may end current TD by the positive edge of the trq. Next TD will begin.
2. When the time allotted for the TD was over, I can send the positive edge to trq and complete the TD. Next TD will begin.
Perhaps there are still variants of use of trq?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From a standpoint of the DMA component, both are the same use case. TRQ just finishes the current DMA transfer. Note that the timeout will be difficult - the DMA will request as many bytes as you said it should from your device. It doesn't care how long the device needs to produce them - it just requests them at full speed.