2022-02-03 01:38 PM - last edited on 2023-07-11 09:08 AM by Kevin HUBER
I've been trying for hours to read an analog value from a pin and write it over UART with no success on my STM32MP1. I've assigned PF14 to ADC2_INN2 and set IN2 to "IN2 Differential", then I generate the code and when I try to build I get a bunch of errors with regards to HAL functions.
I have "#define HAL_ADC_MODULE_ENABLED" in my stm32mp1xx_hal_conf.h, which I thought would be what I needed.
Solved! Go to Solution.
2022-02-07 12:47 AM
Hello @msche.1 ,
I generated a project using your ioc file and I didn't face any issue. There were no compilation error. I also tried to start a project from scratch with the same config and still, no error generated.
Could you please share your project to help you solve the issue?
Thanks,
Sara.
2022-02-04 01:59 AM
Hello @msche.1 ,
Thanks for your feedback,
Could you please share your .ioc file and specify the CubeMX version?
Thanks,
Sara.
2022-02-06 12:23 PM
2022-02-07 12:47 AM
Hello @msche.1 ,
I generated a project using your ioc file and I didn't face any issue. There were no compilation error. I also tried to start a project from scratch with the same config and still, no error generated.
Could you please share your project to help you solve the issue?
Thanks,
Sara.
2022-02-07 10:56 AM
Strange, I imported my IOC and all my code from main.c and it's working now.
2023-03-17 05:34 AM
even you enable the HAL_ADC_MODULE_ENABLED into hal conf file, you should add $(DRIVER_DIR)/stm32f1xx_hal_adc.c \ in C_SOURCES into makefile to compile all adc HAL functions.