I'm getting errors when building for STM32WB55VGQ6.
The errors i get:
Code: Select all
CC led.c
In file included from ../../lib/stm32lib/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h:31:0,
from ../../lib/stm32lib/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h:29,
from ./boards/stm32wbxx_hal_conf_base.h:30,
from boards/AEPYM/stm32wbxx_hal_conf.h:17,
from ../../lib/stm32lib/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h:30,
from ./mpconfigboard_common.h:30,
from ./mpconfigport.h:32,
from ../../py/mpconfig.h:62,
from ../../py/mpstate.h:31,
from ../../py/runtime.h:29,
from led.c:29:
led.c: In function 'led_pwm_init':
../../lib/stm32lib/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:2665:27: error: implicit declaration of function '__HAL_RCC_TIM3_CLK_ENABLE' [-Werror=implicit-function-declaration]
#define __TIM3_CLK_ENABLE __HAL_RCC_TIM3_CLK_ENABLE
^
led.c:145:13: note: in expansion of macro '__TIM3_CLK_ENABLE'
__TIM3_CLK_ENABLE();
^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
When I remove the PWM from the LEDs in mpconfigboard.h the build is succesfull.
Maybe I'm declaring it wrong in the mpconfig?
This is the LED part of my mpconfigboard.h:
Code: Select all
// LEDs
#define MICROPY_HW_LED1 (pin_A1) // red TIM2_CH2
#define MICROPY_HW_LED2 (pin_A15) // green TIM2_CH1
#define MICROPY_HW_LED3 (pin_B11) // blue TIM2_CH4
#define MICROPY_HW_LED1_PWM { TIM2, 2, TIM_CHANNEL_2, GPIO_AF1_TIM2 }
#define MICROPY_HW_LED2_PWM { TIM2, 2, TIM_CHANNEL_1, GPIO_AF2_TIM2 }
#define MICROPY_HW_LED3_PWM { TIM2, 2, TIM_CHANNEL_4, GPIO_AF1_TIM2 }
#define MICROPY_HW_LED_ON(pin) (mp_hal_pin_high(pin))
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))