- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PSoC 4100PS supports 8 channel DMA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have try CE223693 example, it's work great. Thank you for fast support.