AnsweredAssumed Answered

Bug in SCG_SetHsrunClockControl in SDK 0.8.4 EAR

Question asked by Justin Sheng on Oct 8, 2017
Latest reply on Oct 13, 2017 by Daniel Martynek

There is an obvious bug in function SCG_SetHsrunClockControl in scg_hw_access.h. Hope NXP can fix it in the next SDK release:

 

static inline void SCG_SetHsrunClockControl(SCG_Type * base, uint32_t source, uint32_t coreDivider, uint32_t busDivider, uint32_t slowDivider)
{
uint32_t value = (uint32_t)(((source << SCG_HCCR_SCS_SHIFT) & SCG_HCCR_SCS_MASK) |
((coreDivider << SCG_HCCR_DIVCORE_SHIFT) & SCG_HCCR_DIVCORE_MASK) |
((busDivider << /*SCG_HCCR_DIVSLOW_SHIFT*/SCG_HCCR_DIVBUS_SHIFT) & SCG_HCCR_DIVBUS_MASK) |
((slowDivider << SCG_HCCR_DIVSLOW_SHIFT) & SCG_HCCR_DIVSLOW_MASK) );

base->HCCR = value;
}

Outcomes