Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
I have a quick question on DMA to Control Register setup. I've gone through the "Getting Started with DMA" guide, and there is certainly a lot to take in.
What I'm trying to do, mostly for the sake of understanding DMA usage within PSoC 3, is use a pushbutton which requests a DMA update from SRAM (let's assume there's "myVar", a uint8 variable which holds the data) to the value of an 8 bit control register. That is, "myVar"'s value is written via DMA to a control register upon a button press.
Based on my reading of the documents, I feel (and please correct me if I'm wrong) this can be accomplished by using a level (or edge) sensitive 'drq'. But I'm a little stuck on how to proceed from here (or maybe it's the lack of coffee) in code.
You guys at Cypress have, in my opinion, great reference documents for this platform (though I usually find that the most useful ones are the hardest to find!), and I am wondering if anyone can provide some guidance/point me to an app note that addresses my simple use case. Most of the examples seem to use arrays and multi-byte bursts.
I've included some relevant DMA code, which does not update the control register in hardware, and if anyone's up to the challenge of looking it over for blatant errors, your feedback would be much appreciated.
Thanks, and looking forward to figuring out how to harness the true power of this platform,
Your question why most of the examples are working with arrays is quite easily answered: The setup for "just" a single byte transfer is a large overhead, so a simple assignment would beat the DMA, even an interrupt driven solution would be faster.
It is always advisable to post a workspace bundle so that we all can have a look at all of your settings. To do so, use Creator->File->Create Workspace Bundle (minimal) and attach the resulting file.