From a10184f1f7a964b6fe1c46ddb20a465e5fbb29c9 Mon Sep 17 00:00:00 2001 From: Jeff Tenney Date: Fri, 31 Jul 2020 11:50:52 -0700 Subject: [PATCH] Revert introduction of 2nd name for NVIC register When I added portNVIC_ICSR_REG I didn't realize there was already a portNVIC_INT_CTRL_REG, which identifies the same register. Not good to have both. Note that portNVIC_INT_CTRL_REG is defined in portmacro.h and is already used in this file (port.c). --- portable/GCC/ARM_CM4F/port.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/portable/GCC/ARM_CM4F/port.c b/portable/GCC/ARM_CM4F/port.c index 7d2bed827..9e7e9b45c 100644 --- a/portable/GCC/ARM_CM4F/port.c +++ b/portable/GCC/ARM_CM4F/port.c @@ -42,7 +42,6 @@ #define portNVIC_SYSTICK_LOAD_REG ( * ( ( volatile uint32_t * ) 0xe000e014 ) ) #define portNVIC_SYSTICK_CURRENT_VALUE_REG ( * ( ( volatile uint32_t * ) 0xe000e018 ) ) #define portNVIC_SYSPRI2_REG ( * ( ( volatile uint32_t * ) 0xe000ed20 ) ) -#define portNVIC_ICSR_REG ( * ( ( volatile uint32_t * ) 0xe000ed04 ) ) /* ...then bits in the registers. */ #define portNVIC_SYSTICK_CLK_BIT ( 1UL << 2UL ) #define portNVIC_SYSTICK_INT_BIT ( 1UL << 1UL ) @@ -564,9 +563,9 @@ void xPortSysTickHandler( void ) the reload value to reflect that the second tick period is already underway. The expected idle time is always at least two ticks. */ ulReloadValue = ulSysTickDecrementsLeft + ( ulTimerCountsForOneTick * (xExpectedIdleTime - 1UL) ); - if( ( portNVIC_ICSR_REG & portNVIC_PEND_SYSTICK_SET_BIT ) != 0 ) + if( ( portNVIC_INT_CTRL_REG & portNVIC_PEND_SYSTICK_SET_BIT ) != 0 ) { - portNVIC_ICSR_REG = portNVIC_PEND_SYSTICK_CLEAR_BIT; + portNVIC_INT_CTRL_REG = portNVIC_PEND_SYSTICK_CLEAR_BIT; ulReloadValue -= ulTimerCountsForOneTick; } if( ulReloadValue > ulStoppedTimerCompensation )