- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to use the code form Psoc 6 example "CE220924_VDAC_Sine_DMA01" to make an DAC produce a sin wave with 100 points in a DMA advencing into the DAC write buffer on the DAC trigger cycle. However I can't get the DMA to write the next value to the DAC. The DAC just outputs the first value over all clock cycles.
My code is in a zip folder attached. Let me know if there are any problems with it.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ChPi_4437311
DMA is not advancing due to incorrect configuration. Please change the DMA configuration to the following:
Fields changed:
1. Chain to descriptor - Changed from Nothing to Descriptor_1. This will make sure that the DMA is running continuously even without CPU intervention.
2. X loop transfer:
a. Number of data elements to transfer changed form 1 to 100. This will enable the entire array to be transferred. If this is set to 1, only the first element will keep getting transferred and will result in constant DC voltage.
b. Destination increment every cycle by - changed from 1 to 0. This will make sure that the data is being sent to the correct destination (ADC register). If this is set to 1, the destination address will keep incrementing and will result in error.
Do try this out.
Best regards
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ChPi_4437311
DMA is not advancing due to incorrect configuration. Please change the DMA configuration to the following:
Fields changed:
1. Chain to descriptor - Changed from Nothing to Descriptor_1. This will make sure that the DMA is running continuously even without CPU intervention.
2. X loop transfer:
a. Number of data elements to transfer changed form 1 to 100. This will enable the entire array to be transferred. If this is set to 1, only the first element will keep getting transferred and will result in constant DC voltage.
b. Destination increment every cycle by - changed from 1 to 0. This will make sure that the data is being sent to the correct destination (ADC register). If this is set to 1, the destination address will keep incrementing and will result in error.
Do try this out.
Best regards
Hari