diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp
index 488773d9a4b4f5b35bcc740b59e8728ee7d3580f..59835829a783136ab4627aaac061cd44b3bff26c 100644
--- a/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp
+++ b/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp
@@ -54,6 +54,7 @@ static SPISettings spiConfig;
 // --------------------------------------------------------------------------
 
 #if ENABLED(SOFTWARE_SPI)
+
   // --------------------------------------------------------------------------
   // Software SPI
   // --------------------------------------------------------------------------
@@ -95,14 +96,13 @@ void spiBegin() {
 void spiInit(uint8_t spiRate) {
   uint8_t  clock;
   switch (spiRate) {
-  case SPI_FULL_SPEED:    clock = SPI_CLOCK_DIV2 ; break;
-  case SPI_HALF_SPEED:    clock = SPI_CLOCK_DIV4 ; break;
-  case SPI_QUARTER_SPEED: clock = SPI_CLOCK_DIV8 ; break;
-  case SPI_EIGHTH_SPEED:  clock = SPI_CLOCK_DIV16; break;
-  case SPI_SPEED_5:       clock = SPI_CLOCK_DIV32; break;
-  case SPI_SPEED_6:       clock = SPI_CLOCK_DIV64; break;
-  default:
-    clock = SPI_CLOCK_DIV2; // Default from the SPI library
+    case SPI_FULL_SPEED:    clock = SPI_CLOCK_DIV2 ; break;
+    case SPI_HALF_SPEED:    clock = SPI_CLOCK_DIV4 ; break;
+    case SPI_QUARTER_SPEED: clock = SPI_CLOCK_DIV8 ; break;
+    case SPI_EIGHTH_SPEED:  clock = SPI_CLOCK_DIV16; break;
+    case SPI_SPEED_5:       clock = SPI_CLOCK_DIV32; break;
+    case SPI_SPEED_6:       clock = SPI_CLOCK_DIV64; break;
+    default:                clock = SPI_CLOCK_DIV2; // Default from the SPI library
   }
   spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0);
   SPI.begin();
@@ -168,7 +168,6 @@ void spiSendBlock(uint8_t token, const uint8_t* buf) {
 /** Begin SPI transaction, set clock, bit order, data mode */
 void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
   spiConfig = SPISettings(spiClock, (BitOrder)bitOrder, dataMode);
-
   SPI.beginTransaction(spiConfig);
 }
 
diff --git a/Marlin/src/HAL/HAL_STM32F4/EEPROM_Emul/eeprom_emul.cpp b/Marlin/src/HAL/HAL_STM32F4/EEPROM_Emul/eeprom_emul.cpp
index 19d5eeaaed503a6cbb9f380f601760b6155e2c25..26ab2fc92c2247ee13112660d218fd518ff89231 100644
--- a/Marlin/src/HAL/HAL_STM32F4/EEPROM_Emul/eeprom_emul.cpp
+++ b/Marlin/src/HAL/HAL_STM32F4/EEPROM_Emul/eeprom_emul.cpp
@@ -47,7 +47,7 @@
 /** @addtogroup EEPROM_Emulation
   * @{
   */
-#ifdef STM32F4
+#if defined(STM32F4) || defined(STM32F4xx)
 
 /* Includes ------------------------------------------------------------------*/
 #include "eeprom_emul.h"
@@ -562,7 +562,7 @@ static uint16_t EE_PageTransfer(uint16_t VirtAddress, uint16_t Data) {
   return FlashStatus;
 }
 
-#endif // STM32F4
+#endif // STM32F4 || STM32F4xx
 
 /**
  * @}
diff --git a/Marlin/src/HAL/HAL_STM32F4/EmulatedEeprom.cpp b/Marlin/src/HAL/HAL_STM32F4/EmulatedEeprom.cpp
index 667948a53b09e8585519b390cc7fa8b48ef7cccd..b76de3dbe81e3757df9157ed34a2f547a9c3a914 100644
--- a/Marlin/src/HAL/HAL_STM32F4/EmulatedEeprom.cpp
+++ b/Marlin/src/HAL/HAL_STM32F4/EmulatedEeprom.cpp
@@ -17,7 +17,7 @@
  *
  */
 
-#ifdef STM32F4
+#if defined(STM32F4) || defined(STM32F4xx)
 
 /**
  * Description: functions for I2C connected external EEPROM.
@@ -139,5 +139,5 @@ void eeprom_update_block(const void *__src, void *__dst, size_t __n) {
 }
 
 #endif // ENABLED(EEPROM_SETTINGS) && DISABLED(I2C_EEPROM) && DISABLED(SPI_EEPROM)
-#endif // STM32F4
+#endif // STM32F4 || STM32F4xx
 
diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL.cpp b/Marlin/src/HAL/HAL_STM32F4/HAL.cpp
index a7180d38c21c8d7ab384a86a45dfef09319b1b7e..c79af5859a0c1d7748e12050b540af3ab2b5157a 100644
--- a/Marlin/src/HAL/HAL_STM32F4/HAL.cpp
+++ b/Marlin/src/HAL/HAL_STM32F4/HAL.cpp
@@ -21,8 +21,7 @@
  *
  */
 
-
-#ifdef STM32F4
+#if defined(STM32F4) || defined(STM32F4xx)
 
 // --------------------------------------------------------------------------
 // Includes
@@ -81,17 +80,11 @@ void sei(void) { interrupts(); }
 void HAL_clear_reset_source(void) { __HAL_RCC_CLEAR_RESET_FLAGS(); }
 
 uint8_t HAL_get_reset_source (void) {
-  if (__HAL_RCC_GET_FLAG(RCC_FLAG_IWDGRST) != RESET)
-    return RST_WATCHDOG;
-
-  if (__HAL_RCC_GET_FLAG(RCC_FLAG_SFTRST) != RESET)
-    return RST_SOFTWARE;
-
-  if (__HAL_RCC_GET_FLAG(RCC_FLAG_PINRST) != RESET)
-    return RST_EXTERNAL;
+  if (__HAL_RCC_GET_FLAG(RCC_FLAG_IWDGRST) != RESET) return RST_WATCHDOG;
 
-  if (__HAL_RCC_GET_FLAG(RCC_FLAG_PORRST) != RESET)
-    return RST_POWER_ON;
+  if (__HAL_RCC_GET_FLAG(RCC_FLAG_SFTRST) != RESET)  return RST_SOFTWARE;
+  if (__HAL_RCC_GET_FLAG(RCC_FLAG_PINRST) != RESET)  return RST_EXTERNAL;
+  if (__HAL_RCC_GET_FLAG(RCC_FLAG_PORRST) != RESET)  return RST_POWER_ON;
   return 0;
 }
 
@@ -137,4 +130,4 @@ uint16_t HAL_adc_get_result(void) {
   return HAL_adc_result;
 }
 
-#endif // STM32F4
+#endif // STM32F4 || STM32F4xx
diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL.h b/Marlin/src/HAL/HAL_STM32F4/HAL.h
index 53d3f1dd06e2a1d7a41a9acdb461b883706023f6..4eca97601e27ab7f675324d3ecf3d413d52dd4ec 100644
--- a/Marlin/src/HAL/HAL_STM32F4/HAL.h
+++ b/Marlin/src/HAL/HAL_STM32F4/HAL.h
@@ -21,8 +21,6 @@
  *
  */
 
-
-
 #ifndef _HAL_STM32F4_H
 #define _HAL_STM32F4_H
 
@@ -41,6 +39,10 @@
 
 #include "Arduino.h"
 
+#ifdef USBCON
+  #include <USBSerial.h>
+#endif
+
 #include "../math_32bit.h"
 #include "../HAL_SPI.h"
 #include "fastio_STM32F4.h"
@@ -48,7 +50,6 @@
 
 #include "HAL_timers_STM32F4.h"
 
-
 // --------------------------------------------------------------------------
 // Defines
 // --------------------------------------------------------------------------
@@ -186,6 +187,7 @@ extern "C" {
 */
 
 extern "C" char* _sbrk(int incr);
+
 /*
 static int freeMemory() {
   volatile int top;
@@ -193,6 +195,7 @@ static int freeMemory() {
   return top;
 }
 */
+
 static int freeMemory() {
   volatile char top;
   return &top - reinterpret_cast<char*>(_sbrk(0));
diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.cpp b/Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.cpp
index df5397685ad0c02a33686b518791f79cfe6b14a8..2877e88d54b7af76b9afbf9a2daa604eaeae59e4 100644
--- a/Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.cpp
+++ b/Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.cpp
@@ -21,7 +21,7 @@
  *
  */
 
-#ifdef STM32F4
+#if defined(STM32F4) || defined(STM32F4xx)
 
 #include "../../inc/MarlinConfig.h"
 
@@ -50,4 +50,4 @@ void libServo::move(const int value) {
 }
 #endif // HAS_SERVOS
 
-#endif // STM32F4
+#endif // STM32F4 || STM32F4xx
diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp b/Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp
index 4c7d6928807c334c6ae83926ba79b48f073c0014..606d43f7f91e3ce90ddf50ab9579e0ee99c36a04 100644
--- a/Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp
+++ b/Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp
@@ -30,7 +30,7 @@
  * Adapted to the STM32F4 HAL
  */
 
-#ifdef STM32F4
+#if defined(STM32F4) || defined(STM32F4xx)
 
 // --------------------------------------------------------------------------
 // Includes
@@ -54,6 +54,7 @@ static SPISettings spiConfig;
 // --------------------------------------------------------------------------
 
 #if ENABLED(SOFTWARE_SPI)
+
   // --------------------------------------------------------------------------
   // Software SPI
   // --------------------------------------------------------------------------
@@ -81,8 +82,7 @@ void spiBegin(void) {
     #error SS_PIN not defined!
   #endif
 
-  SET_OUTPUT(SS_PIN);
-  WRITE(SS_PIN, HIGH);
+  OUT_WRITE(SS_PIN, HIGH);
 }
 
 /** Configure SPI for specified SPI speed */
@@ -90,14 +90,13 @@ void spiInit(uint8_t spiRate) {
   // Use datarates Marlin uses
   uint32_t clock;
   switch (spiRate) {
-  case SPI_FULL_SPEED:    clock = 20000000; break; // 13.9mhz=20000000  6.75mhz=10000000  3.38mhz=5000000  .833mhz=1000000
-  case SPI_HALF_SPEED:    clock =  5000000; break;
-  case SPI_QUARTER_SPEED: clock =  2500000; break;
-  case SPI_EIGHTH_SPEED:  clock =  1250000; break;
-  case SPI_SPEED_5:       clock =   625000; break;
-  case SPI_SPEED_6:       clock =   300000; break;
-  default:
-    clock = 4000000; // Default from the SPI libarary
+    case SPI_FULL_SPEED:    clock = 20000000; break; // 13.9mhz=20000000  6.75mhz=10000000  3.38mhz=5000000  .833mhz=1000000
+    case SPI_HALF_SPEED:    clock =  5000000; break;
+    case SPI_QUARTER_SPEED: clock =  2500000; break;
+    case SPI_EIGHTH_SPEED:  clock =  1250000; break;
+    case SPI_SPEED_5:       clock =   625000; break;
+    case SPI_SPEED_6:       clock =   300000; break;
+    default:                clock =  4000000; // Default from the SPI libarary
   }
   spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0);
   SPI.begin();
@@ -128,7 +127,13 @@ uint8_t spiRec(void) {
  */
 void spiRead(uint8_t* buf, uint16_t nbyte) {
   SPI.beginTransaction(spiConfig);
-  SPI.dmaTransfer(0, const_cast<uint8_t*>(buf), nbyte);
+
+  #ifdef STM32GENERIC
+    SPI.dmaTransfer(0, const_cast<uint8_t*>(buf), nbyte);
+  #else
+    SPI.transfer((uint8_t*)buf, nbyte);
+  #endif
+
   SPI.endTransaction();
 }
 
@@ -156,10 +161,16 @@ void spiSend(uint8_t b) {
 void spiSendBlock(uint8_t token, const uint8_t* buf) {
   SPI.beginTransaction(spiConfig);
   SPI.transfer(token);
-  SPI.dmaSend(const_cast<uint8_t*>(buf), 512);
+
+  #ifdef STM32GENERIC
+    SPI.dmaSend(const_cast<uint8_t*>(buf), 512);
+  #else
+    SPI.transfer((uint8_t*)buf, (uint8_t*)0, 512);
+  #endif
+
   SPI.endTransaction();
 }
 
 #endif // SOFTWARE_SPI
 
-#endif // STM32F4
+#endif // STM32F4 || STM32F4xx
diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.cpp b/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.cpp
index 1c12f5f4e98ec37d83837f6cb1d0e2e1bf188a4b..d03bf4c09b54b1439d73b94d696d31a52557ce31 100644
--- a/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.cpp
+++ b/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.cpp
@@ -20,7 +20,7 @@
  *
  */
 
-#ifdef STM32F4
+#if defined(STM32F4) || defined(STM32F4xx)
 
 // --------------------------------------------------------------------------
 // Includes
@@ -39,6 +39,8 @@
 // --------------------------------------------------------------------------
 
 #define NUM_HARDWARE_TIMERS 2
+#define STEP_TIMER_IRQ_ID TIM5_IRQn
+#define TEMP_TIMER_IRQ_ID TIM7_IRQn
 
 //#define PRESCALER 1
 // --------------------------------------------------------------------------
@@ -53,7 +55,7 @@
 // Private Variables
 // --------------------------------------------------------------------------
 
-tTimerConfig timerConfig[NUM_HARDWARE_TIMERS];
+stm32f4_timer_t TimerHandle[NUM_HARDWARE_TIMERS];
 
 // --------------------------------------------------------------------------
 // Function prototypes
@@ -72,90 +74,86 @@ bool timers_initialised[NUM_HARDWARE_TIMERS] = {false};
 void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
 
   if (!timers_initialised[timer_num]) {
+    constexpr uint32_t step_prescaler = STEPPER_TIMER_PRESCALE - 1,
+                       temp_prescaler = TEMP_TIMER_PRESCALE - 1;
     switch (timer_num) {
-    case STEP_TIMER_NUM:
-      //STEPPER TIMER TIM5 //use a 32bit timer
-      __HAL_RCC_TIM5_CLK_ENABLE();
-      timerConfig[0].timerdef.Instance            = TIM5;
-      timerConfig[0].timerdef.Init.Prescaler      = (STEPPER_TIMER_PRESCALE);
-      timerConfig[0].timerdef.Init.CounterMode    = TIM_COUNTERMODE_UP;
-      timerConfig[0].timerdef.Init.ClockDivision  = TIM_CLOCKDIVISION_DIV1;
-      timerConfig[0].IRQ_Id = TIM5_IRQn;
-      timerConfig[0].callback = (uint32_t)TC5_Handler;
-      HAL_NVIC_SetPriority(timerConfig[0].IRQ_Id, 1, 0);
-      break;
-    case TEMP_TIMER_NUM:
-      //TEMP TIMER TIM7 // any available 16bit Timer (1 already used for PWM)
-      __HAL_RCC_TIM7_CLK_ENABLE();
-      timerConfig[1].timerdef.Instance            = TIM7;
-      timerConfig[1].timerdef.Init.Prescaler      = (TEMP_TIMER_PRESCALE);
-      timerConfig[1].timerdef.Init.CounterMode    = TIM_COUNTERMODE_UP;
-      timerConfig[1].timerdef.Init.ClockDivision  = TIM_CLOCKDIVISION_DIV1;
-      timerConfig[1].IRQ_Id = TIM7_IRQn;
-      timerConfig[1].callback = (uint32_t)TC7_Handler;
-      HAL_NVIC_SetPriority(timerConfig[1].IRQ_Id, 2, 0);
-      break;
+      case STEP_TIMER_NUM:
+        // STEPPER TIMER TIM5 - use a 32bit timer
+        #ifdef STM32GENERIC
+          __HAL_RCC_TIM5_CLK_ENABLE();
+          TimerHandle[timer_num].handle.Instance            = TIM5;
+          TimerHandle[timer_num].handle.Init.Prescaler      = step_prescaler;
+          TimerHandle[timer_num].handle.Init.CounterMode    = TIM_COUNTERMODE_UP;
+          TimerHandle[timer_num].handle.Init.ClockDivision  = TIM_CLOCKDIVISION_DIV1;
+          TimerHandle[timer_num].callback = (uint32_t)TC5_Handler;
+        #else
+          TimerHandle[timer_num].timer = TIM5;
+          TimerHandle[timer_num].irqHandle = TC5_Handler;
+          TimerHandleInit(&TimerHandle[timer_num], (((HAL_TIMER_RATE) / step_prescaler) / frequency) - 1, step_prescaler);
+        #endif
+        HAL_NVIC_SetPriority(STEP_TIMER_IRQ_ID, 6, 0);
+        break;
+
+      case TEMP_TIMER_NUM:
+        // TEMP TIMER TIM7 - any available 16bit Timer (1 already used for PWM)
+        #ifdef STM32GENERIC
+          __HAL_RCC_TIM7_CLK_ENABLE();
+          TimerHandle[timer_num].handle.Instance            = TIM7;
+          TimerHandle[timer_num].handle.Init.Prescaler      = temp_prescaler;
+          TimerHandle[timer_num].handle.Init.CounterMode    = TIM_COUNTERMODE_UP;
+          TimerHandle[timer_num].handle.Init.ClockDivision  = TIM_CLOCKDIVISION_DIV1;
+          TimerHandle[timer_num].callback = (uint32_t)TC7_Handler;
+        #else
+          TimerHandle[timer_num].timer = TIM7;
+          TimerHandle[timer_num].irqHandle = TC7_Handler;
+          TimerHandleInit(&TimerHandle[timer_num], (((HAL_TIMER_RATE) / temp_prescaler) / frequency) - 1, temp_prescaler);
+        #endif
+        HAL_NVIC_SetPriority(TEMP_TIMER_IRQ_ID, 2, 0);
+        break;
     }
     timers_initialised[timer_num] = true;
   }
 
-  timerConfig[timer_num].timerdef.Init.Period = (((HAL_TIMER_RATE) / timerConfig[timer_num].timerdef.Init.Prescaler) / frequency) - 1;
-
-  if (HAL_TIM_Base_Init(&timerConfig[timer_num].timerdef) == HAL_OK)
-    HAL_TIM_Base_Start_IT(&timerConfig[timer_num].timerdef);
+  #ifdef STM32GENERIC
+    TimerHandle[timer_num].handle.Init.Period = (((HAL_TIMER_RATE) / TimerHandle[timer_num].handle.Init.Prescaler) / frequency) - 1;
+    if (HAL_TIM_Base_Init(&TimerHandle[timer_num].handle) == HAL_OK)
+      HAL_TIM_Base_Start_IT(&TimerHandle[timer_num].handle);
+  #endif
 }
 
-//forward the interrupt
-extern "C" void TIM5_IRQHandler() {
-  ((void(*)(void))timerConfig[0].callback)();
-}
-extern "C" void TIM7_IRQHandler() {
-  ((void(*)(void))timerConfig[1].callback)();
-}
-
-void HAL_timer_set_compare(const uint8_t timer_num, const uint32_t compare) {
-  __HAL_TIM_SetAutoreload(&timerConfig[timer_num].timerdef, compare);
-}
+#ifdef STM32GENERIC
+  extern "C" void TIM5_IRQHandler() {
+    ((void(*)(void))TimerHandle[0].callback)();
+  }
+  extern "C" void TIM7_IRQHandler() {
+    ((void(*)(void))TimerHandle[1].callback)();
+  }
+#endif
 
 void HAL_timer_enable_interrupt(const uint8_t timer_num) {
-  HAL_NVIC_EnableIRQ(timerConfig[timer_num].IRQ_Id);
+  switch (timer_num) {
+    case STEP_TIMER_NUM: HAL_NVIC_EnableIRQ(STEP_TIMER_IRQ_ID); break;
+    case TEMP_TIMER_NUM: HAL_NVIC_EnableIRQ(TEMP_TIMER_IRQ_ID); break;
+  }
 }
 
 void HAL_timer_disable_interrupt(const uint8_t timer_num) {
-  HAL_NVIC_DisableIRQ(timerConfig[timer_num].IRQ_Id);
-
+  switch (timer_num) {
+    case STEP_TIMER_NUM: HAL_NVIC_DisableIRQ(STEP_TIMER_IRQ_ID); break;
+    case TEMP_TIMER_NUM: HAL_NVIC_DisableIRQ(TEMP_TIMER_IRQ_ID); break;
+  }
   // We NEED memory barriers to ensure Interrupts are actually disabled!
   // ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
   __DSB();
   __ISB();
 }
 
-hal_timer_t HAL_timer_get_compare(const uint8_t timer_num) {
-  return __HAL_TIM_GetAutoreload(&timerConfig[timer_num].timerdef);
-}
-
-uint32_t HAL_timer_get_count(const uint8_t timer_num) {
-  return __HAL_TIM_GetCounter(&timerConfig[timer_num].timerdef);
-}
-
-void HAL_timer_restrain(const uint8_t timer_num, const uint16_t interval_ticks) {
-  const hal_timer_t mincmp = HAL_timer_get_count(timer_num) + interval_ticks;
-  if (HAL_timer_get_compare(timer_num) < mincmp) HAL_timer_set_compare(timer_num, mincmp);
-}
-
-void HAL_timer_isr_prologue(const uint8_t timer_num) {
-  if (__HAL_TIM_GET_FLAG(&timerConfig[timer_num].timerdef, TIM_FLAG_UPDATE) == SET) {
-    __HAL_TIM_CLEAR_FLAG(&timerConfig[timer_num].timerdef, TIM_FLAG_UPDATE);
-  }
-}
-
 bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
-  if (NVIC->ISER[(uint32_t)((int32_t)timerConfig[timer_num].IRQ_Id) >> 5] & (uint32_t)(1 << ((uint32_t)((int32_t)timerConfig[timer_num].IRQ_Id) & (uint32_t)0x1F))) {
-    return true;
-  }
-  else {
-    return false;
+  switch (timer_num) {
+    case STEP_TIMER_NUM: return NVIC->ISER[(uint32_t)((int32_t)STEP_TIMER_IRQ_ID) >> 5] & (uint32_t)(1 << ((uint32_t)((int32_t)STEP_TIMER_IRQ_ID) & (uint32_t)0x1F));
+    case TEMP_TIMER_NUM: return NVIC->ISER[(uint32_t)((int32_t)TEMP_TIMER_IRQ_ID) >> 5] & (uint32_t)(1 << ((uint32_t)((int32_t)TEMP_TIMER_IRQ_ID) & (uint32_t)0x1F));
   }
+  return false;
 }
 
-#endif // STM32F4
+#endif // STM32F4 || STM32F4xx
diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.h b/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.h
index 9ed6be36c57c195055869273b03f9c5e3b366411..982d05d576af9d9a317aa195ea2aeb9713bd3f32 100644
--- a/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.h
+++ b/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.h
@@ -63,27 +63,38 @@
 
 // TODO change this
 
+#ifdef STM32GENERIC
+  extern void TC5_Handler();
+  extern void TC7_Handler();
+  #define HAL_STEP_TIMER_ISR void TC5_Handler()
+  #define HAL_TEMP_TIMER_ISR void TC7_Handler()
+#else
+  extern void TC5_Handler(stimer_t *htim);
+  extern void TC7_Handler(stimer_t *htim);
+  #define HAL_STEP_TIMER_ISR void TC5_Handler(stimer_t *htim)
+  #define HAL_TEMP_TIMER_ISR void TC7_Handler(stimer_t *htim)
+#endif
 
-extern void TC5_Handler();
-extern void TC7_Handler();
-#define HAL_STEP_TIMER_ISR  void TC5_Handler()
-#define HAL_TEMP_TIMER_ISR  void TC7_Handler()
 
 // --------------------------------------------------------------------------
 // Types
 // --------------------------------------------------------------------------
 
-typedef struct {
-  TIM_HandleTypeDef timerdef;
-  IRQn_Type   IRQ_Id;
-  uint32_t callback;
-} tTimerConfig;
+#ifdef STM32GENERIC
+  typedef struct {
+    TIM_HandleTypeDef handle;
+    uint32_t callback;
+  } tTimerConfig;
+  typedef tTimerConfig stm32f4_timer_t;
+#else
+  typedef stimer_t stm32f4_timer_t;
+#endif
 
 // --------------------------------------------------------------------------
 // Public Variables
 // --------------------------------------------------------------------------
 
-//extern const tTimerConfig timerConfig[];
+extern stm32f4_timer_t TimerHandle[];
 
 // --------------------------------------------------------------------------
 // Public functions
@@ -94,12 +105,35 @@ void HAL_timer_enable_interrupt(const uint8_t timer_num);
 void HAL_timer_disable_interrupt(const uint8_t timer_num);
 bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
 
-void HAL_timer_set_compare(const uint8_t timer_num, const uint32_t compare);
-hal_timer_t HAL_timer_get_compare(const uint8_t timer_num);
-uint32_t HAL_timer_get_count(const uint8_t timer_num);
-void HAL_timer_restrain(const uint8_t timer_num, const uint16_t interval_ticks);
+FORCE_INLINE static uint32_t HAL_timer_get_count(const uint8_t timer_num) {
+  return __HAL_TIM_GET_COUNTER(&TimerHandle[timer_num].handle);
+}
+
+FORCE_INLINE static void HAL_timer_set_compare(const uint8_t timer_num, const uint32_t compare) {
+  __HAL_TIM_SET_AUTORELOAD(&TimerHandle[timer_num].handle, compare);
+  if (HAL_timer_get_count(timer_num) >= compare)
+    TimerHandle[timer_num].handle.Instance->EGR |= TIM_EGR_UG; // Generate an immediate update interrupt
+}
+
+FORCE_INLINE static hal_timer_t HAL_timer_get_compare(const uint8_t timer_num) {
+  return __HAL_TIM_GET_AUTORELOAD(&TimerHandle[timer_num].handle);
+}
+
+FORCE_INLINE static void HAL_timer_restrain(const uint8_t timer_num, const uint16_t interval_ticks) {
+  const hal_timer_t mincmp = HAL_timer_get_count(timer_num) + interval_ticks;
+  if (HAL_timer_get_compare(timer_num) < mincmp)
+    HAL_timer_set_compare(timer_num, mincmp);
+}
+
+#ifdef STM32GENERIC
+  FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
+    if (__HAL_TIM_GET_FLAG(&TimerHandle[timer_num].handle, TIM_FLAG_UPDATE) == SET)
+      __HAL_TIM_CLEAR_FLAG(&TimerHandle[timer_num].handle, TIM_FLAG_UPDATE);
+  }
+#else
+  #define HAL_timer_isr_prologue(TIMER_NUM)
+#endif
 
-void HAL_timer_isr_prologue(const uint8_t timer_num);
 #define HAL_timer_isr_epilogue(TIMER_NUM)
 
 #endif // _HAL_TIMERS_STM32F4_H
diff --git a/Marlin/src/HAL/HAL_STM32F4/persistent_store_impl.cpp b/Marlin/src/HAL/HAL_STM32F4/persistent_store_impl.cpp
index 018575983910bfba2b69d672c4b9059c321a81f9..db292bbb5569a96ca6cea1c41bd63e4c65e7734a 100644
--- a/Marlin/src/HAL/HAL_STM32F4/persistent_store_impl.cpp
+++ b/Marlin/src/HAL/HAL_STM32F4/persistent_store_impl.cpp
@@ -21,7 +21,7 @@
  *
  */
 
-#ifdef STM32F4
+#if defined(STM32F4) || defined(STM32F4xx)
 
 #include "../persistent_store_api.h"
 
@@ -72,4 +72,4 @@ bool read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const boo
 } // HAL
 
 #endif // EEPROM_SETTINGS
-#endif // STM32F4
+#endif // STM32F4 || STM32F4xx
diff --git a/Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.cpp b/Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.cpp
index dfe597b23a3082b7b65e1eb82ef7849281da0625..f5dd6bdfae841169a8f650f088d0e6ba7d6c0691 100644
--- a/Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.cpp
+++ b/Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.cpp
@@ -20,7 +20,7 @@
  *
  */
 
-#ifdef STM32F4
+#if defined(STM32F4) || defined(STM32F4xx)
 
 #include "../../inc/MarlinConfig.h"
 
@@ -54,4 +54,4 @@
 
 #endif // USE_WATCHDOG
 
-#endif // STM32F4
+#endif // STM32F4 || STM32F4xx
diff --git a/Marlin/src/HAL/backtrace/unwmemaccess.cpp b/Marlin/src/HAL/backtrace/unwmemaccess.cpp
index 02b46519c5231d24b7e907cd8b6055675681b52c..b939be8803facb9188d9ffc2564357c33f486421 100644
--- a/Marlin/src/HAL/backtrace/unwmemaccess.cpp
+++ b/Marlin/src/HAL/backtrace/unwmemaccess.cpp
@@ -62,7 +62,7 @@
 #define END_FLASH_ADDR    0x00080000
 #endif
 
-#ifdef STM32F4
+#if defined(STM32F4) || defined(STM32F4xx)
 // For STM32F407VET
 //  SRAM  (0x20000000 - 0x20030000) (192kb)
 //  FLASH (0x08000000 - 0x08080000) (512kb)
diff --git a/Marlin/src/HAL/platforms.h b/Marlin/src/HAL/platforms.h
index cf0a8cf9313dc076f225266d931aa61654c6a6e4..6ef7835fec82f658c57b8e4c1302cd1440aebdaa 100644
--- a/Marlin/src/HAL/platforms.h
+++ b/Marlin/src/HAL/platforms.h
@@ -13,7 +13,7 @@
   #define HAL_PLATFORM HAL_LPC1768
 #elif defined(__STM32F1__) || defined(TARGET_STM32F1)
   #define HAL_PLATFORM HAL_STM32F1
-#elif defined(STM32F4)
+#elif defined(STM32F4) || defined(STM32F4xx)
   #define HAL_PLATFORM HAL_STM32F4
 #elif defined(STM32F7)
   #define HAL_PLATFORM HAL_STM32F7
diff --git a/Marlin/src/HAL/servo.cpp b/Marlin/src/HAL/servo.cpp
index 6bafb26dc4d318ae1ff9a7382893defc46249474..a49aac0f998aa660552990bf00a64c6d27357052 100644
--- a/Marlin/src/HAL/servo.cpp
+++ b/Marlin/src/HAL/servo.cpp
@@ -53,7 +53,7 @@
 
 #include "../inc/MarlinConfig.h"
 
-#if HAS_SERVOS && !(IS_32BIT_TEENSY || defined(TARGET_LPC1768) || defined(STM32F4))
+#if HAS_SERVOS && !(IS_32BIT_TEENSY || defined(TARGET_LPC1768) || defined(STM32F4) || defined(STM32F4xx))
 
 //#include <Arduino.h>
 #include "servo.h"
diff --git a/Marlin/src/HAL/servo.h b/Marlin/src/HAL/servo.h
index 9f47dbede15d658fcb1ea576111b3c521617b5d2..5df396efd6fb65105bd53f16a4e8663e0ed86c98 100644
--- a/Marlin/src/HAL/servo.h
+++ b/Marlin/src/HAL/servo.h
@@ -74,7 +74,7 @@
 
 #elif defined(TARGET_LPC1768)
   #include "HAL_LPC1768/LPC1768_Servo.h"
-#elif defined(STM32F4)
+#elif defined(STM32F4) || defined(STM32F4xx)
   #include "HAL_STM32F4/HAL_Servo_STM32F4.h"
 #else
   #include <stdint.h>
diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp
index 2a57b52f340c16c287121ca5d3f936711898a8b9..7a0f835939d6259cbe2ed426482714723a0728c0 100644
--- a/Marlin/src/gcode/calibrate/G28.cpp
+++ b/Marlin/src/gcode/calibrate/G28.cpp
@@ -181,7 +181,7 @@ void GcodeSuite::G28(const bool always_home_all) {
     #endif
     return;
   }
-  
+
   // Wait for planner moves to finish!
   planner.synchronize();
 
diff --git a/Marlin/src/pins/pins_STM32F4.h b/Marlin/src/pins/pins_STM32F4.h
index 5f312a4c25b8b53b404048b850ed4732416e9a0d..22c83896358ae4cf8842f11da4d97956b78e2b02 100644
--- a/Marlin/src/pins/pins_STM32F4.h
+++ b/Marlin/src/pins/pins_STM32F4.h
@@ -20,7 +20,7 @@
  *
  */
 
-#if !defined(STM32F4)
+#if !defined(STM32F4) && !defined(STM32F4xx)
   #error "Oops!  Make sure you have an STM32F4 board selected from the 'Tools -> Boards' menu."
 #endif
 
diff --git a/platformio.ini b/platformio.ini
index 2e8182491f4790e7e4ba9cbe70ed8e2e1235ed1a..1a5f1eeac5c046cb756c6a359c06cbf05feea395 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -265,7 +265,7 @@ monitor_speed = 250000
 platform      = ststm32
 framework     = arduino
 board         = disco_f407vg
-build_flags   = ${common.build_flags} -DUSE_STM32GENERIC -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB
+build_flags   = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB
 lib_deps      = ${common.lib_deps}
 lib_ignore    = Adafruit NeoPixel, c1921b4, TMC2130Stepper
 src_filter    = ${common.default_src_filter}