Page 1 of 1

STM32 PWM8 bug/typo

Posted: Sun Jan 22, 2012 12:24 pm
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

Re: STM32 PWM8 bug/typo

Posted: Sun Jan 22, 2012 12:34 pm
by Giovanni
Of course it should, thanks for finding, fixed on repository.

Giovanni

Re: STM32 PWM8 bug/typo

Posted: Sun Jan 22, 2012 12:40 pm
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;
...

Re: STM32 PWM8 bug/typo

Posted: Sun Jan 22, 2012 12:51 pm
by Giovanni
Thanks, fixed as well.

Giovanni