In Chibios version chibios_stable-19.1.x, I am using the PWMD6 instance. When I integrate the latest version of Chibios, I get the following error:
Code: Select all
/ChibiOS_20.3.0/os/hal/ports/STM32/LLD/TIMv1/stm32_tim6.inc: In function 'Vector118':
/ChibiOS_20.3.0/os/hal/ports/STM32/LLD/TIMv1/stm32_tim6.inc:113:28: error: 'PWMD6' undeclared (first use in this function); did you mean 'PWMD8'?
pwm_lld_serve_interrupt(&PWMD6);
^~~~~
PWMD8
The error is here:
Code: Select all
#if defined(STM32_TIM6_IS_USED) || defined(__DOXYGEN__)
/**
* @brief TIM6 interrupt handler.
*
* @isr
*/
OSAL_IRQ_HANDLER(STM32_TIM6_HANDLER) {
OSAL_IRQ_PROLOGUE();
#if HAL_USE_GPT
#if STM32_GPT_USE_TIM6
gpt_lld_serve_interrupt(&GPTD6);
#endif
#endif
#if HAL_USE_ICU
icu_lld_serve_interrupt(&ICUD6);
#endif
#if HAL_USE_PWM
pwm_lld_serve_interrupt(&PWMD6); // <-- Here the error
#endif
#if 1
#if STM32_ST_USE_TIM6
st_lld_serve_interrupt();
#endif
#endif
OSAL_IRQ_EPILOGUE();
}
#endif
The mcuconf.h file is configured as follows:
Code: Select all
/*
* GPT driver system settings.
*/
#define STM32_GPT_USE_TIM1 FALSE
#define STM32_GPT_USE_TIM2 FALSE
#define STM32_GPT_USE_TIM3 FALSE
#define STM32_GPT_USE_TIM4 FALSE
#define STM32_GPT_USE_TIM5 TRUE
#define STM32_GPT_USE_TIM6 TRUE
#define STM32_GPT_USE_TIM7 TRUE
#define STM32_GPT_USE_TIM8 FALSE
#define STM32_GPT_USE_TIM15 TRUE
#define STM32_GPT_USE_TIM16 FALSE
#define STM32_GPT_USE_TIM17 TRUE
/*
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
#define STM32_GPT_TIM4_IRQ_PRIORITY 7
#define STM32_GPT_TIM5_IRQ_PRIORITY 7
#define STM32_GPT_TIM6_IRQ_PRIORITY 7
#define STM32_GPT_TIM7_IRQ_PRIORITY 7
#define STM32_GPT_TIM8_IRQ_PRIORITY 7
*/
In the hal_pwem_ldd.c file has the following defined:
Code: Select all
/**
* @brief PWMD1 driver identifier.
* @note The driver PWMD1 allocates the complex timer TIM1 when enabled.
*/
#if STM32_PWM_USE_TIM1 || defined(__DOXYGEN__)
PWMDriver PWMD1;
#endif
/**
* @brief PWMD2 driver identifier.
* @note The driver PWMD2 allocates the timer TIM2 when enabled.
*/
#if STM32_PWM_USE_TIM2 || defined(__DOXYGEN__)
PWMDriver PWMD2;
#endif
/**
* @brief PWMD3 driver identifier.
* @note The driver PWMD3 allocates the timer TIM3 when enabled.
*/
#if STM32_PWM_USE_TIM3 || defined(__DOXYGEN__)
PWMDriver PWMD3;
#endif
/**
* @brief PWMD4 driver identifier.
* @note The driver PWMD4 allocates the timer TIM4 when enabled.
*/
#if STM32_PWM_USE_TIM4 || defined(__DOXYGEN__)
PWMDriver PWMD4;
#endif
/**
* @brief PWMD5 driver identifier.
* @note The driver PWMD5 allocates the timer TIM5 when enabled.
*/
#if STM32_PWM_USE_TIM5 || defined(__DOXYGEN__)
PWMDriver PWMD5;
#endif
/**
* @brief PWMD8 driver identifier.
* @note The driver PWMD8 allocates the timer TIM8 when enabled.
*/
#if STM32_PWM_USE_TIM8 || defined(__DOXYGEN__)
PWMDriver PWMD8;
#endif
/**
* @brief PWMD9 driver identifier.
* @note The driver PWMD9 allocates the timer TIM9 when enabled.
*/
#if STM32_PWM_USE_TIM9 || defined(__DOXYGEN__)
PWMDriver PWMD9;
#endif
/**
* @brief PWMD10 driver identifier.
* @note The driver PWMD10 allocates the timer TIM10 when enabled.
*/
#if STM32_PWM_USE_TIM10 || defined(__DOXYGEN__)
PWMDriver PWMD10;
#endif
/**
* @brief PWMD11 driver identifier.
* @note The driver PWMD11 allocates the timer TIM11 when enabled.
*/
#if STM32_PWM_USE_TIM11 || defined(__DOXYGEN__)
PWMDriver PWMD11;
#endif
/**
* @brief PWMD12 driver identifier.
* @note The driver PWMD12 allocates the timer TIM12 when enabled.
*/
#if STM32_PWM_USE_TIM12 || defined(__DOXYGEN__)
PWMDriver PWMD12;
#endif
/**
* @brief PWMD13 driver identifier.
* @note The driver PWMD13 allocates the timer TIM13 when enabled.
*/
#if STM32_PWM_USE_TIM13 || defined(__DOXYGEN__)
PWMDriver PWMD13;
#endif
/**
* @brief PWMD14 driver identifier.
* @note The driver PWMD14 allocates the timer TIM14 when enabled.
*/
#if STM32_PWM_USE_TIM14 || defined(__DOXYGEN__)
PWMDriver PWMD14;
#endif
/**
* @brief PWMD15 driver identifier.
* @note The driver PWMD15 allocates the timer TIM15 when enabled.
*/
#if STM32_PWM_USE_TIM15 || defined(__DOXYGEN__)
PWMDriver PWMD15;
#endif
/**
* @brief PWMD16 driver identifier.
* @note The driver PWMD16 allocates the timer TIM16 when enabled.
*/
#if STM32_PWM_USE_TIM16 || defined(__DOXYGEN__)
PWMDriver PWMD16;
#endif
/**
* @brief PWMD17 driver identifier.
* @note The driver PWMD17 allocates the timer TIM17 when enabled.
*/
#if STM32_PWM_USE_TIM17 || defined(__DOXYGEN__)
PWMDriver PWMD17;
#endif
/**
* @brief PWMD20 driver identifier.
* @note The driver PWMD20 allocates the timer TIM20 when enabled.
*/
#if STM32_PWM_USE_TIM20 || defined(__DOXYGEN__)
PWMDriver PWMD20;
#endif
/**
* @brief PWMD21 driver identifier.
* @note The driver PWMD21 allocates the timer TIM21 when enabled.
*/
#if STM32_PWM_USE_TIM21 || defined(__DOXYGEN__)
PWMDriver PWMD21;
#endif
/**
* @brief PWMD22 driver identifier.
* @note The driver PWMD22 allocates the timer TIM22 when enabled.
*/
#if STM32_PWM_USE_TIM22 || defined(__DOXYGEN__)
PWMDriver PWMD22;
#endif
Is this an error or is it not possible to use the PWMD6 instance?
Thank you.