Quantized pulse density of the PDM output signal, ranges from -128 to 127. But the range of [-90, 90] can provide a better randomness.
Return value
- ESP_OK: Set pulse density successfully - ESP_ERR_INVALID_ARG: Set pulse density failed because of invalid argument - ESP_FAIL: Set pulse density failed because of other error
Notes
The raw output signal requires a low-pass filter to restore it into analog voltage, the restored analog output voltage could be Vout = VDD_IO / 256 * density + VDD_IO / 2 This function is allowed to run within ISR context This function will be placed into IRAM if `CONFIG_SDM_CTRL_FUNC_IN_IRAM` is on, so that it's allowed to be executed when Cache is disabled
Related Functions
Found 8 other functions taking a sdm_channel_t
argument: