-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADC DMA interrupt function gets stucked over time using esp32s3 (IDFGH-14178) #14978
Comments
Hi, you can try to set |
I am not sure, if that causes your issue, but internally adc_continuous_read() uses xRingbufferReceiveUpTo() to get the data from the internal ADC Continuous ring buffer. There is also a function xRingbufferReceiveUpToFromISR() which makes me believe, that you shouldn't use adc_continuous_read() from within the ISR. The callback that you registered however is called from within the adc_dma_in_suc_eof_callback(), which is effectively the ISR of the GDMA end of frame interrupt. |
You're right, we should not use |
Thanks for reporting, feel free to reopen. |
Answers checklist.
General issue report
IDF version.
v5.3.1
Espressif SoC revision.
ESP32-S3
Operating System used.
Windows
How did you build your project?
VS Code IDE
What is the implementation?
The code uses ADC2 for oneshot measurements of two input signals and ADC1 continuous mode for taking periodic samples of another two input signals. I have implemented a counter that counts the number of invokes of the interrupt function.
What is the expected behaviour?
The code must consistently invoke the interrupt function adc_dma_callback() throughout the device's operation. The counter should be constantly increasing.
What is the actual behavior?
The code enters the adc_dma_callback() a random number of times and after that it just never calls it again. The counter gets stucked at a different value everytime I reset the device.
Current code implementation?
Similar behaviour?
I had the same issue using the v5.0.7, however, I found an issue in the adc_continuous.c file. There I have modified the adc_continuous_new_handle() function the following way:
The owner_check used to be true. This fixed my issue. However, in the 5.3.1 version, the implementation is modified and I wasn't able to resolve the issue. Please explain how I can solve this problem in a similar manner?
The text was updated successfully, but these errors were encountered: