Skip to content

[HELP] Compilation Failure for ADC Example on Nucleo-H743ZI #16732

Description

@comejv

Description

When attempting to compile the apps/examples/adc application for the nucleo-h743zi board, the build fails with "undeclared" errors for specific ADC GPIO pin definitions (e.g., GPIO_ADC12_INP5, GPIO_ADC123_INP10, GPIO_ADC123_INP12, GPIO_ADC12_INP13, GPIO_ADC12_INP15) within boards/arm/stm32h7/nucleo-h743zi/src/stm32_adc.c:

nuttx/boards/arm/stm32h7/nucleo-h743zi/src/stm32_adc.c:86:3: error: 'GPIO_ADC12_INP5' undeclared here (not in a function); did you mean 'GPIO_ADC12_INP5_0'?
   86 |   GPIO_ADC12_INP5,
      |   ^~~~~~~~~~~~~~~
      |   GPIO_ADC12_INP5_0
[...]

When I added these lines to boards/arm/stm32h7/nucleo-h743zi/include/board.h it compiled:

/* ADC */

#define GPIO_ADC12_INP5   (GPIO_ADC12_INP5_0 | GPIO_SPEED_50MHz)
#define GPIO_ADC123_INP10 (GPIO_ADC123_INP10_0 | GPIO_SPEED_50MHz)
#define GPIO_ADC123_INP12 (GPIO_ADC123_INP12_0 | GPIO_SPEED_50MHz)
#define GPIO_ADC12_INP13  (GPIO_ADC12_INP13_0 | GPIO_SPEED_50MHz)
#define GPIO_ADC12_INP15  (GPIO_ADC12_INP15_0 | GPIO_SPEED_50MHz)

But I'm not seeing any change in values when running adc in nsh and sending waveforms in the ADC_IN headers.

My defconfig:
defconfig.txt

Any idea?

Thanks,
Côme

Verification

  • I have verified before submitting the report.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions