Skip to content

Commit b4bb088

Browse files
authored
Merge pull request #1960 from AlessandroA/fix_volatile_missing
K64F KSDK2: Re-add missing volatile in CLOCK functions
2 parents 9836fed + 75fa7af commit b4bb088

File tree

1 file changed

+2
-2
lines changed
  • hal/targets/hal/TARGET_Freescale/TARGET_KSDK2_MCUS/TARGET_K64F/drivers

1 file changed

+2
-2
lines changed

hal/targets/hal/TARGET_Freescale/TARGET_KSDK2_MCUS/TARGET_K64F/drivers/fsl_clock.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ static inline void CLOCK_SetXtal32Freq(uint32_t freq)
719719
static inline void CLOCK_EnableClock(clock_ip_name_t name)
720720
{
721721
uint32_t regAddr = SIM_BASE + CLK_GATE_ABSTRACT_REG_OFFSET((uint32_t)name);
722-
__FSL_CLOCK_SECURE_BITS_SET((uint32_t *) regAddr, (1U << CLK_GATE_ABSTRACT_BITS_SHIFT((uint32_t)name)));
722+
__FSL_CLOCK_SECURE_BITS_SET((volatile uint32_t *) regAddr, (1U << CLK_GATE_ABSTRACT_BITS_SHIFT((uint32_t)name)));
723723
}
724724

725725
/*!
@@ -730,7 +730,7 @@ static inline void CLOCK_EnableClock(clock_ip_name_t name)
730730
static inline void CLOCK_DisableClock(clock_ip_name_t name)
731731
{
732732
uint32_t regAddr = SIM_BASE + CLK_GATE_ABSTRACT_REG_OFFSET((uint32_t)name);
733-
__FSL_CLOCK_SECURE_BITS_CLEAR((uint32_t *) regAddr, (1U << CLK_GATE_ABSTRACT_BITS_SHIFT((uint32_t)name)));
733+
__FSL_CLOCK_SECURE_BITS_CLEAR((volatile uint32_t *) regAddr, (1U << CLK_GATE_ABSTRACT_BITS_SHIFT((uint32_t)name)));
734734
}
735735

736736
/*!

0 commit comments

Comments
 (0)