-
Notifications
You must be signed in to change notification settings - Fork 6.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
drivers: adc: stm32: use correct device in dma callback #59834
drivers: adc: stm32: use correct device in dma callback #59834
Conversation
The device passed to the DMA callback is the DMA device. Instead use the ADC device available in the private data. Signed-off-by: Brett Witherspoon <[email protected]>
@heinwessels, you worked on the DMA part for the STM32 ADC. Would you mind taking a look? |
For a little background, I discovered this issue while adding ADC DMA support for the nucleo_u575zi_q board which uses the GPDMA and this causes a fault. I checked the other STM32 DMA drivers including the new BDMA and the DMA device is passed to the callback. I will be submitting other fixes for the GPDMA driver which includes adding the nucleo_u575zi_q board to the ADC DMA tests if that is helpful to evaluate this change. But this fix seems like it could go ahead and be submitted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems I did get it wrong in the initial implementation. Nice catch!
All contributions are welcome. Concerning the DMA on ADC, ideally its support should be added for all STM32 series. That's in my to-do list of ADC driver improvements, but not in the immediate future, so if you have something working, even if only for U5, you're welcome. |
The device passed to the DMA callback is the DMA device. Instead use the ADC device available in the private data.