How do I change the phase of a sine wave generated by a DMA?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I am practicing setting up DMAs by using the examples given here:

http://www.cypress.com/documentation/application-notes/an52705-psoc-3-and-psoc-5lp-getting-started-d...

I would like to be able to change the phase of the sine wave by using a potentiometer. Does anyone have any tips on how to accomplish this?

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

choblet,

I looked through few options, it seems the most stable for multiple sine outputs is the project created by Evgeniy Pavlov (AKA 'pavloven') on Jun 18, 2016:

Generating multiple waveforms with fixed phase relationships

To keep two sine outputs synchronized it uses intermediate location in memory, which data is fetched by 32-bit DMA source. To have sine phase shifted, the sourcing array in RAM is simply re-calculated, which takes some time and may (potentially) lead to discontinuities when old data in RAM is being overridden.

I cosmetically freshened the original project, translating comments to English and adding phase update on timer event. Project is attached

/odissey1

DMA8x3_01a.png

DMA8x3_01b.jpg

View solution in original post

5 Replies