acassis commented on code in PR #17007:
URL: https://github.com/apache/nuttx/pull/17007#discussion_r2345166623


##########
Documentation/platforms/arm/stm32h5/boards/nucleo-h563zi/index.rst:
##########
@@ -140,6 +140,17 @@ This configuration configures ADC1_IN3 and ADC1_IN10, 
which can be
 accessed at the CN9 A0 and A1 pins respectively. Modify
 nucleo-h563zi/src/stm32_adc.c to enable more channels.
 
+adc_watchdog:
+--------
+
+This configuration configures ADC1 channels 3 and 10 as regular, 
+single-ended channels (ADC1_INP3 and ADC1_INP10). The purpose of this config
+is testing analog watchdog 1. Additionally, DMA circular mode is configured
+(although not necessary). The watchdog is configured to trigger an interrupt
+if the 12-bit adc reading falls outide a window, currently values 0 to 2048
+(0V to V_full_scale/2). The window can be changed through an ioctl or 
+reconfigured through Kconfig.

Review Comment:
   I think the way you added in the Testing is nice:
   
   ```
   Procedure
   
   Build and flash NuttX with the above Kconfig. Register /dev/adc0 via the 
board init.
   Start continuous conversions (DMA circular enabled) and run the adc example 
to sanity-check normal operation.
   Tie both CH3 and CH10 to GND → verified no AWD interrupts and ADC continues 
normally.
   Tie either CH3 or CH10 to 3.3 V with AWD1 set to “all channels” → ISR fires 
as expected; conversions continue; AWD1 IRQ is disabled by the ISR.
   Switch to single-channel AWD1:
   Select CH3: drive CH3 above the window → ISR fires; drive CH10 above the 
window → no ISR.
   Select CH10: mirror the above.
   Re-enable the watchdog interrupt using the driver IOCTL; confirm subsequent 
out-of-window events retrigger the ISR.
   DMA circular mode check: stop conversions, call the DMA reset helper, 
restart conversions → verify buffer alignment and sample sequence remain 
correct.
   ```



##########
Documentation/platforms/arm/stm32h5/boards/nucleo-h563zi/index.rst:
##########
@@ -140,6 +140,17 @@ This configuration configures ADC1_IN3 and ADC1_IN10, 
which can be
 accessed at the CN9 A0 and A1 pins respectively. Modify
 nucleo-h563zi/src/stm32_adc.c to enable more channels.
 
+adc_watchdog:
+--------

Review Comment:
   You can test the Documentation building this way:
   $ cd nuttx/Documentation/
   $ make html
   
   Open the generated index.html to see if everything is fine.



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