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

   ## Summary
   
   Fixed three bugs in the RP23XX (RISC-V) PWM driver, mirroring the fix 
previously applied to the ARM variant:
   
   * setup_period: The previous divisor calculation used integer arithmetic 
that caused overflow and loss of precision. The divider is now computed as a 
16-bit fixed-point value (div16) using 64-bit arithmetic, and clamped to the 
valid hardware range (0x10 to 0xFFF).
   
   * setup_pulse: The compare value was incorrectly scaled by TOP instead of 
65535, producing wrong duty cycles. The formula is now corrected to ((duty * 
(top + 1)) / 65535) with an overflow guard.
   
   * pwm_start: The driver was not updated as part of the breaking change 
introduced in commit 4df80e19 ("!drivers/pwm: remove PWM_MULTICHAN option"). 
Access to single channel API is now info->channels[0].duty instead of 
info[0].duty.
   
   ## Impact
   
   RELEASE
   
   ## Testing
   
   CI


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