DMA

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

cross mob
MaTr_1730276
Level 4
Level 4
First like given 10 sign-ins First solution authored

Hello,

   

 

   

I'd to know which is the best method in terms of speed to load a DMA from SRAM.

   

My DMA load 32 bit from SRAM and write this value into the Shift Register FIFO.

   

My instruction is:

   

CyDmaTdSetAddress(DMA_ShiftReg_TD[0], LO16((uint32)SSI_Tx.b), LO16((uint32)ShiftReg_interface_IN_FIFO_VAL_LSB_PTR));

   

 

   

where SSI_Tx is a union:

   

union {

   

         uint32 l;

   

         uint16 w[2];

   

         uint8 b[4];

   

} SSI_Tx;

   

 

   

If I should change my instruction with the follow:

   

CyDmaTdSetAddress(DMA_ShiftReg_TD[0], LO16((uint32)fifo), LO16((uint32)ShiftReg_interface_IN_FIFO_VAL_LSB_PTR));

   

where "fifo" is an array:

   

uint32 fifo[4];

   

it would be more quicly to tranfer data from DMA to ShiftRegister or not?

   

Thanks and regards

   

Manuel

0 Likes
1 Solution
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello ,

   

Can you have a look at the section "Multi-Byte Data Alignment" in the document:"AN84810 - PSoC® 3 and PSoC 5LP Advanced DMA Topics". I hope that this will answer your queries.(Link:http://www.cypress.com/documentation/application-notes/an84810-psoc-3-and-psoc-5lp-advanced-dma-topi...).

   

Basically if the bytes are aligned, then the DMA transfer will be effective.

   

Thanks,

   

Hima

View solution in original post

0 Likes
3 Replies
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

please post your project

0 Likes
lock attach
Attachments are accessible only for community members.
MaTr_1730276
Level 4
Level 4
First like given 10 sign-ins First solution authored

Hello,

   

attached my project working on a PSoC 5 demo board.

   

Best regards

0 Likes
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello ,

   

Can you have a look at the section "Multi-Byte Data Alignment" in the document:"AN84810 - PSoC® 3 and PSoC 5LP Advanced DMA Topics". I hope that this will answer your queries.(Link:http://www.cypress.com/documentation/application-notes/an84810-psoc-3-and-psoc-5lp-advanced-dma-topi...).

   

Basically if the bytes are aligned, then the DMA transfer will be effective.

   

Thanks,

   

Hima

0 Likes