You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by we...@apache.org on 2020/11/16 15:52:26 UTC

[mynewt-nimble] branch master updated: cmac/driver: Make CMAC2SYS IRQ priority configurable

This is an automated email from the ASF dual-hosted git repository.

wes3 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
     new 4dc6f04  cmac/driver: Make CMAC2SYS IRQ priority configurable
     new 19d599b  Merge pull request #885 from wes3/cmac2sys_priority
4dc6f04 is described below

commit 4dc6f0494b2878c7cb4b64754148ba2ad4a9c37d
Author: Will San Filippo <wi...@juul.com>
AuthorDate: Fri Nov 13 19:24:49 2020 -0800

    cmac/driver: Make CMAC2SYS IRQ priority configurable
    
    Allow the application to modify the CMAC2SYS IRQ priority.
---
 nimble/transport/dialog_cmac/cmac_driver/src/cmac_host.c | 2 +-
 nimble/transport/dialog_cmac/cmac_driver/syscfg.yml      | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/nimble/transport/dialog_cmac/cmac_driver/src/cmac_host.c b/nimble/transport/dialog_cmac/cmac_driver/src/cmac_host.c
index 78c722c..d07d127 100644
--- a/nimble/transport/dialog_cmac/cmac_driver/src/cmac_host.c
+++ b/nimble/transport/dialog_cmac/cmac_driver/src/cmac_host.c
@@ -235,7 +235,7 @@ cmac_host_init(void)
 
     /* Setup CMAC2SYS interrupt */
     NVIC_SetVector(CMAC2SYS_IRQn, (uint32_t)cmac2sys_isr);
-    NVIC_SetPriority(CMAC2SYS_IRQn, 0);
+    NVIC_SetPriority(CMAC2SYS_IRQn, MYNEWT_VAL(CMAC_CMAC2SYS_IRQ_PRIORITY));
     NVIC_DisableIRQ(CMAC2SYS_IRQn);
 
     /* Enable Radio LDO */
diff --git a/nimble/transport/dialog_cmac/cmac_driver/syscfg.yml b/nimble/transport/dialog_cmac/cmac_driver/syscfg.yml
index e3f3a2d..a382c42 100644
--- a/nimble/transport/dialog_cmac/cmac_driver/syscfg.yml
+++ b/nimble/transport/dialog_cmac/cmac_driver/syscfg.yml
@@ -94,5 +94,11 @@ syscfg.defs:
             CMAC binary.
         value: 128K
 
+    CMAC_CMAC2SYS_IRQ_PRIORITY:
+        description: >
+            The priority of the CMAC2SYS IRQ. Default is 0, or highest
+            priority.
+        value: 0
+
 syscfg.restrictions.BLE_HOST:
     - TRNG