Implement DELAY_NS with CYCCNT on Cortex-M7 (#12283)
This commit is contained in:
committed by
Scott Lahteine
parent
f5498168ae
commit
cafabf2055
@ -30,6 +30,7 @@
|
||||
#include "HAL.h"
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "../shared/Delay.h"
|
||||
|
||||
#if ENABLED(EEPROM_EMULATED_WITH_SRAM)
|
||||
#if STM32F7xx
|
||||
@ -80,6 +81,11 @@ uint16_t HAL_adc_result;
|
||||
// HAL initialization task
|
||||
void HAL_init(void) {
|
||||
|
||||
// Needed for DELAY_NS() / DELAY_US() on CORTEX-M7
|
||||
#if (defined(__arm__) || defined(__thumb__)) && __CORTEX_M == 7
|
||||
enableCycleCounter();
|
||||
#endif
|
||||
|
||||
FastIO_init();
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
|
Reference in New Issue
Block a user