Skip to main content
Associate III
Jun 10, 2025 2:46 PM UTC
Solved

Test ADC1 channel on B-U585I-IOT02A

Hello,

I am trying the sleep example for the development board B-U585I-IOT02A, called PWR_SLEEP. I decided to add a channel from ADC1 module and I want to test, but I do not see any header file on the project. I enabled ADC1, channel 1 on pin PC0 in the .ioc file. Is it allowed to modify and add modules there?How do i see the complete code? 

Furthermore, I see the file from hal_adc contains #ifdef HAL_ADC_MODULE_ENABLED and currently the whole file is in grey as if the ADC module has not been enabled. I am not sure it should be like that.

Regards,

Gergana

This topic has been closed for replies.
Saket_OmBest answer
ST Technical Moderator
Jun 13, 2025 10:20 AM UTC

Hello @GTanova 

Is the macro HAL_ADC_MODULE_ENABLED defined in stm32u5xx_hal_conf.h? 

Saket_Om_0-1749809995541.png

 

 

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om

2 replies

Saket_OmBest answer
ST Technical Moderator
Jun 13, 2025 10:20 AM UTC

Hello @GTanova 

Is the macro HAL_ADC_MODULE_ENABLED defined in stm32u5xx_hal_conf.h? 

Saket_Om_0-1749809995541.png

 

 

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om
GTanovaAuthor
Associate III
Jun 16, 2025 7:23 AM UTC

Hello,

Yes, it is defined. 

Thank you for your answer.

/Gergana