Jump to content
43oh

Recommended Posts

Hi,

i would like to move data from ADC12MEM0 from its memory location to a choosen mamoery location by the means of DMA.

the ADC is working correctly.

Here it follows DMA configuration :

__data16_write_addr((unsigned short) &DMA0SA,(unsigned long) ADC_MEM_0_ADDRESS); //SHOULD BE ADC12MEM0 // Source single address
__data16_write_addr((unsigned short) &DMA0DA,(unsigned long) IMAGE_START_ADDRESS); // Destination single address
DMACTL0 =DMA0TSEL_26; //DMA Trigger Assignments:26==ADC12 end of conversion
DMA0SZ =12544; // Block size
DMA0CTL = DMADT_4 | DMASRCINCR_0 | DMADSTINCR_3 | DMADSTBYTE |DMASRCBYTE; // Rpt, inc


DMA0CTL |= DMAEN; // Enable DMA0

i expect the DMA to transfer 12544 byte at once, and at each ADCcycle i expect DMA0SZ to decrease of one unit.

But looking at DMA0SZ durign the dug it seems like it doen't even decreases at any ADC cycle

despite what it is written in the datasheet SLAU367b

"DMAxSZ register decrements with each word or byte transfer."

 

any tips on what  i'm missing?

thx in advance

irene

Link to post
Share on other sites

But looking at DMA0SZ durign the dug it seems like it doen't even decreases at any ADC cycle

despite what it is written in the datasheet SLAU367b

 

How are you debugging it? DMA0SZ's value is reloaded after all transfers are done.

Can you post your entire code (or at least the part where you configure ADC and DMA?)

Do you have any ADC or DMA ISRs?

 

Are you trying to capture analog input at interval or as fast as possible?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...