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;
}
Hi,
This is fixed in the next release SDK 0.8.5 EAR.
Regards,
Daniel