zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.67k stars 6.52k forks source link

ADC Support for STM32U575 #48682

Closed vibhor-meshram closed 2 years ago

vibhor-meshram commented 2 years ago

Is your feature request related to a problem? Please describe. I need to use ADC for my project. I am using nucleo_u575zi_q board. I am using samples/drivers/adc example. I looked into PR #39202 where ADC support is provided for STM32U585 board. I made necessary changes to my dts files for ADC to work. The ADC sample code is now compiling and running as well. I have configured pc0 as adc pin. But the output I am getting is floating values irrespective of what I connect at ADC input(VCC/GND).

Results `ADC reading:

Describe the solution you'd like The output of ADC must change as per the input.

Describe alternatives you've considered Added adc node to dts file by referring to STM32U585 board. Is there anything else needed to be done?

Additional context Attached: DTS file, overlay file nucleo_u575zi_q_DTS_File.txt nucleo_u575zi_q_overlay_file.txt .

erwango commented 2 years ago

I had a test on b_u585i_iot02a and I'm seeing same behavior. Converting to bug

FRASTM commented 2 years ago

@vibhor-meshram could you please check with the https://github.com/zephyrproject-rtos/zephyr/pull/48770

vibhor-meshram commented 2 years ago

ADC works using above fix.