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.
2018-07-04 02:43 AM
I solved this by enabling the DMA interrupt and checking its triggering frequency.
:)
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.
2018-07-03 01: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.2018-07-04 02:43 AM
I solved this by enabling the DMA interrupt and checking its triggering frequency.
:)
2018-07-04 05:49 AM
To be correct, this includes the time DMA needs to move the value across the bus.