File tree Expand file tree Collapse file tree 2 files changed +11
-13
lines changed
subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5 Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Original file line number Diff line number Diff line change 12
12
#include <hal/nrf_ecb.h>
13
13
14
14
#include "util/mem.h"
15
+
16
+ #include "hal/cpu.h"
15
17
#include "hal/ecb.h"
16
18
17
19
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_DRIVER)
@@ -39,7 +41,10 @@ static void do_ecb(struct ecb_param *ecb)
39
41
#if defined(CONFIG_SOC_SERIES_BSIM_NRFXX )
40
42
k_busy_wait (10 );
41
43
#else
42
- /*__WFE();*/
44
+ /* FIXME: use cpu_sleep(), but that will need interrupt
45
+ * wake up source and hence necessary appropriate
46
+ * code.
47
+ */
43
48
#endif
44
49
}
45
50
nrf_ecb_task_trigger (NRF_ECB , NRF_ECB_TASK_STOPECB );
@@ -188,9 +193,7 @@ uint32_t ecb_ut(void)
188
193
ecb .context = & context ;
189
194
status = ecb_encrypt_nonblocking (& ecb );
190
195
do {
191
- __WFE ();
192
- __SEV ();
193
- __WFE ();
196
+ cpu_sleep ();
194
197
} while (!context .done );
195
198
196
199
if (context .status != 0U ) {
Original file line number Diff line number Diff line change 17
17
18
18
#include "util/mem.h"
19
19
20
+ #include "hal/cpu.h"
20
21
#include "hal/ccm.h"
21
22
#include "hal/radio.h"
22
23
#include "hal/ticker.h"
@@ -1608,9 +1609,7 @@ uint32_t radio_ccm_is_done(void)
1608
1609
{
1609
1610
nrf_ccm_int_enable (NRF_CCM , CCM_INTENSET_ENDCRYPT_Msk );
1610
1611
while (NRF_CCM -> EVENTS_ENDCRYPT == 0 ) {
1611
- __WFE ();
1612
- __SEV ();
1613
- __WFE ();
1612
+ cpu_sleep ();
1614
1613
}
1615
1614
nrf_ccm_int_disable (NRF_CCM , CCM_INTENCLR_ENDCRYPT_Msk );
1616
1615
NVIC_ClearPendingIRQ (nrfx_get_irq_number (NRF_CCM ));
@@ -1701,9 +1700,7 @@ uint32_t radio_ar_has_match(void)
1701
1700
nrf_aar_int_enable (NRF_AAR , AAR_INTENSET_END_Msk );
1702
1701
1703
1702
while (NRF_AAR -> EVENTS_END == 0U ) {
1704
- __WFE ();
1705
- __SEV ();
1706
- __WFE ();
1703
+ cpu_sleep ();
1707
1704
}
1708
1705
1709
1706
nrf_aar_int_disable (NRF_AAR , AAR_INTENCLR_END_Msk );
@@ -1737,9 +1734,7 @@ uint8_t radio_ar_resolve(const uint8_t *addr)
1737
1734
nrf_aar_task_trigger (NRF_AAR , NRF_AAR_TASK_START );
1738
1735
1739
1736
while (NRF_AAR -> EVENTS_END == 0 ) {
1740
- __WFE ();
1741
- __SEV ();
1742
- __WFE ();
1737
+ cpu_sleep ();
1743
1738
}
1744
1739
1745
1740
nrf_aar_int_disable (NRF_AAR , AAR_INTENCLR_END_Msk );
You can’t perform that action at this time.
0 commit comments