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

   I also added this to enable ADC2:
   ```c
   #ifdef CONFIG_STM32H7_ADC2
           /* Configure the pins as analog inputs for the selected channels */
   
           for (i = 0; i < ADC2_NCHANNELS; i++)
             {
               if (g_adc2_pinlist[i] != 0)
                 {
                   stm32_configgpio(g_adc2_pinlist[i]);
                 }
             }
   
           /* Call stm32_adcinitialize() to get an instance of the ADC 
interface */
   
           adc = stm32h7_adc_initialize(2, g_adc2_chanlist, ADC2_NCHANNELS);
           if (adc == NULL)
             {
               aerr("ERROR: Failed to get ADC2 interface\n");
               return -ENODEV;
             }
   
           /* Register the ADC driver at "/dev/adc[0-1]" */
   
           ret = adc_register(devname, adc);
           if (ret < 0)
             {
               aerr("ERROR: adc_register(%s) failed: %d\n", devname, ret);
               return ret;
             }
   
           devname[8]++;
   #endif
   ```
   
   Is there any reason why ADC2 isn't included in the setup?


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to