Skip to content

Commit 5c09d8b

Browse files
committed
Clean up timer pins and add SDMMC peripheral
1 parent 550d66f commit 5c09d8b

File tree

4 files changed

+27
-18
lines changed

4 files changed

+27
-18
lines changed

ports/stm/boards/daisy_seed_with_sdram/mpconfigboard.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ MCU_PACKAGE = UFBGA176
1212

1313
LD_COMMON = boards/common_tcm.ld
1414
LD_FILE = boards/STM32H750.ld
15+
16+
# CIRCUITPY_SDIOIO = 1

ports/stm/peripherals/periph.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ typedef struct {
3030
// Timer Peripheral
3131

3232
typedef struct {
33-
uint8_t tim_index : 4;
33+
uint8_t tim_index : 5;
3434
uint8_t altfn_index : 4;
3535
uint8_t channel_index : 4;
3636
const mcu_pin_obj_t *pin;

ports/stm/peripherals/stm32h7/stm32h750xx/periph.c

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -171,21 +171,24 @@ const mcu_periph_obj_t mcu_uart_rx_list[25] = {
171171

172172
// Timers
173173
// TIM6 and TIM7 are basic timers that are only used by DAC, and don't have pins
174-
TIM_TypeDef *mcu_tim_banks[14] = {TIM1, TIM2, TIM3, TIM4, TIM5, NULL, NULL, TIM8, NULL, NULL,
175-
NULL, TIM12, TIM13, TIM14};
176-
177-
const mcu_tim_pin_obj_t mcu_tim_pin_list[58] = {
174+
TIM_TypeDef *mcu_tim_banks[TIM_BANK_ARRAY_LEN] = {TIM1, TIM2, TIM3, TIM4, TIM5, NULL, NULL, TIM8,
175+
NULL, NULL, NULL, TIM12, TIM13, TIM14, TIM15, TIM16, TIM17};
176+
const mcu_tim_pin_obj_t mcu_tim_pin_list[TIM_PIN_ARRAY_LEN] = {
178177
TIM(2, 1, 1, &pin_PA00),
179178
TIM(5, 2, 1, &pin_PA00),
180179
TIM(2, 1, 2, &pin_PA01),
181180
TIM(5, 2, 2, &pin_PA01),
182181
TIM(2, 1, 3, &pin_PA02),
183182
TIM(5, 2, 3, &pin_PA02),
183+
TIM(15, 4, 1, &pin_PA02),
184184
TIM(2, 1, 4, &pin_PA03),
185185
TIM(5, 2, 4, &pin_PA03),
186+
TIM(15, 4, 2, &pin_PA03),
186187
TIM(2, 1, 1, &pin_PA05),
187188
TIM(3, 2, 1, &pin_PA06),
189+
TIM(13, 9, 1, &pin_PA06),
188190
TIM(3, 2, 2, &pin_PA07),
191+
TIM(14, 9, 1, &pin_PA07),
189192
TIM(1, 1, 1, &pin_PA08),
190193
TIM(1, 1, 2, &pin_PA09),
191194
TIM(1, 1, 3, &pin_PA10),
@@ -202,6 +205,8 @@ const mcu_tim_pin_obj_t mcu_tim_pin_list[58] = {
202205
TIM(4, 2, 4, &pin_PB09),
203206
TIM(2, 1, 3, &pin_PB10),
204207
TIM(2, 1, 4, &pin_PB11),
208+
TIM(12, 2, 1, &pin_PB14),
209+
TIM(12, 2, 2, &pin_PB15),
205210
TIM(3, 2, 1, &pin_PC06),
206211
TIM(8, 3, 1, &pin_PC06),
207212
TIM(3, 2, 2, &pin_PC07),
@@ -214,29 +219,30 @@ const mcu_tim_pin_obj_t mcu_tim_pin_list[58] = {
214219
TIM(4, 2, 2, &pin_PD13),
215220
TIM(4, 2, 3, &pin_PD14),
216221
TIM(4, 2, 4, &pin_PD15),
222+
TIM(15, 4, 1, &pin_PE05),
223+
TIM(15, 4, 2, &pin_PE06),
217224
TIM(1, 1, 1, &pin_PE09),
218225
TIM(1, 1, 2, &pin_PE11),
219226
TIM(1, 1, 3, &pin_PE13),
220227
TIM(1, 1, 4, &pin_PE14),
221-
TIM(5, 2, 1, &pin_PI10),
222-
TIM(5, 2, 2, &pin_PI11),
223-
TIM(5, 2, 3, &pin_PI12),
228+
TIM(16, 1, 1, &pin_PF06),
229+
TIM(17, 1, 1, &pin_PF07),
230+
TIM(13, 9, 1, &pin_PF08),
231+
TIM(14, 9, 1, &pin_PF09),
232+
TIM(12, 2, 1, &pin_PH06),
233+
TIM(12, 2, 2, &pin_PH09),
234+
TIM(5, 2, 1, &pin_PH10),
235+
TIM(5, 2, 2, &pin_PH11),
236+
TIM(5, 2, 3, &pin_PH12),
224237
TIM(5, 2, 4, &pin_PI00),
225238
TIM(8, 3, 4, &pin_PI02),
226239
TIM(8, 3, 1, &pin_PI05),
227240
TIM(8, 3, 2, &pin_PI06),
228241
TIM(8, 3, 3, &pin_PI07),
229-
TIM(8, 3, 2, &pin_PI06),
230-
TIM(8, 3, 1, &pin_PI08),
231-
TIM(1, 1, 3, &pin_PI09),
232-
TIM(8, 3, 2, &pin_PI10),
233-
TIM(1, 1, 2, &pin_PI11),
234-
TIM(8, 3, 3, &pin_PI00),
235-
TIM(1, 1, 1, &pin_PI01),
236242
};
237243

238244
// SDIO - H750 has a MMC interface that includes SDIO
239-
SDMMC_TypeDef *mcu_sdio_banks[1] = {SDIO};
245+
SDMMC_TypeDef *mcu_sdio_banks[1] = {SDMMC1};
240246

241247
const mcu_periph_obj_t mcu_sdio_clock_list[1] = {
242248
PERIPH(1, 12, &pin_PC12),

ports/stm/peripherals/stm32h7/stm32h750xx/periph.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ extern const mcu_periph_obj_t mcu_uart_tx_list[24];
2727
extern const mcu_periph_obj_t mcu_uart_rx_list[25];
2828

2929
// Timers
30-
#define TIM_BANK_ARRAY_LEN 14
31-
#define TIM_PIN_ARRAY_LEN 58
30+
#define TIM_PIN_ARRAY_LEN 65
31+
extern const mcu_tim_pin_obj_t mcu_tim_pin_list[TIM_PIN_ARRAY_LEN];
32+
#define TIM_BANK_ARRAY_LEN 17
3233
extern TIM_TypeDef *mcu_tim_banks[TIM_BANK_ARRAY_LEN];
3334

3435
// SDIO - H750 has a MMC interface that includes SDIO

0 commit comments

Comments
 (0)