cancel
Showing results for 
Search instead for 
Did you mean: 

MultiChannel(Scan) Continuous conversion mode of ADC sampling returns all 0s

saimaddy123
Associate II
Posted on April 06, 2011 at 11:11

MultiChannel(Scan) Continuous conversion mode of ADC sampling returns all 0s

3 REPLIES 3
saimaddy123
Associate II
Posted on May 17, 2011 at 14:30

I tried to verify if at least  DMA transfer is happening.. I see that it is not...I have put following code and DMA_GetFlagStatus always remains RESET. So, the control does not come out of that.. Does that ring any bell?

/* Test on DMA1 channel1 transfer complete flag */

  while(!DMA_GetFlagStatus(DMA1_FLAG_TC1));

  /* Clear DMA1 channel1 transfer complete flag */

  DMA_ClearFlag(DMA1_FLAG_TC1);

Thanks,

Sai

Posted on May 17, 2011 at 14:30

I tried to verify if at least  DMA transfer is happening.. I see that it is not...I have put following code and DMA_GetFlagStatus always remains RESET. So, the control does not come out of that.. Does that ring any bell?

It helps to plug in the bell first.

  /* Enable DMA1 clock */

  RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE);

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
saimaddy123
Associate II
Posted on May 17, 2011 at 14:30

Thanks a lot Clive1... In deed that was the issue....

Now, I could gather values with little problem.. I am seeing some non-zero(up to a decimal value 18) value on the adjacent channel as well. I am using an array of 6 values to gather values from 6 channels as specified in my code.

Thanks,

Sai