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
The following commit(s) were added to refs/heads/master by this push: new 2d6cbf84f mynewt-core/system_cmac: Suppress a meta-stability issue from raising a false error condition towards the controller (mainly observed in GF). 2d6cbf84f is described below commit 2d6cbf84fab6cd4942463879eb3260137062ced5 Author: ikaracha <ioannis.karachalios...@renesas.com> AuthorDate: Mon May 8 14:56:24 2023 +0300 mynewt-core/system_cmac: Suppress a meta-stability issue from raising a false error condition towards the controller (mainly observed in GF). --- hw/mcu/dialog/cmac/src/system_cmac.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hw/mcu/dialog/cmac/src/system_cmac.c b/hw/mcu/dialog/cmac/src/system_cmac.c index c0af58446..ec83c963c 100644 --- a/hw/mcu/dialog/cmac/src/system_cmac.c +++ b/hw/mcu/dialog/cmac/src/system_cmac.c @@ -28,6 +28,14 @@ #include <ipc_cmac/diag.h> #include "CMAC.h" +static inline void +set_reg32_bits(uint32_t addr, uint32_t mask, uint32_t val) +{ + volatile uint32_t *reg = (volatile uint32_t *)addr; + + *reg = (*reg & (~mask)) | (val << __builtin_ctz(mask)); +} + void SystemInit(void) { @@ -51,4 +59,6 @@ SystemInit(void) CMAC->CM_CTRL_REG |= CMAC_CM_CTRL_REG_CM_BS_ENABLE_Msk; cmac_timer_init(); + + set_reg32_bits(0x40000904, 0x0004, 1); }