Hi NXP community,
i am using S32K148EVB-Q176(S32k148 micro) and while trying to work with the following code
void initClock(){
int val;
/* Configure ext. osc. */
SCG_SOSCCFG |= (0x3 << SCG_SOSCCFG_RANGE);
SCG_SOSCCFG |= (0x1 << SCG_SOSCCFG_EREFS);
SCG_SOSCCFG |= (0x1 << SCG_SOSCCFG_HGO);
SCG_SOSCCSR |= (0x1 << SCG_SOSCCSR_SOSCEN);
while(!(SCG_SOSCCSR & (0x1 << SCG_SOSCCSR_SOSCVLD)));
The control is not coming out of the while loop , can you please verify the initialization for clock is correct?
Thanks
已解决! 转到解答。