Closed azeemshatp closed 4 years ago
Looks good to me.
What is the plan to actually use ADC2 in our firmware now? Are you going to submit a PR to Zephyr (cleanest solution, but takes longer) or will you copy the needed parts of the driver to our repository (don't know how much of the driver is needed or if we can just circumvent some parts of the official driver)?
I think it is better to copy the needed parts of the driver to our repository.
Hi, I suggest to go dual-mode: have a copy of the relevant files but in parallel submit changes to Zephyr guys for inclusion.
Hi, I suggest to go dual-mode: have a copy of the relevant files but in parallel submit changes to Zephyr guys for inclusion.
Agree that makes sense. Just attended the Zephyr API meeting regarding my DAC PR and they were very helpful.
If I build this in PlatformIO I get some Kconfig related warnings and the following error:
Error: Aborting due to non-whitelisted Kconfig warning 'warning: default on the choice symbol ADC_1
(defined at charge-controller/boards/arm/mppt_2420_hpx/Kconfig.board:10, drivers/adc/Kconfig:42,
drivers/adc/Kconfig.stm32:16) will have no effect, as defaults do not affect choice symbols'.
Did it compile without issues on your end, @azeemshatp ?
These fixups are also still wrong (which was my fault). But would be good to correct that within this PR: https://github.com/LibreSolar/charge-controller-firmware/blob/14249492a351e06e642f15a480012ee782a3c687/boards/arm/mppt_2420_hpx/dts_fixup.h#L14
Closing this PR. DMA support (first commit) was cherry-picked to master. Inclusion of ADC2 will be done in a dedicated PR.
What does this PR do? ADC-DMA support for STM32G431 and ADC2 support for MPPT_2420_HPX in the Zephyr framework.
What are the relevant tickets? NA
Where should the reviewer start? The file daq_zephyr.c
How should this be manually tested? ADC values must be updated automatically by the DMA interrupt routine.
Any background context you want to provide? To work with ADC2, stm32 adc driver macro in the file adc_stm32.c needs to be modified.