What is the maximum ADC sample rate of the Photon. The closest reference I could find for this on the forums is here: What is maximum analog sample rate of Spark Core?. It refers to a maximum sample rate of 1MHz. Is this still accurate? Is this a hardware limitation, or imposed by any software abstraction layer that Particle adds on top of it? If it is the latter, is it possible to get at what the hardware is capable of? Thanks for the help!
1 Like
This might not be the absolute max rate possible via bare metal tweaking, but here’s what analogRead()
allows
https://docs.particle.io/reference/firmware/photon/#setadcsampletime-
I believe it is 6 million samples per second when using DMA. However, it requires directly accessing the hardware so it will be specific to the STM32F205 in the Photon and Electron. And, from a practical standpoint, the samples would be coming out so fast it’s unclear what you’d do with them with limited RAM.
Example 3 uses ADC DMA to do audio sampling:
3 Likes
Audio sampling is what I am trying to do. I will check out your example. Thanks!