Skip to content

Commit

Permalink
🐛 Followup to HAL/STM32 targets (Longer3D timers) (#22369)
Browse files Browse the repository at this point in the history
  • Loading branch information
tpruvot authored Jul 16, 2021
1 parent 0207569 commit 5b43795
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
8 changes: 6 additions & 2 deletions buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,12 @@ extern "C" {

// Timer Definitions (optional)
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
#define TIMER_TONE TIM3
#define TIMER_SERVO TIM2
#ifndef TIMER_TONE
#define TIMER_TONE TIM6
#endif
#ifndef TIMER_SERVO
#define TIMER_SERVO TIM7
#endif

// UART Definitions
// Define here Serial instance number to map on Serial generic name
Expand Down
16 changes: 7 additions & 9 deletions ini/stm32f1.ini
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ build_flags = ${env:STM32F103RE_btt.build_flags} ${env:stm32_flash_drive.b
[env:flsun_hispeedv1]
platform = ${common_stm32.platform}
extends = common_stm32
build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
board = genericSTM32F103VE
board_build.core = stm32
board_build.variant = MARLIN_F103Vx
Expand All @@ -210,7 +210,7 @@ extra_scripts = ${stm32f1_variant.extra_scripts}
[env:mks_robin_nano35]
platform = ${common_stm32.platform}
extends = common_stm32
build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
board = genericSTM32F103VE
board_build.core = stm32
board_build.variant = MARLIN_F103Vx
Expand Down Expand Up @@ -272,7 +272,7 @@ board_build.core = stm32
board_build.variant = MARLIN_F103Vx
board_build.offset = 0x7000
board_build.encrypt = Robin_mini.bin
build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE
build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
board_upload.offset_address = 0x08007000
extra_scripts = ${stm32f1_variant.extra_scripts}

Expand Down Expand Up @@ -326,7 +326,7 @@ board_build.core = stm32
board_build.variant = MARLIN_F103Vx
board_build.offset = 0x7000
board_build.encrypt = Robin_e3p.bin
build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4
build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
board_upload.offset_address = 0x08007000
extra_scripts = ${stm32f1_variant.extra_scripts}
debug_tool = jlink
Expand Down Expand Up @@ -369,13 +369,11 @@ platform = ${common_stm32.platform}
extends = common_stm32
board = genericSTM32F103VE
board_build.core = stm32
board_build.variant = MARLIN_F103Zx
board_build.variant = MARLIN_F103Vx
board_build.offset = 0x1000
board_build.address = 0x08010000
build_flags = ${common_stm32.build_flags}
-DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12
build_unflags = ${common_stm32.build_unflags}
-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DU20 -DTS_V12
build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
extra_scripts = ${stm32f1_variant.extra_scripts}
buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py

Expand Down

0 comments on commit 5b43795

Please sign in to comment.