Browse Source

🐛 Followup to HAL/STM32 targets (Longer3D timers) (#22369)

Tanguy Pruvot 3 years ago
parent
commit
5b43795f54
No account linked to committer's email address
2 changed files with 13 additions and 11 deletions
  1. 6
    2
      buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h
  2. 7
    9
      ini/stm32f1.ini

+ 6
- 2
buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h View File

@@ -132,8 +132,12 @@ extern "C" {
132 132
 
133 133
 // Timer Definitions (optional)
134 134
 // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
135
-#define TIMER_TONE              TIM3
136
-#define TIMER_SERVO             TIM2
135
+#ifndef TIMER_TONE
136
+  #define TIMER_TONE            TIM6
137
+#endif
138
+#ifndef TIMER_SERVO
139
+  #define TIMER_SERVO           TIM7
140
+#endif
137 141
 
138 142
 // UART Definitions
139 143
 // Define here Serial instance number to map on Serial generic name

+ 7
- 9
ini/stm32f1.ini View File

@@ -194,7 +194,7 @@ build_flags       = ${env:STM32F103RE_btt.build_flags} ${env:stm32_flash_drive.b
194 194
 [env:flsun_hispeedv1]
195 195
 platform             = ${common_stm32.platform}
196 196
 extends              = common_stm32
197
-build_flags          = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
197
+build_flags          = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
198 198
 board                = genericSTM32F103VE
199 199
 board_build.core     = stm32
200 200
 board_build.variant  = MARLIN_F103Vx
@@ -210,7 +210,7 @@ extra_scripts        = ${stm32f1_variant.extra_scripts}
210 210
 [env:mks_robin_nano35]
211 211
 platform             = ${common_stm32.platform}
212 212
 extends              = common_stm32
213
-build_flags          = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
213
+build_flags          = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
214 214
 board                = genericSTM32F103VE
215 215
 board_build.core     = stm32
216 216
 board_build.variant  = MARLIN_F103Vx
@@ -272,7 +272,7 @@ board_build.core    = stm32
272 272
 board_build.variant = MARLIN_F103Vx
273 273
 board_build.offset  = 0x7000
274 274
 board_build.encrypt = Robin_mini.bin
275
-build_flags         = ${common_stm32.build_flags} -DMCU_STM32F103VE
275
+build_flags         = ${common_stm32.build_flags} -DMCU_STM32F103VE -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
276 276
 board_upload.offset_address = 0x08007000
277 277
 extra_scripts       = ${stm32f1_variant.extra_scripts}
278 278
 
@@ -326,7 +326,7 @@ board_build.core    = stm32
326 326
 board_build.variant = MARLIN_F103Vx
327 327
 board_build.offset  = 0x7000
328 328
 board_build.encrypt = Robin_e3p.bin
329
-build_flags         = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4
329
+build_flags         = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
330 330
 board_upload.offset_address = 0x08007000
331 331
 extra_scripts       = ${stm32f1_variant.extra_scripts}
332 332
 debug_tool          = jlink
@@ -369,13 +369,11 @@ platform            = ${common_stm32.platform}
369 369
 extends             = common_stm32
370 370
 board               = genericSTM32F103VE
371 371
 board_build.core    = stm32
372
-board_build.variant = MARLIN_F103Zx
372
+board_build.variant = MARLIN_F103Vx
373 373
 board_build.offset  = 0x1000
374 374
 board_build.address = 0x08010000
375
-build_flags         = ${common_stm32.build_flags}
376
-  -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12
377
-build_unflags       = ${common_stm32.build_unflags}
378
-  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
375
+build_flags         = ${common_stm32.build_flags} -DMCU_STM32F103VE -DU20 -DTS_V12
376
+build_unflags       = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
379 377
 extra_scripts       = ${stm32f1_variant.extra_scripts}
380 378
   buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
381 379
 

Loading…
Cancel
Save