DMA write to timer/counter period register

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

cross mob
soma_3858611
Level 1
Level 1
First like given

I need to use DMA to read from flash/ram and write to timer/counter period register. Using software API to write the period register works until the period (cycle time) gets smaller than a few micro-seconds.

Is there a way to do this on the provided timer/counter components for PSoC 5/6? I need this for high speed stepper / servo control.

Please help.

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

songtaoma,

Attached is RAM-DMA-Timer demo, which shows DMA configuration for 16,24 and 32-bit. The Timer must be reset for new RegValue to take immediate effect. Various schematic arrangements are possible depending on Timer_1 clock speed. You need to find best fit at high speed. Remember that DMA transfer takes time (~10 BUS_CLOCK), and its nrq output synced only with BUS_CLOCK, so it has to be synced with Timer_1 clock. Also, to reset Timer_1, the reset signal is synchronous and has to last long enough to catch Timer_1 input clock.

/odissey1

RAM-DMA-Timer_01a.png

RAM-DMA-Timer_01b.png

View solution in original post

7 Replies