Skip to main content

dfsdm.stop()

Halts sampling

Availability

Device
Only available on the imp004m and imp006

Returns

Nothing

Description

This method immediately ends sampling. However much data it contains, the current buffer will be sent to the callback registered with dfsdm.configure(), with the callback’s byteCount parameter indicating how much data was placed in the buffer.

To recommence sampling after calling dfsdm.stop() call dfsdm.start().

dfsdm.stop() does not de-configure the dfsdm. For that, you will need to call dfsdm.reset(), but you should be aware that while dfsdm.reset() halts sampling, it does not pass the current buffer to the buffer-processing callback. As such, it is recommended that you call dfsdm.stop() to trigger the dispatch of the current buffer and then call dfsdm.reset() to de-configure the dfsdm.