STM32 PWM8 bug/typo

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
User avatar
Badger
Posts: 346
Joined: Mon Apr 18, 2011 6:07 pm

STM32 PWM8 bug/typo

Post by Badger »

It looks like there is a bug in the PWM8 code:

Code: Select all

CH_IRQ_HANDLER(TIM8_UP_IRQHandler) {

  CH_IRQ_PROLOGUE();

  STM32_TIM8->SR = ~TIM_SR_UIF;
  PWMD1.config->callback(&PWMD8);

  CH_IRQ_EPILOGUE();
}


Shouldn't that be PWMD8.config?

Also another reference to TIM1 in the comments
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32 PWM8 bug/typo

Post by Giovanni »

Of course it should, thanks for finding, fixed on repository.

Giovanni
User avatar
Badger
Posts: 346
Joined: Mon Apr 18, 2011 6:07 pm

Re: STM32 PWM8 bug/typo

Post by Badger »

There's also this comment:

Code: Select all

/**
 * @brief   TIM1 compare interrupt handler.
 * @note    It is assumed that the various sources are only activated if the
 *          associated callback pointer is not equal to @p NULL in order to not
 *          perform an extra check in a potentially critical interrupt handler.
 *
 * @isr
 */
CH_IRQ_HANDLER(TIM8_CC_IRQHandler) {
  uint16_t sr;
...
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32 PWM8 bug/typo

Post by Giovanni »

Thanks, fixed as well.

Giovanni
Post Reply