Good morning,
using an ESP32-S3, I would like to sample an input digital pin every 1ms during 100ms.
Is it possible to do this using a DMA ? The goal would be to delay a task during 100ms
and after the task wakes up, I would like to have the possibility the get the 100
results.
Do you think it is possible ?
best regards,
Thomas TRUILHE
ESP32-S3 : Use DMA to sample an input pin.
-
- Posts: 229
- Joined: Thu Jul 14, 2022 5:15 am
-
- Posts: 1709
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: ESP32-S3 : Use DMA to sample an input pin.
At 1ms intervals, it is possible to use the high resolution timer. Set up a periodic timer with 1000 micro-seconds interval and in the timer callback sample the input pin and add the sample to a sample buffer. After 100 samples are taken, stop the timer and notify the task that it can now process the data.
Who is online
Users browsing this forum: No registered users and 103 guests