Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > DMA termout/nrq and bursts

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



DMA termout/nrq and bursts
Moderator:
ANCY

Post Reply
Follow this topic



DMA termout/nrq and bursts

Doug McClean posted on 04 Jan 2012 11:16 AM PST
Top Contributor
38 Forum Posts

I have a question about the PSoC5 DMA, and I'm not confident of my interpretation of the app note on this point.

If I set the DMA__TD_TERMOUT_EN flag on a transaction descriptor, do I end up getting one pulse on nrq at the end of the entire TD? Or one at the end of each burst that that TD does?

Specifically, I'd like to set up the DMA to transfer 1kB from a UART to SRAM. I plan to set it up so that the TD does 1 byte per burst, and requires a request per burst. I plan to tie the rx_interrupt line from the UART (with the On Byte Received interrupt enabled) to the drq line on the DMA.

I'd like to get one interrupt when the entire 1kB is transfered, so that I can process that block and set up for receiving the next one, what I don't want is one interrupt after each byte.




Re: DMA termout/nrq and bursts

hli posted on 04 Jan 2012 12:03 PM PST
Top Contributor
675 Forum Posts

The datasheet states "The DMA generates a pulse of width two bus clocks at the
nrq when the DMA transfer is complete." This means the end of the whole TD.

I suggest you read the app note about the DMA (see http://www.cypress.com/?app=forum&id=2492&rID=53352 ) and the one about interrupts (see http://www.cypress.com/?app=forum&id=2233&rID=57231 ). Especially the latter one will be important for you, because the UART component doesn't create an interrupt per byte received, but stays high as long as a byte is in the receive buffer. You will need to take that into account.



Re: DMA termout/nrq and bursts

Doug McClean posted on 04 Jan 2012 02:07 PM PST
Top Contributor
38 Forum Posts

Thanks!

I had seen that sentence but didn't know how to interpret it. If someone reads this who is in charge of the app note, adding a phrase to explain that might be helpful to the next person.

I hadn't realized the UART byte received interrupt would stay high. This shouldn't be a problem if I set the DMA component's "Hardware Request" property to "Level", though, if I understand correctly. Thanks for the heads up.



Re: DMA termout/nrq and bursts

hli posted on 04 Jan 2012 04:01 PM PST
Top Contributor
675 Forum Posts

The proper explanation is hidden in the description of the TD_TERMOUT_EN flag - there it says 'when this TD completes'. If I think about it, this would mean if you have multiple TDs chained together, each one would (potentially) generate a trigger signal. I think it might be a good idea to add this explanation to the output signal (nrq) documentation.

 

I was not aware that the DMA could be trigger by a level signal - but it is actually what you need. Sounds like a good plan, then. Can you keep us informed when you got it working?






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20