From ed8f1ca9cf26f4090e874f7fadf9f44a4bc332c6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 2 Nov 2019 04:12:10 -0500 Subject: [PATCH] Revert Cortex delay for now --- Marlin/src/HAL/HAL_STM32/HAL.cpp | 2 +- Marlin/src/HAL/shared/Delay.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/HAL/HAL_STM32/HAL.cpp b/Marlin/src/HAL/HAL_STM32/HAL.cpp index addef3a85d..edc161a5d3 100644 --- a/Marlin/src/HAL/HAL_STM32/HAL.cpp +++ b/Marlin/src/HAL/HAL_STM32/HAL.cpp @@ -49,7 +49,7 @@ uint16_t HAL_adc_result; // ------------------------ // Needed for DELAY_NS() / DELAY_US() on CORTEX-M7 -#if (defined(__arm__) || defined(__thumb__)) && WITHIN(__CORTEX_M, 3, 7) +#if (defined(__arm__) || defined(__thumb__)) && __CORTEX_M == 7 // HAL pre-initialization task // Force the preinit function to run between the premain() and main() function // of the STM32 arduino core diff --git a/Marlin/src/HAL/shared/Delay.h b/Marlin/src/HAL/shared/Delay.h index 4433134291..b1dafbb0f5 100644 --- a/Marlin/src/HAL/shared/Delay.h +++ b/Marlin/src/HAL/shared/Delay.h @@ -34,7 +34,7 @@ #if defined(__arm__) || defined(__thumb__) - #if WITHIN(__CORTEX_M, 3, 7) + #if __CORTEX_M == 7 // Cortex-M3 through M7 can use the cycle counter of the DWT unit // http://www.anthonyvh.com/2017/05/18/cortex_m-cycle_counter/