You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2020/11/17 16:08:19 UTC
[mynewt-core] branch master updated (34e1e49 -> 81c25f7)
This is an automated email from the ASF dual-hosted git repository.
andk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git.
from 34e1e49 hw/mcu/cmac: Recalculate sleep time on request
new 9a4a5b8 hw/mcu/cmac: Dispatch RF calibration req
new 81c25f7 hw/mcu/cmac: Perform RF calibration while idle
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
hw/mcu/dialog/cmac/src/cmac_isr.c | 6 ++++++
hw/mcu/dialog/cmac/src/cmac_sleep.c | 7 +++++++
2 files changed, 13 insertions(+)
[mynewt-core] 01/02: hw/mcu/cmac: Dispatch RF calibration req
Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 9a4a5b8b75511d132fea9f3e0d0e0a467695f2ab
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Mon Nov 16 17:04:13 2020 +0100
hw/mcu/cmac: Dispatch RF calibration req
Handled in mynewt-nimble.
---
hw/mcu/dialog/cmac/src/cmac_isr.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/mcu/dialog/cmac/src/cmac_isr.c b/hw/mcu/dialog/cmac/src/cmac_isr.c
index 91876c7..9d90ab9 100644
--- a/hw/mcu/dialog/cmac/src/cmac_isr.c
+++ b/hw/mcu/dialog/cmac/src/cmac_isr.c
@@ -23,6 +23,8 @@
#include "cmac_priv.h"
#include "CMAC.h"
+extern void ble_rf_calibrate_req(void);
+
void
SYS2CMAC_IRQHandler(void)
{
@@ -41,6 +43,10 @@ SYS2CMAC_IRQHandler(void)
cmac_sleep_recalculate();
}
+ if (pending_ops & CMAC_PENDING_OP_RF_CAL) {
+ ble_rf_calibrate_req();
+ }
+
CMAC->CM_EXC_STAT_REG = CMAC_CM_EXC_STAT_REG_EXC_SYS2CMAC_Msk;
}
[mynewt-core] 02/02: hw/mcu/cmac: Perform RF calibration while idle
Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 81c25f77a5b87910a81acf3162f16d07bb04341c
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Mon Nov 16 22:36:20 2020 +0100
hw/mcu/cmac: Perform RF calibration while idle
If we are idle, we can try to perform RF recalibration. If
recalibration was executed, we skip sleep execution in current
iteration and will reevaluate sleep on next entry.
---
hw/mcu/dialog/cmac/src/cmac_sleep.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/hw/mcu/dialog/cmac/src/cmac_sleep.c b/hw/mcu/dialog/cmac/src/cmac_sleep.c
index 5a97099..bd0bc88 100644
--- a/hw/mcu/dialog/cmac/src/cmac_sleep.c
+++ b/hw/mcu/dialog/cmac/src/cmac_sleep.c
@@ -205,6 +205,8 @@ cmac_sleep_recalculate(void)
}
}
+extern bool ble_rf_try_recalibrate(uint32_t idle_time_us);
+
void
cmac_sleep(void)
{
@@ -236,6 +238,10 @@ cmac_sleep(void)
goto do_sleep;
}
+ if (ble_rf_try_recalibrate(sleep_usecs)) {
+ goto skip_sleep;
+ }
+
sleep_lp_ticks = cmac_timer_usecs_to_lp_ticks(sleep_usecs);
if (sleep_lp_ticks <= 1) {
switch_to_slp = false;
@@ -305,5 +311,6 @@ do_sleep:
g_mcu_wait_for_swd_start = cmac_timer_read_hi();
}
+skip_sleep:
MCU_DIAG_SER('>');
}