1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 04:52:59 +01:00

cpu/esp32: add busy loop cycles for all sub-arches

This commit is contained in:
Benjamin Valentin 2024-01-09 23:33:55 +01:00
parent 8bcfe7b7b6
commit fff9ff14da
4 changed files with 23 additions and 3 deletions

View File

@ -28,6 +28,11 @@ extern "C" {
/** Mapping configured ESP32 default clock to CLOCK_CORECLOCK define */
#define CLOCK_CORECLOCK (1000000UL * CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ)
/**
* @brief CPU cycles per busy wait loop
*/
#define CPU_CYCLES_PER_LOOP (6)
/**
* @name Predefined GPIO names
* @{

View File

@ -28,6 +28,11 @@ extern "C" {
/** Mapping configured ESP32-C3 default clock to CLOCK_CORECLOCK define */
#define CLOCK_CORECLOCK (1000000UL * CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ)
/**
* @brief CPU cycles per busy wait loop
*/
#define CPU_CYCLES_PER_LOOP (4)
/**
* @name Predefined GPIO names
* @{

View File

@ -28,6 +28,11 @@ extern "C" {
/** Mapping configured ESP32-S2 default clock to CLOCK_CORECLOCK define */
#define CLOCK_CORECLOCK (1000000UL * CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ)
/**
* @brief CPU cycles per busy wait loop
*/
#define CPU_CYCLES_PER_LOOP (6)
/**
* @name Predefined GPIO names
* @{

View File

@ -19,13 +19,18 @@
#ifndef PERIPH_CPU_ESP32S3_H
#define PERIPH_CPU_ESP32S3_H
/** Mapping configured ESP32-S3 default clock to CLOCK_CORECLOCK define */
#define CLOCK_CORECLOCK (1000000UL * CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ)
#ifdef __cplusplus
extern "C" {
#endif
/** Mapping configured ESP32-S3 default clock to CLOCK_CORECLOCK define */
#define CLOCK_CORECLOCK (1000000UL * CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ)
/**
* @brief CPU cycles per busy wait loop
*/
#define CPU_CYCLES_PER_LOOP (5)
/**
* @name Predefined GPIO names
* @{