Skip to content

Commit e9bd1e2

Browse files
oliver-joosdpgeorge
authored andcommitted
stm32: Add support for all STM32F412xx MCUs.
And fix typo in the usage string of plli2svalues.py. Signed-off-by: Oliver Joos <oliver.joos@hispeed.ch>
1 parent bc7d264 commit e9bd1e2

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

ports/stm32/adc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@
134134
defined(STM32F407xx) || defined(STM32F417xx) || \
135135
defined(STM32F401xC) || defined(STM32F401xE)
136136
#define VBAT_DIV (2)
137-
#elif defined(STM32F411xE) || defined(STM32F412Zx) || \
137+
#elif defined(STM32F411xE) || \
138+
defined(STM32F412Cx) || defined(STM32F412Rx) || \
139+
defined(STM32F412Vx) || defined(STM32F412Zx) || \
138140
defined(STM32F413xx) || defined(STM32F427xx) || \
139141
defined(STM32F429xx) || defined(STM32F437xx) || \
140142
defined(STM32F439xx) || defined(STM32F446xx) || \

ports/stm32/boards/plli2svalues.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ def __init__(self, range_plli2sn, range_plli2sr):
2424
"stm32f401xe",
2525
"stm32f407xx",
2626
"stm32f411xe",
27+
"stm32f412cx",
28+
"stm32f412rx",
29+
"stm32f412vx",
2730
"stm32f412zx",
2831
"stm32f413xx",
2932
"stm32f427xx",
@@ -163,7 +166,7 @@ def main():
163166

164167
if mcu_series in mcu_support_plli2s:
165168
if len(argv) not in (1, 2):
166-
print("usage: pllvalues.py [-c] [-m <mcu_series>] <hse in MHz> <pllm in MHz>")
169+
print("usage: plli2svalues.py [-c] [-m <mcu_series>] <hse in MHz> <pllm in MHz>")
167170
sys.exit(1)
168171

169172
if argv[0].startswith("hse:"):

ports/stm32/timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ static const uint32_t tim_instance_table[MICROPY_HW_MAX_TIMER] = {
889889
#endif
890890

891891
#if defined(TIM6)
892-
#if defined(STM32F412Zx) || defined(STM32L1)
892+
#if defined(STM32F412Cx) || defined(STM32F412Rx) || defined(STM32F412Vx) || defined(STM32F412Zx) || defined(STM32L1)
893893
TIM_ENTRY(6, TIM6_IRQn),
894894
#elif defined(STM32G0)
895895
TIM_ENTRY(6, TIM6_DAC_LPTIM1_IRQn),

0 commit comments

Comments
 (0)