S32K144's OSC clock is not valid

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K144's OSC clock is not valid

Jump to solution
1,638 Views
chengsz1206
Contributor II

Phenomenon:

 S32K144's system OSC(SOSC_CLK) is always not valid.

“ while(!(SCG->SOSCCSR & SCG_SOSCCSR_SOSCVLD_MASK));”  is running forever。

SOSCCSR.SOSCVLD is  always 0.

The clock source code are as follows。

void SOSC_init_8MHz(void) {
SCG->SOSCDIV=0x00000101; /* SOSCDIV1 & SOSCDIV2 =1: divide by 1 */
SCG->SOSCCFG=0x00000024; /* Range=2: Medium freq (SOSC betw 1MHz-8MHz)*/
/* HGO=0: Config xtal osc for low power */
/* EREFS=1: Input is external XTAL */


while(SCG->SOSCCSR & SCG_SOSCCSR_LK_MASK); /* Ensure SOSCCSR unlocked */
SCG->SOSCCSR=0x00000001; /* LK=0: SOSCCSR can be written */
/* SOSCCMRE=0: OSC CLK monitor IRQ if enabled */
/* SOSCCM=0: OSC CLK monitor disabled */
/* SOSCERCLKEN=0: Sys OSC 3V ERCLK output clk disabled */
/* SOSCLPEN=0: Sys OSC disabled in VLP modes */
/* SOSCSTEN=0: Sys OSC disabled in Stop modes */
/* SOSCEN=1: Enable oscillator */

while(!(SCG->SOSCCSR & SCG_SOSCCSR_SOSCVLD_MASK)); /* Wait for sys OSC clk valid */

}

Labels (1)
0 Kudos
1 Solution
1,354 Views
chengsz1206
Contributor II

The problem has been solved.

※The reason for the problem is the Crystal oscillator hardware problem.

View solution in original post

0 Kudos
4 Replies
1,354 Views
hjy1
Contributor I

Hello, cheng,

I also have this problem, do you how to solve this problem, can you share, thanks.

0 Kudos
1,355 Views
chengsz1206
Contributor II

The problem has been solved.

※The reason for the problem is the Crystal oscillator hardware problem.

0 Kudos
1,354 Views
DELPHI_Eric
Contributor III

I also debug the S32K144 base software at present, can i ask you some questions. I am using the IAR IDE,when i realize CAN driver, it cann't enter the transmit complete interrupt service function. I want to know how did you do to enter the function,thank you.

0 Kudos
1,354 Views
chengsz1206
Contributor II

数据发送后,IFLAG1寄存器有变化吗?

CAN相关的中断寄存器(NVIC, IMASK1)设置了吗?

Has the value of the IFLAG1 register changed after the data has been sent?

Is CAN's NVIC&IMASK1 set ?

0 Kudos