how continuous A2D with lowest power
Posted: Fri Nov 25, 2022 9:21 pm
I want to gather continuous ADC data at 256hz (with timing errors < 0.01%). Every second or so I want to write that to external flash and do some other high level processing. What is the best way to do this?
I'm guessing that I keep the ULP running constantly looking for an external 256hz clock tick on a GPIO. And then gather the data into RTC Ram, and wakeup the main core every second to move that data into flash. If so, then I wonder if there is a limit to the write cycles for RTC Ram. And secondly, should I worry about not using a semaphore to ensure the ULP and main core aren't writing and reading simultaneously? Or should I try to halt the ULP between ADC sampling to save power?
The bottom line is to ask, what is the best way to do this?
Thanks, David
I'm guessing that I keep the ULP running constantly looking for an external 256hz clock tick on a GPIO. And then gather the data into RTC Ram, and wakeup the main core every second to move that data into flash. If so, then I wonder if there is a limit to the write cycles for RTC Ram. And secondly, should I worry about not using a semaphore to ensure the ULP and main core aren't writing and reading simultaneously? Or should I try to halt the ULP between ADC sampling to save power?
The bottom line is to ask, what is the best way to do this?
Thanks, David