Skip to content

Commit 0aa8dc2

Browse files
committed
Updated LOOP_SCALER value for Cortex-M33
Signed-off-by: Mahesh Mahadevan <[email protected]>
1 parent 401580f commit 0aa8dc2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

platform/mbed_wait_api_no_rtos.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ void wait_us(int us)
5151
// Cortex-M0 and Cortex-M1 take 6 cycles per iteration - SUBS = 1, 2xNOP = 2, BCS = 3
5252
#define LOOP_SCALER 6000
5353
#elif (__CORTEX_M == 0 && defined __CM0PLUS_REV) || __CORTEX_M == 3 || __CORTEX_M == 4 || \
54-
__CORTEX_M == 23 || __CORTEX_M == 33
55-
// Cortex-M0+, M3, M4, M23 and M33 take 5 cycles per iteration - SUBS = 1, 2xNOP = 2, BCS = 2
56-
// TODO - check M33
54+
__CORTEX_M == 23
55+
// Cortex-M0+, M3, M4 and M23 take 5 cycles per iteration - SUBS = 1, 2xNOP = 2, BCS = 2
5756
#define LOOP_SCALER 5000
57+
#elif __CORTEX_M == 33
58+
// Cortex-M33 can dual issue for 3 cycles per iteration (SUB,NOP) = 1, (NOP,BCS) = 2
59+
#define LOOP_SCALER 3000
5860
#elif __CORTEX_M == 7
5961
// Cortex-M7 manages to dual-issue for 2 cycles per iteration (SUB,NOP) = 1, (NOP,BCS) = 1
6062
// (The NOPs were added to stabilise this - with just the SUB and BCS, it seems that the

0 commit comments

Comments
 (0)