Skip to content

Commit 434fd37

Browse files
committed
AdvancedADC: Use the high resolution timer for buffer timestamps.
Signed-off-by: iabdalkader <[email protected]>
1 parent cd5fb74 commit 434fd37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AdvancedADC.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef *adc) {
238238
// NOTE: CT bit is inverted, to get the DMA buffer that's Not currently in use.
239239
size_t ct = ! hal_dma_get_ct(&descr->dma);
240240

241-
// Timestamp the buffer. TODO: Should move to timer IRQ.
242-
descr->dmabuf[ct]->timestamp(HAL_GetTick());
241+
// Timestamp the buffer.
242+
descr->dmabuf[ct]->timestamp(us_ticker_read());
243243

244244
if (descr->pool->writable()) {
245245
// Make sure any cached data is discarded.

0 commit comments

Comments
 (0)