Skip to main content
mahmoud
Associate
August 28, 2013
Question

Sampling Freqeuncy for the ADC STM32F4

  • August 28, 2013
  • 3 replies
  • 1111 views
Posted on August 28, 2013 at 12:47

The original post was too long to process during our migration. Please click on the attachment to read the original post.
    This topic has been closed for replies.

    3 replies

    Tesla DeLorean
    Guru
    August 28, 2013
    Posted on August 28, 2013 at 14:15

    I'd use a timer to pace samples.

    Your USART output speed is likely to be bandwidth limiting.
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    mahmoud
    mahmoudAuthor
    Associate
    August 28, 2013
    Posted on August 28, 2013 at 14:46

    Dear Clive,

    Thank you for your fast response ! :)

    But is there a method to get the sampling frequency without using a timer routine ?

    i will keep it as it is ... but i need to know the sampling rate since i need to write some codes using MATLAB .... 

    cheers

    Tesla DeLorean
    Guru
    August 28, 2013
    Posted on August 28, 2013 at 16:17

    Give the way your code is constructed, I guess you'd want to time stamp the EOC.

    Personally, I wouldn't be using SCAN mode as you only have ONE channel. If you want to control the sample rate via the ADC, then you'd want to program the cycles, and use it in CONTINUOUS mode.

    Using software delay loops, and manually firing the ADC are not ways to get consistent sample periodicity.

    I'd trigger it with a timer, and have a hard/known time line.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..