[stm32] Extend G0 adc to support adc dma#1136
Conversation
victorandrehc
commented
Feb 26, 2024
- Adds IRQ and DMA capabilities for the G0 ADC implementation.
- Adds Vbat, Vref and temperature channel bits on the ADC.
- Adds an example to the G0 adc with dma usage. The example is similar to the one present on stm32f401re.
4d0f6cc to
a217cc4
Compare
b5423b8 to
219b8d6
Compare
salkinium
left a comment
There was a problem hiding this comment.
Yes from my side, but I'm not the expert here. *gently pokes @chris-durand*
Totally forgot about this one … Will look at it tomorrow. |
|
@victorandrehc I've pushed some changes to modify the driver in a way that it also supports DMA and conversion sequences on STM32F0. Could you check if the change would be acceptable for your use case? The changed API additionally supports another sequence mode where the channels to be converted are specified as a bit mask. That's the only method available on F0 or if you need channels 16-18 to be part of the sequence or the length is bigger than 8. The single channel mode: bool setChannel(Channel channel);in-order sequence conversion mode with CHSELRMOD: bool setChannels(std::span<const Channel> channels);sequence conversion mode specified as mask: bool setChannels(ChannelMask_t channels); |
9355dce to
d86f513
Compare
|
@chris-durand I am going to review this later this week (probably on Wednesday) |
|
Hi @chris-durand after some careful analysis we think your suggestion suit us fine. |
|
Hi @chris-durand, is there anything i can do to help you merging this PR? |
d86f513 to
67986c7
Compare
|
Hi @victorandrehc, thanks for the reminder and sorry for the long wait. I did some more minor clean-up and consider this ready to merge in the current state. My original intention was to add and test an additional F0 DMA example but I was busier than expected and didn't find the time. We can merge this without it. One last thing I felt I had to change was the naming of the To clean this up I'd suggest replacing I'm kind of confident I didn't break anything but if a short hardware test is easy for you I'd appreciate it. |
salkinium
left a comment
There was a problem hiding this comment.
I'll merge it this weekend.
Co-authored-by: Christopher Durand <christopher.durand@rwth-aachen.de>
Co-authored-by: Christopher Durand <christopher.durand@rwth-aachen.de>
67986c7 to
901a3dc
Compare