Skip to content

Commit 897e9a5

Browse files
committed
Address PR comments.
1 parent 7acd88f commit 897e9a5

File tree

21 files changed

+693
-483
lines changed

21 files changed

+693
-483
lines changed

portable/ARMv8M/non_secure/port.c

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL;
393393
#if ( configUSE_TICKLESS_IDLE == 1 )
394394
__attribute__( ( weak ) ) void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime )
395395
{
396-
uint32_t ulCtrlRegValue, ulReloadValue, ulCompleteTickPeriods, ulCompletedSysTickDecrements, ulSysTickDecrementsLeft;
396+
uint32_t ulControlStatusValue, ulReloadValue, ulCompleteTickPeriods, ulCompletedSysTickDecrements, ulSysTickDecrementsLeft;
397397
TickType_t xModifiableIdleTime;
398398

399399
/* Make sure the SysTick reload value does not overflow the counter. */
@@ -498,17 +498,17 @@ PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL;
498498

499499
/*
500500
* Read the contents of the portNVIC_SYSTICK_CTRL_REG register into
501-
* ulCtrlRegValue to ensure portNVIC_SYSTICK_COUNT_FLAG_BIT is taken
501+
* ulControlStatusValue to ensure portNVIC_SYSTICK_COUNT_FLAG_BIT is taken
502502
* into account later on.
503503
*/
504-
ulCtrlRegValue = portNVIC_SYSTICK_CTRL_REG;
504+
ulControlStatusValue = portNVIC_SYSTICK_CTRL_REG;
505505

506506
/* Disable the SysTick timer. */
507-
ulCtrlRegValue &= ~( portNVIC_SYSTICK_ENABLE_BIT );
508-
portNVIC_SYSTICK_CTRL_REG = ulCtrlRegValue;
507+
ulControlStatusValue &= ~( portNVIC_SYSTICK_ENABLE_BIT );
508+
portNVIC_SYSTICK_CTRL_REG = ulControlStatusValue;
509509

510-
/* Update ulCtrlRegValue */
511-
ulCtrlRegValue |= portNVIC_SYSTICK_CTRL_REG;
510+
/* Update ulControlStatusValue */
511+
ulControlStatusValue |= portNVIC_SYSTICK_CTRL_REG;
512512

513513
/*
514514
* The time the SysTick is stopped for is accounted for as best it can
@@ -518,7 +518,7 @@ PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL;
518518
*/
519519

520520
/* Determine whether the SysTick has already counted to zero. */
521-
if( ( ulCtrlRegValue & portNVIC_SYSTICK_COUNT_FLAG_BIT ) != 0 )
521+
if( ( ulControlStatusValue & portNVIC_SYSTICK_COUNT_FLAG_BIT ) != 0 )
522522
{
523523
uint32_t ulCalculatedLoadValue;
524524

@@ -542,6 +542,9 @@ PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL;
542542
* function exits, the tick value maintained by the tick is stepped
543543
* forward by one less than the time spent waiting. */
544544
ulCompleteTickPeriods = xExpectedIdleTime - 1UL;
545+
546+
/* Clear portNVIC_SYSTICK_COUNT_FLAG_BIT */
547+
ulControlStatusValue &= ~( portNVIC_SYSTICK_COUNT_FLAG_BIT );
545548
}
546549
else
547550
{
@@ -601,39 +604,42 @@ PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL;
601604
#else
602605
{
603606
/* Temporarily switch to core clock */
604-
ulCtrlRegValue |= portNVIC_SYSTICK_CLK_BIT;
605-
portNVIC_SYSTICK_CTRL_REG = ulCtrlRegValue;
607+
ulControlStatusValue |= portNVIC_SYSTICK_CLK_BIT;
608+
portNVIC_SYSTICK_CTRL_REG = ulControlStatusValue;
606609

607610
/* Enable SysTick */
608-
ulCtrlRegValue |= portNVIC_SYSTICK_ENABLE_BIT;
609-
portNVIC_SYSTICK_CTRL_REG = ulCtrlRegValue;
611+
ulControlStatusValue |= portNVIC_SYSTICK_ENABLE_BIT;
612+
portNVIC_SYSTICK_CTRL_REG = ulControlStatusValue;
610613

611-
/* Read portNVIC_SYSTICK_CTRL_REG into ulCtrlRegValue */
612-
ulCtrlRegValue = portNVIC_SYSTICK_CTRL_REG;
614+
/* Read portNVIC_SYSTICK_CTRL_REG into ulControlStatusValue */
615+
ulControlStatusValue |= portNVIC_SYSTICK_CTRL_REG;
613616

614617
/* Disable SysTick */
615-
ulCtrlRegValue &= ~( portNVIC_SYSTICK_ENABLE_BIT );
616-
portNVIC_SYSTICK_CTRL_REG = ulCtrlRegValue;
618+
ulControlStatusValue &= ~( portNVIC_SYSTICK_ENABLE_BIT );
619+
portNVIC_SYSTICK_CTRL_REG = ulControlStatusValue;
617620

618-
/* Update ulCtrlRegValue */
619-
ulCtrlRegValue |= portNVIC_SYSTICK_CTRL_REG;
621+
/* Update ulControlStatusValue */
622+
ulControlStatusValue |= portNVIC_SYSTICK_CTRL_REG;
620623

621624
/* Switch back to external clock. */
622-
ulCtrlRegValue &= ~( portNVIC_SYSTICK_CLK_BIT );
623-
portNVIC_SYSTICK_CTRL_REG = ulCtrlRegValue;
625+
ulControlStatusValue &= ~( portNVIC_SYSTICK_CLK_BIT );
626+
portNVIC_SYSTICK_CTRL_REG = ulControlStatusValue;
624627

625-
if( ( ulCtrlRegValue & portNVIC_SYSTICK_COUNT_FLAG_BIT ) != 0 )
628+
if( ( ulControlStatusValue & portNVIC_SYSTICK_COUNT_FLAG_BIT ) != 0 )
626629
{
627630
/* The partial tick period already ended. Be sure the SysTick
628631
* counts it only once. */
629632
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0;
633+
634+
/* Clear portNVIC_SYSTICK_COUNT_FLAG_BIT */
635+
ulControlStatusValue &= ~( portNVIC_SYSTICK_COUNT_FLAG_BIT );
630636
}
631637

632638
portNVIC_SYSTICK_LOAD_REG = ulTimerCountsForOneTick - 1UL;
633639

634640
/* Enable SysTick */
635-
ulCtrlRegValue |= ( portNVIC_SYSTICK_ENABLE_BIT | portNVIC_SYSTICK_INT_BIT );
636-
portNVIC_SYSTICK_CTRL_REG = ulCtrlRegValue;
641+
ulControlStatusValue |= ( portNVIC_SYSTICK_ENABLE_BIT | portNVIC_SYSTICK_INT_BIT );
642+
portNVIC_SYSTICK_CTRL_REG = ulControlStatusValue;
637643
}
638644
#endif /* portNVIC_SYSTICK_CLK_BIT_CONFIG */
639645

@@ -668,9 +674,13 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
668674
/* Set or clear the portNVIC_SYSTICK_CLK_BIT as required. */
669675

670676
#if ( portNVIC_SYSTICK_CLK_BIT_CONFIG == portNVIC_SYSTICK_CLK_BIT )
677+
{
671678
portNVIC_SYSTICK_CTRL_REG |= portNVIC_SYSTICK_CLK_BIT;
679+
}
672680
#else /* portNVIC_SYSTICK_CLK_BIT_CONFIG == 0 */
681+
{
673682
portNVIC_SYSTICK_CTRL_REG &= ~( portNVIC_SYSTICK_CLK_BIT_CONFIG );
683+
}
674684
#endif /* portNVIC_SYSTICK_CLK_BIT_CONFIG */
675685

676686
portNVIC_SYSTICK_CTRL_REG |= ( portNVIC_SYSTICK_ENABLE_BIT | portNVIC_SYSTICK_INT_BIT );

portable/GCC/ARM_CM23/non_secure/port.c

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL;
393393
#if ( configUSE_TICKLESS_IDLE == 1 )
394394
__attribute__( ( weak ) ) void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime )
395395
{
396-
uint32_t ulCtrlRegValue, ulReloadValue, ulCompleteTickPeriods, ulCompletedSysTickDecrements, ulSysTickDecrementsLeft;
396+
uint32_t ulControlStatusValue, ulReloadValue, ulCompleteTickPeriods, ulCompletedSysTickDecrements, ulSysTickDecrementsLeft;
397397
TickType_t xModifiableIdleTime;
398398

399399
/* Make sure the SysTick reload value does not overflow the counter. */
@@ -498,17 +498,17 @@ PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL;
498498

499499
/*
500500
* Read the contents of the portNVIC_SYSTICK_CTRL_REG register into
501-
* ulCtrlRegValue to ensure portNVIC_SYSTICK_COUNT_FLAG_BIT is taken
501+
* ulControlStatusValue to ensure portNVIC_SYSTICK_COUNT_FLAG_BIT is taken
502502
* into account later on.
503503
*/
504-
ulCtrlRegValue = portNVIC_SYSTICK_CTRL_REG;
504+
ulControlStatusValue = portNVIC_SYSTICK_CTRL_REG;
505505

506506
/* Disable the SysTick timer. */
507-
ulCtrlRegValue &= ~( portNVIC_SYSTICK_ENABLE_BIT );
508-
portNVIC_SYSTICK_CTRL_REG = ulCtrlRegValue;
507+
ulControlStatusValue &= ~( portNVIC_SYSTICK_ENABLE_BIT );
508+
portNVIC_SYSTICK_CTRL_REG = ulControlStatusValue;
509509

510-
/* Update ulCtrlRegValue */
511-
ulCtrlRegValue |= portNVIC_SYSTICK_CTRL_REG;
510+
/* Update ulControlStatusValue */
511+
ulControlStatusValue |= portNVIC_SYSTICK_CTRL_REG;
512512

513513
/*
514514
* The time the SysTick is stopped for is accounted for as best it can
@@ -518,7 +518,7 @@ PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL;
518518
*/
519519

520520
/* Determine whether the SysTick has already counted to zero. */
521-
if( ( ulCtrlRegValue & portNVIC_SYSTICK_COUNT_FLAG_BIT ) != 0 )
521+
if( ( ulControlStatusValue & portNVIC_SYSTICK_COUNT_FLAG_BIT ) != 0 )
522522
{
523523
uint32_t ulCalculatedLoadValue;
524524

@@ -542,6 +542,9 @@ PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL;
542542
* function exits, the tick value maintained by the tick is stepped
543543
* forward by one less than the time spent waiting. */
544544
ulCompleteTickPeriods = xExpectedIdleTime - 1UL;
545+
546+
/* Clear portNVIC_SYSTICK_COUNT_FLAG_BIT */
547+
ulControlStatusValue &= ~( portNVIC_SYSTICK_COUNT_FLAG_BIT );
545548
}
546549
else
547550
{
@@ -601,39 +604,42 @@ PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL;
601604
#else
602605
{
603606
/* Temporarily switch to core clock */
604-
ulCtrlRegValue |= portNVIC_SYSTICK_CLK_BIT;
605-
portNVIC_SYSTICK_CTRL_REG = ulCtrlRegValue;
607+
ulControlStatusValue |= portNVIC_SYSTICK_CLK_BIT;
608+
portNVIC_SYSTICK_CTRL_REG = ulControlStatusValue;
606609

607610
/* Enable SysTick */
608-
ulCtrlRegValue |= portNVIC_SYSTICK_ENABLE_BIT;
609-
portNVIC_SYSTICK_CTRL_REG = ulCtrlRegValue;
611+
ulControlStatusValue |= portNVIC_SYSTICK_ENABLE_BIT;
612+
portNVIC_SYSTICK_CTRL_REG = ulControlStatusValue;
610613

611-
/* Read portNVIC_SYSTICK_CTRL_REG into ulCtrlRegValue */
612-
ulCtrlRegValue = portNVIC_SYSTICK_CTRL_REG;
614+
/* Read portNVIC_SYSTICK_CTRL_REG into ulControlStatusValue */
615+
ulControlStatusValue |= portNVIC_SYSTICK_CTRL_REG;
613616

614617
/* Disable SysTick */
615-
ulCtrlRegValue &= ~( portNVIC_SYSTICK_ENABLE_BIT );
616-
portNVIC_SYSTICK_CTRL_REG = ulCtrlRegValue;
618+
ulControlStatusValue &= ~( portNVIC_SYSTICK_ENABLE_BIT );
619+
portNVIC_SYSTICK_CTRL_REG = ulControlStatusValue;
617620

618-
/* Update ulCtrlRegValue */
619-
ulCtrlRegValue |= portNVIC_SYSTICK_CTRL_REG;
621+
/* Update ulControlStatusValue */
622+
ulControlStatusValue |= portNVIC_SYSTICK_CTRL_REG;
620623

621624
/* Switch back to external clock. */
622-
ulCtrlRegValue &= ~( portNVIC_SYSTICK_CLK_BIT );
623-
portNVIC_SYSTICK_CTRL_REG = ulCtrlRegValue;
625+
ulControlStatusValue &= ~( portNVIC_SYSTICK_CLK_BIT );
626+
portNVIC_SYSTICK_CTRL_REG = ulControlStatusValue;
624627

625-
if( ( ulCtrlRegValue & portNVIC_SYSTICK_COUNT_FLAG_BIT ) != 0 )
628+
if( ( ulControlStatusValue & portNVIC_SYSTICK_COUNT_FLAG_BIT ) != 0 )
626629
{
627630
/* The partial tick period already ended. Be sure the SysTick
628631
* counts it only once. */
629632
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0;
633+
634+
/* Clear portNVIC_SYSTICK_COUNT_FLAG_BIT */
635+
ulControlStatusValue &= ~( portNVIC_SYSTICK_COUNT_FLAG_BIT );
630636
}
631637

632638
portNVIC_SYSTICK_LOAD_REG = ulTimerCountsForOneTick - 1UL;
633639

634640
/* Enable SysTick */
635-
ulCtrlRegValue |= ( portNVIC_SYSTICK_ENABLE_BIT | portNVIC_SYSTICK_INT_BIT );
636-
portNVIC_SYSTICK_CTRL_REG = ulCtrlRegValue;
641+
ulControlStatusValue |= ( portNVIC_SYSTICK_ENABLE_BIT | portNVIC_SYSTICK_INT_BIT );
642+
portNVIC_SYSTICK_CTRL_REG = ulControlStatusValue;
637643
}
638644
#endif /* portNVIC_SYSTICK_CLK_BIT_CONFIG */
639645

@@ -668,9 +674,13 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
668674
/* Set or clear the portNVIC_SYSTICK_CLK_BIT as required. */
669675

670676
#if ( portNVIC_SYSTICK_CLK_BIT_CONFIG == portNVIC_SYSTICK_CLK_BIT )
677+
{
671678
portNVIC_SYSTICK_CTRL_REG |= portNVIC_SYSTICK_CLK_BIT;
679+
}
672680
#else /* portNVIC_SYSTICK_CLK_BIT_CONFIG == 0 */
681+
{
673682
portNVIC_SYSTICK_CTRL_REG &= ~( portNVIC_SYSTICK_CLK_BIT_CONFIG );
683+
}
674684
#endif /* portNVIC_SYSTICK_CLK_BIT_CONFIG */
675685

676686
portNVIC_SYSTICK_CTRL_REG |= ( portNVIC_SYSTICK_ENABLE_BIT | portNVIC_SYSTICK_INT_BIT );

portable/GCC/ARM_CM23_NTZ/non_secure/port.c

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL;
393393
#if ( configUSE_TICKLESS_IDLE == 1 )
394394
__attribute__( ( weak ) ) void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime )
395395
{
396-
uint32_t ulCtrlRegValue, ulReloadValue, ulCompleteTickPeriods, ulCompletedSysTickDecrements, ulSysTickDecrementsLeft;
396+
uint32_t ulControlStatusValue, ulReloadValue, ulCompleteTickPeriods, ulCompletedSysTickDecrements, ulSysTickDecrementsLeft;
397397
TickType_t xModifiableIdleTime;
398398

399399
/* Make sure the SysTick reload value does not overflow the counter. */
@@ -498,17 +498,17 @@ PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL;
498498

499499
/*
500500
* Read the contents of the portNVIC_SYSTICK_CTRL_REG register into
501-
* ulCtrlRegValue to ensure portNVIC_SYSTICK_COUNT_FLAG_BIT is taken
501+
* ulControlStatusValue to ensure portNVIC_SYSTICK_COUNT_FLAG_BIT is taken
502502
* into account later on.
503503
*/
504-
ulCtrlRegValue = portNVIC_SYSTICK_CTRL_REG;
504+
ulControlStatusValue = portNVIC_SYSTICK_CTRL_REG;
505505

506506
/* Disable the SysTick timer. */
507-
ulCtrlRegValue &= ~( portNVIC_SYSTICK_ENABLE_BIT );
508-
portNVIC_SYSTICK_CTRL_REG = ulCtrlRegValue;
507+
ulControlStatusValue &= ~( portNVIC_SYSTICK_ENABLE_BIT );
508+
portNVIC_SYSTICK_CTRL_REG = ulControlStatusValue;
509509

510-
/* Update ulCtrlRegValue */
511-
ulCtrlRegValue |= portNVIC_SYSTICK_CTRL_REG;
510+
/* Update ulControlStatusValue */
511+
ulControlStatusValue |= portNVIC_SYSTICK_CTRL_REG;
512512

513513
/*
514514
* The time the SysTick is stopped for is accounted for as best it can
@@ -518,7 +518,7 @@ PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL;
518518
*/
519519

520520
/* Determine whether the SysTick has already counted to zero. */
521-
if( ( ulCtrlRegValue & portNVIC_SYSTICK_COUNT_FLAG_BIT ) != 0 )
521+
if( ( ulControlStatusValue & portNVIC_SYSTICK_COUNT_FLAG_BIT ) != 0 )
522522
{
523523
uint32_t ulCalculatedLoadValue;
524524

@@ -542,6 +542,9 @@ PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL;
542542
* function exits, the tick value maintained by the tick is stepped
543543
* forward by one less than the time spent waiting. */
544544
ulCompleteTickPeriods = xExpectedIdleTime - 1UL;
545+
546+
/* Clear portNVIC_SYSTICK_COUNT_FLAG_BIT */
547+
ulControlStatusValue &= ~( portNVIC_SYSTICK_COUNT_FLAG_BIT );
545548
}
546549
else
547550
{
@@ -601,39 +604,42 @@ PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL;
601604
#else
602605
{
603606
/* Temporarily switch to core clock */
604-
ulCtrlRegValue |= portNVIC_SYSTICK_CLK_BIT;
605-
portNVIC_SYSTICK_CTRL_REG = ulCtrlRegValue;
607+
ulControlStatusValue |= portNVIC_SYSTICK_CLK_BIT;
608+
portNVIC_SYSTICK_CTRL_REG = ulControlStatusValue;
606609

607610
/* Enable SysTick */
608-
ulCtrlRegValue |= portNVIC_SYSTICK_ENABLE_BIT;
609-
portNVIC_SYSTICK_CTRL_REG = ulCtrlRegValue;
611+
ulControlStatusValue |= portNVIC_SYSTICK_ENABLE_BIT;
612+
portNVIC_SYSTICK_CTRL_REG = ulControlStatusValue;
610613

611-
/* Read portNVIC_SYSTICK_CTRL_REG into ulCtrlRegValue */
612-
ulCtrlRegValue = portNVIC_SYSTICK_CTRL_REG;
614+
/* Read portNVIC_SYSTICK_CTRL_REG into ulControlStatusValue */
615+
ulControlStatusValue |= portNVIC_SYSTICK_CTRL_REG;
613616

614617
/* Disable SysTick */
615-
ulCtrlRegValue &= ~( portNVIC_SYSTICK_ENABLE_BIT );
616-
portNVIC_SYSTICK_CTRL_REG = ulCtrlRegValue;
618+
ulControlStatusValue &= ~( portNVIC_SYSTICK_ENABLE_BIT );
619+
portNVIC_SYSTICK_CTRL_REG = ulControlStatusValue;
617620

618-
/* Update ulCtrlRegValue */
619-
ulCtrlRegValue |= portNVIC_SYSTICK_CTRL_REG;
621+
/* Update ulControlStatusValue */
622+
ulControlStatusValue |= portNVIC_SYSTICK_CTRL_REG;
620623

621624
/* Switch back to external clock. */
622-
ulCtrlRegValue &= ~( portNVIC_SYSTICK_CLK_BIT );
623-
portNVIC_SYSTICK_CTRL_REG = ulCtrlRegValue;
625+
ulControlStatusValue &= ~( portNVIC_SYSTICK_CLK_BIT );
626+
portNVIC_SYSTICK_CTRL_REG = ulControlStatusValue;
624627

625-
if( ( ulCtrlRegValue & portNVIC_SYSTICK_COUNT_FLAG_BIT ) != 0 )
628+
if( ( ulControlStatusValue & portNVIC_SYSTICK_COUNT_FLAG_BIT ) != 0 )
626629
{
627630
/* The partial tick period already ended. Be sure the SysTick
628631
* counts it only once. */
629632
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0;
633+
634+
/* Clear portNVIC_SYSTICK_COUNT_FLAG_BIT */
635+
ulControlStatusValue &= ~( portNVIC_SYSTICK_COUNT_FLAG_BIT );
630636
}
631637

632638
portNVIC_SYSTICK_LOAD_REG = ulTimerCountsForOneTick - 1UL;
633639

634640
/* Enable SysTick */
635-
ulCtrlRegValue |= ( portNVIC_SYSTICK_ENABLE_BIT | portNVIC_SYSTICK_INT_BIT );
636-
portNVIC_SYSTICK_CTRL_REG = ulCtrlRegValue;
641+
ulControlStatusValue |= ( portNVIC_SYSTICK_ENABLE_BIT | portNVIC_SYSTICK_INT_BIT );
642+
portNVIC_SYSTICK_CTRL_REG = ulControlStatusValue;
637643
}
638644
#endif /* portNVIC_SYSTICK_CLK_BIT_CONFIG */
639645

@@ -668,9 +674,13 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) /* PRIVILEGED_FU
668674
/* Set or clear the portNVIC_SYSTICK_CLK_BIT as required. */
669675

670676
#if ( portNVIC_SYSTICK_CLK_BIT_CONFIG == portNVIC_SYSTICK_CLK_BIT )
677+
{
671678
portNVIC_SYSTICK_CTRL_REG |= portNVIC_SYSTICK_CLK_BIT;
679+
}
672680
#else /* portNVIC_SYSTICK_CLK_BIT_CONFIG == 0 */
681+
{
673682
portNVIC_SYSTICK_CTRL_REG &= ~( portNVIC_SYSTICK_CLK_BIT_CONFIG );
683+
}
674684
#endif /* portNVIC_SYSTICK_CLK_BIT_CONFIG */
675685

676686
portNVIC_SYSTICK_CTRL_REG |= ( portNVIC_SYSTICK_ENABLE_BIT | portNVIC_SYSTICK_INT_BIT );

0 commit comments

Comments
 (0)