- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everybody,
I'm coding a adc lecture (14 bits) to SRAM with DMA. The idea is, save the row size of flash (255 bytes) first on the SRAM. When the transaction is complete, move the SRAM data to the flash.
The problem is simple, i got mi DMA configured on 0x1fff8000, so i will use to 0x1fff80ff, but using the transfer count with 255 bytes, crash the program, but using around 60 transfer count never crash on the debug process (the data limit it's 4096 if i'm not wrong).
The next step it's stop when the 255 bytes are wrote on SRAM for later write to flash using CyWriteRowData();
Regards and thanks in advance,
Xavier.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I looked at your project.
You need to try to use the DMA wizard to configure your DMA, and transfer into an Array of data (which could be called ADC_DATA[]) rather than into CYDEV_SRAM_BASE.
The software Heap exists at the beginning of SRAM (which is CYDEV_SRAM_BASE), among other things. Using a destination array variable will fix some of this problem and get you farther down the road.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
xaca,
It is hard to advise w/o seeing the code. Please post your code
Select project in the Explorer window. Then File->Create project bundle->Minimal. In created *.zip file delete Generated_files folder to reduce size of the archive.
The simptoms you mentioned indicate that DMA pointer moves beyond allocated array space and basically wanders across RAM.
/odissey1
- 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
I looked at your project.
You need to try to use the DMA wizard to configure your DMA, and transfer into an Array of data (which could be called ADC_DATA[]) rather than into CYDEV_SRAM_BASE.
The software Heap exists at the beginning of SRAM (which is CYDEV_SRAM_BASE), among other things. Using a destination array variable will fix some of this problem and get you farther down the road.