From 95af1c22b5c46170aa8508f18a5b8d0a0d2b19ff Mon Sep 17 00:00:00 2001 From: wangmengyang Date: Fri, 26 Jan 2018 17:12:59 +0800 Subject: [PATCH] components/phy: add IRAM_ATTR attribute to the two APIs used in phy calibration 1. the two APIs used in phy calibration are called in bluetooth baseband ISR, so locate the them in IRAM --- components/esp32/phy_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp32/phy_init.c b/components/esp32/phy_init.c index 3c355edeaf..325da27b5e 100644 --- a/components/esp32/phy_init.c +++ b/components/esp32/phy_init.c @@ -46,12 +46,12 @@ static int s_phy_rf_init_count = 0; static _lock_t s_phy_rf_init_lock; -uint32_t phy_enter_critical(void) +uint32_t IRAM_ATTR phy_enter_critical(void) { return portENTER_CRITICAL_NESTED(); } -void phy_exit_critical(uint32_t level) +void IRAM_ATTR phy_exit_critical(uint32_t level) { portEXIT_CRITICAL_NESTED(level); }