kywwilson11 opened a new pull request, #16708:
URL: https://github.com/apache/nuttx/pull/16708

   ## Summary
   
   This pull request adds oversampling support and the ability to set the 
resolution of the adc result through Kconfig options. 
   I used the STM32G0 as a reference. 
   
   ## Impact
   
   STM32H5 - ADC Driver
   Should have no impact outside the STM32H5. 
   
   ## Testing
   
   Resolution Test: Set resolution to 1 (10-bits)
   Channel 3 = 0V. Channel 10 = 1.66V (Half-scale)
   
   NuttShell (NSH) NuttX-12.10.0
   nsh> adc
   adc_main: g_adcstate.count: 1
   adc_main: Hardware initialized. Opening the ADC device: /dev/adc0
   Sample:
   1: channel: 3 value: 0
   2: channel: 10 value: 516
   nsh> 
   
   Oversample Test: Oversampling ratio = 16x. Shift = 0. Result = 16-bit value
   Channel 3 = 0V. Channel 10 = 1.66V (Half-scale). 
   
   NuttShell (NSH) NuttX-12.10.0
   nsh> adc
   adc_main: g_adcstate.count: 1
   adc_main: Hardware initialized. Opening the ADC device: /dev/adc0
   Sample:
   1: channel: 3 value: 40
   2: channel: 10 value: 33061
   nsh> 


-- 
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