comejv commented on issue #16732:
URL: https://github.com/apache/nuttx/issues/16732#issuecomment-3085075932

   Ok after looking at 
`nuttx/arch/arm/src/stm32h7/hardware/stm32h7x3xx_pinmap.h` and #24 I started 
understanding things a bit more, I have now modified 
`nuttx/boards/arm/stm32h7/nucleo-h743zi/src/stm32_adc.c` like this to get 
reading from 10 channels on ADC1:
   
   ```c
   #define GPIO_ADC12_INP5   (GPIO_ADC12_INP5_0)   /* PB1, channel 5 */
   #define GPIO_ADC123_INP10 (GPIO_ADC123_INP10_0) /* PC0, channel 10 */
   #define GPIO_ADC12_INP14  (GPIO_ADC12_INP14_0)  /* PA2, channel 14 */
   #define GPIO_ADC12_INP15  (GPIO_ADC12_INP15_0)  /* PA3, channel 15 */
   #define GPIO_ADC12_INP18  (GPIO_ADC12_INP18_0)  /* PA4, channel 18 */
   #define GPIO_ADC12_INP19  (GPIO_ADC12_INP19_0)  /* PA5, channel 19 */
   #define GPIO_ADC12_INP3   (GPIO_ADC12_INP3_0)   /* PA6, channel 3 */
   #define GPIO_ADC123_INP7  (GPIO_ADC12_INP7_0)   /* PA7, channel 7 */
   #define GPIO_ADC123_INP11 (GPIO_ADC123_INP11_0) /* PC1, channel 11 */
   #define GPIO_ADC123_INP12 (GPIO_ADC123_INP12_0) /* PC2, channel 12 */
   
   static const uint8_t g_adc1_chanlist[ADC1_NCHANNELS] =
     { 5, 10, 14, 15, 18, 19, 3, 7, 11, 12 };
   
   static const uint32_t g_adc1_pinlist[ADC1_NCHANNELS] =
     {
       GPIO_ADC12_INP5,
       GPIO_ADC123_INP10,
       GPIO_ADC12_INP14,
       GPIO_ADC12_INP15,
       GPIO_ADC12_INP18,
       GPIO_ADC12_INP19,
       GPIO_ADC12_INP3,
       GPIO_ADC123_INP7,
       GPIO_ADC123_INP11,
       GPIO_ADC123_INP12
     };
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to