Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HAL_STM32F1/SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static const spi_pins* dev_to_spi_pins(spi_dev *dev);
static void configure_gpios(spi_dev *dev, bool as_master);
static spi_baud_rate determine_baud_rate(spi_dev *dev, uint32_t freq);

#if (BOARD_NR_SPI >= 3) && !defined(STM32_HIGH_DENSITY)
#if BOARD_NR_SPI >= 3 && !defined(STM32_HIGH_DENSITY)
#error "The SPI library is misconfigured: 3 SPI ports only available on high density STM32 devices"
#endif

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HAL_STM32F1/timers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
case 3: irq_num = NVIC_TIMER3; break;
case 4: irq_num = NVIC_TIMER4; break;
case 5: irq_num = NVIC_TIMER5; break;
#if ENABLED(STM32_HIGH_DENSITY)
#ifdef STM32_HIGH_DENSITY
// 6 & 7 are basic timers, avoid them
case 8: irq_num = NVIC_TIMER8_CC; break;
#endif
Expand Down
20 changes: 19 additions & 1 deletion Marlin/src/HAL/HAL_STM32F1/timers.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,20 @@ typedef uint16_t hal_timer_t;
#define STEP_TIMER_CHAN 1 // Channel of the timer to use for compare and interrupts
#define TEMP_TIMER_CHAN 1 // Channel of the timer to use for compare and interrupts

/**
* Note: Timers may be used by platforms and libraries
*
* FAN PWMs:
* With FAN_SOFT_PWM disabled the Temperature class uses
* FANx_PIN timers to generate FAN PWM signals.
*
* Speaker:
* When SPEAKER is enabled, one timer is allocated by maple/tone.cpp.
* - If BEEPER_PIN has a timer channel (and USE_PIN_TIMER is
* defined in tone.cpp) it uses the pin's own timer.
* - Otherwise it uses Timer 8 on boards with STM32_HIGH_DENSITY
* or Timer 4 on other boards.
*/
#if defined(MCU_STM32F103CB) || defined(MCU_STM32F103C8)
#define STEP_TIMER_NUM 4 // For C8/CB boards, use timer 4
#else
Expand All @@ -58,7 +72,11 @@ typedef uint16_t hal_timer_t;

#if MB(BIGTREE_SKR_MINI_E3, BIGTREE_SKR_E3_DIP, BTT_SKR_MINI_E3_V1_2, MKS_ROBIN_LITE)
// SKR Mini E3 boards use PA8 as FAN_PIN, so TIMER 1 is used for Fan PWM.
#define SERVO0_TIMER_NUM 8
#ifdef STM32_HIGH_DENSITY
#define SERVO0_TIMER_NUM 8 // tone.cpp uses Timer 4
#else
#define SERVO0_TIMER_NUM 3 // tone.cpp uses Timer 8
#endif
#else
#define SERVO0_TIMER_NUM 1 // SERVO0 or BLTOUCH
#endif
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/feature/power_loss_recovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ typedef struct {
#if DISABLED(NO_VOLUMETRICS)
bool volumetric_enabled;
#if EXTRUDERS > 1
float filament_size[EXTRUDERS];
float filament_size[EXTRUDERS];
#else
float filament_size;
#endif
float filament_size;
#endif
#endif

#if HOTENDS
Expand Down
2 changes: 1 addition & 1 deletion config/examples/Creality/CR-10/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@
#define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
#define BABYSTEP_MULTIPLICATOR_Z 10 // Babysteps are very small. Increase for faster motion.
#define BABYSTEP_MULTIPLICATOR_XY 10

#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
#if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING)
#define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
Expand Down