STM32F407 ADC Total Conversion Time measurement - DMA mode
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-07-02 10:20 AM
Hi,
I'm working on a STM32F407 chip and I have enabled one of its ADCs and I read the values by the DMA. I mean using this HAL function: HAL_ADC_Start_DMA
is there anyway to measure the ADC sampling time or conversion time? (according to the datasheet it must be around 2.4Msps for each ADC).
I don't mean by calculations, I mean measuring it in the live debugger or something like that.
#adc-speed #adc-sampling-time #dma-adc #stm32f407Solved! Go to Solution.
- Labels:
-
ADC
-
STM32F4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-07-04 2:43 AM
I solved this by enabling the DMA interrupt and checking its triggering frequency.
:)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-07-02 10:18 PM
I think not.
And as mentioned in another thread here, the ADC is a relatively simple state machine, that executes the configured operation in the number of clock cycles specified.
You can try to measure the time from the start of conversion to the EOC/EOS interrupt, either with a scope or the cycle counter. Need to subtract the 12 cycles for interrupt entry, though.
Not sure (and don't care) what additional ballast Cube builds around that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-07-03 1:33 AM
Actually the sampling rate or conversion time is very important in my application and I want to make sure that it does the job 'on time' with maximum speed.
Actually I have measured the time by the DMA interrupt occurrence, but it is slower in term of the last argument in the
HAL_ADC_Start_DMA
function. I can not put values lower than 10 for that and by 10, I get a signal around 100KHz. it means each conversion at 5uS.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-07-04 2:43 AM
I solved this by enabling the DMA interrupt and checking its triggering frequency.
:)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-07-04 5:49 AM
To be correct, this includes the time DMA needs to move the value across the bus.
