Skip to content

Commit 8a3fb7b

Browse files
committed
fix(swan_r5):fixes timer definitions in the array. Requires padding to match peripheral with interrupt handler index.
1 parent 7b7b499 commit 8a3fb7b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ports/stm/peripherals/stm32l4/stm32l4r5xx/periph.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ const mcu_periph_obj_t mcu_uart_rx_list[UART_RX_ARRAY_LEN] = {
167167

168168
// Timers
169169
// TIM6 and TIM7 are basic timers that are only used by DAC, and don't have pins
170-
TIM_TypeDef *mcu_tim_banks[TIM_BANK_ARRAY_LEN] = {TIM1, TIM2, TIM3, TIM4, TIM5, TIM15, TIM16};
170+
TIM_TypeDef *mcu_tim_banks[TIM_BANK_ARRAY_LEN] = {TIM1, TIM2, TIM3, TIM4, TIM5, NULL, NULL, TIM8, /*TIM9*/NULL, NULL, NULL, NULL, NULL, NULL, TIM15, TIM16, TIM17};
171171

172172
const mcu_tim_pin_obj_t mcu_tim_pin_list[TIM_PIN_ARRAY_LEN] = {
173173
TIM(2, 1, 1, &pin_PA00),

ports/stm/peripherals/stm32l4/stm32l4r5xx/periph.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ extern const mcu_periph_obj_t mcu_uart_tx_list[UART_TX_ARRAY_LEN];
5656
extern const mcu_periph_obj_t mcu_uart_rx_list[UART_RX_ARRAY_LEN];
5757

5858
// Timers
59-
#define TIM_BANK_ARRAY_LEN 7
59+
#define TIM_BANK_ARRAY_LEN 17
6060
#define TIM_PIN_ARRAY_LEN (73-3)
6161
extern TIM_TypeDef *mcu_tim_banks[TIM_BANK_ARRAY_LEN];
6262
extern const mcu_tim_pin_obj_t mcu_tim_pin_list[TIM_PIN_ARRAY_LEN];

0 commit comments

Comments
 (0)