daniel-p-carvalho commented on PR #20152:
URL: https://github.com/apache/nuttx/pull/20152#issuecomment-5690316248

   Updated as suggested.
   
   Refactored to follow the STM32H5 approach:
   - Removed all Kconfig options and custom lower-half operations.
   - Added `difsel` to `struct stm32_dev_s`, initialized from 
`BOARD_ADCx_DIFSEL` (if defined) or defaulting to `ADC_DIFSEL_DEFAULT` (`0`).
   - Written directly to `STM32_ADC_DIFSEL_OFFSET` in `adc_configure()`.
   - Implemented calibration in `adc_calibrate()` supporting single-ended 
(`ADCALDIF=0`) and differential (`ADCALDIF=1`) calibration based on 
`priv->difsel` (matching the STM32H5 pattern).
   - Tested and verified on physical hardware (Nucleo-G431KB) with differential 
channel 1 against 0V, +3.3V, and -3.3V.


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