The Cy8c4100ps support DMA ?

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

cross mob
HaLi_1053816
Level 1
Level 1
First like given Welcome!

I order a 4100ps prototype board, The DMA does not work? Maybe it does not support dma now? I try with "RAM-DMA-IDAC_P4M_01-000.cywrk_.Archive01.zip" example.

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
DineshbabuM_66
Employee
Employee
First like received

Hi,

Attached is the DMA code example for PSoC 4100PS device.  This example generates sine wave using VDAC.  DMA is used to transfer LUT values from flash to VDAC input data register.

Thanks,

Dinesh

View solution in original post

5 Replies
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

PSoC 4100PS supports 8 channel DMA

0 Likes
lock attach
Attachments are accessible only for community members.
DineshbabuM_66
Employee
Employee
First like received

Hi,

Attached is the DMA code example for PSoC 4100PS device.  This example generates sine wave using VDAC.  DMA is used to transfer LUT values from flash to VDAC input data register.

Thanks,

Dinesh

Hello Dinesh,

Thank you for your fast respond.

I use DMA driver IDAC, It seem need 32 bit for every new IDAC value.

    uint32 Buffer1[128];

    uint32 newRegisterValue;

    newRegisterValue = IDAC7_1_IDAC_CONTROL_REG & ~IDAC7_1_CURRENT_VALUE_MASK;

    for (uint32 i=0; i<128; i++){

    Buffer1 = newRegisterValue |((i << IDAC7_1_CURRENT_VALUE_POS) & IDAC7_1_CURRENT_VALUE_MASK);

    }

    DMA_Start((uint32 *)Buffer1,(uint32 *)IDAC7_1_IDAC_CONTROL_PTR);   

    DMA_SetNumDataElements(0,128); 

Can I use one byte to change idac value wihe dma?

Than a lot.

Haixian

0 Likes

Hi Haixian,

To transfer data size of one byte, following changes are required in the DMA Component.

Data Element Size : Byte

Source and Destination Transfer Width : Byte to Word

Enable the option "Increment source address by one"

Note:  Keep byte as your array data type

This will transfer the current value from memory to LSB of Register as required by the value field of IDAC current setting register.

Thanks,

Dinesh

0 Likes
HaLi_1053816
Level 1
Level 1
First like given Welcome!

I have try CE223693 example, it's work great. Thank you for fast support.

0 Likes