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

   ## Summary
   
   Some RISC-V ESP32 SoCs have only a single timer group. The oneshot driver 
previously hardcoded GROUP_ID to 1 (Timer 0 of Timer Group 1), which overflows 
`soc_timg_gptimer_signals` and crashes in `periph_rcc_acquire_enter` on chips 
such as ESP32-C2.
   
   This change binds oneshot to the last timer group with 
`TIMG_LL_GET(INST_NUM) - 1`, and compiles the GPTIMER group 1 lower-half only 
when `TIMG_LL_GET(INST_NUM) > 1`.
   
   ## Impact
   
   Impact on user: No.
   
   Impact on build: No.
   
   Impact on hardware: No.
   
   Impact on documentation: No.
   
   Impact on security: No.
   
   Impact on compatibility: No.
   
   ## Testing
   
   ### Building
   
   ```
   make distclean && ./tools/configure.sh -S esp8684-devkitm:timers && make -j 
&& make flash ESPTOOL_PORT=/dev/ttyUSB0 && picocom -b 115200 /dev/ttyUSB0
   ```
   
   ### Running
   
   ```
   nsh> oneshot
   ```
   
   ### Results
   
   ```
   Opening /dev/oneshot
   Maximum delay is 18446744073709551615
   Starting oneshot timer with delay 2000000 microseconds
   Waiting...
   Finished
   ```
   


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