Skip to main content
saimaddy123
Associate III
April 6, 2011
Question

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

  • April 6, 2011
  • 3 replies
  • 633 views
Posted on April 06, 2011 at 11:11

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

    This topic has been closed for replies.

    3 replies

    Tesla DeLorean
    Guru
    May 17, 2011
    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 VenmoUp vote any posts that you find helpful, it shows what's working..
    saimaddy123
    Associate III
    May 17, 2011
    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

    saimaddy123
    Associate III
    May 17, 2011
    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