RTEMS | bsp/aarch64/raspberrypi4: Add PWM peripheral support (!509)
Shaunak Datar (@skdatar)
gitlab at rtems.org
Thu Jun 19 14:37:45 UTC 2025
Shaunak Datar commented on a discussion on bsps/aarch64/raspberrypi/pwm/raspberrypi-pwm.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/509#note_124928
> +#define BCM2711_CM_PWM(x) BCM2835_REG(BCM2711_CM_PWM_BASE + (x))
> +#define CM_PWM_CTL_ENABLE_OSC (CM_PWM_PASSWD | CM_PWM_CTL_ENAB | CM_PWM_CTL_SRC_OSC)
> +#define CM_PWM_CTL_DISABLE (CM_PWM_PASSWD | CM_PWM_CTL_SRC_OSC)
> +
> +static inline bool rpi_pwm_validate(raspberrypi_pwm_master master,
> + raspberrypi_pwm_channel channel)
> +{
> + return ((master == raspberrypi_pwm_master0) || (master == raspberrypi_pwm_master1)) &&
> + ((channel == raspberrypi_pwm0) || (channel == raspberrypi_pwm1));
> +}
> +
> +rtems_status_code rpi_pwm_set_clock(uint32_t divisor)
> +{
> + if (divisor == 0) {
> + return RTEMS_INVALID_NUMBER;
> + }
Ahhh, yes,made the changes- also updated the validation logic in the set_data function
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/509#note_124928
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250619/7962fd90/attachment-0001.htm>
More information about the bugs
mailing list