From 4472ec16335dc57b65e495a0e677b141b743abdc Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Wed, 25 Nov 2020 23:13:33 +0100 Subject: [PATCH] msp432p401lp-cc256x: fix delay_ms implementation --- port/msp432p401lp-cc256x/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/port/msp432p401lp-cc256x/main.c b/port/msp432p401lp-cc256x/main.c index 44729a065..8b516a1db 100755 --- a/port/msp432p401lp-cc256x/main.c +++ b/port/msp432p401lp-cc256x/main.c @@ -547,7 +547,8 @@ static void init_systick(void){ static void delay_ms(uint32_t ms){ uint32_t delay_until = systick + ms; - while (systick < delay_until); + // assumes mcu runs fast enough to check once every ms + while (systick != delay_until); } uint32_t hal_time_ms(void){