Re: Esp32 crash on nvs_set_blob (memcpy in ROM)
Posted: Sun Dec 15, 2024 1:23 am
You may want to try a bigger buffer to get as many samples as possible from each call to adc_continuous_read().Code: Select all
... esp_err_t ret = adc_continuous_read(handle, p, sampleSize, &ret_num, 0); if (ret!=ESP_OK || ret_num!=sampleSize) return; ...
And you probably don't want a timeout of 0.
Btw, the 'doc' says:
Does this match what you observe?If the generated results fill up the internal pool, newly generated results will be lost. Next time when adc_continuous_read() is called, this function will return ESP_ERR_INVALID_STATE to indicate this situation.