S32K312 STM clock issues

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S32K312 STM clock issues

跳至解决方案
8,950 次查看
JayJay_H
Contributor III

Hi

Recently, I have been using STM0 as a millisecond level timestamp to start timing from power on

Prescaler is 240,clock source is FIRC_CLK(48Mhz)

The time is obtained through the Stm_Ip_GetCounterValue(0) interface

During use, it was found that the obtained time was faster than normal time, for example, the actual time passed 500ms but the obtained time was 600ms, and it has been getting faster all the time

But when I switch the clock source to AIPS_PLAT_CLK(60MHz) or FXOSC_CLK(16MHz), the time value obtained from the interface is accurate

The attached image shows my configuration of STM and Clock in DS. Do I have any other options to configure?

标签 (1)
标记 (3)
0 项奖励
回复
1 解答
8,721 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @JayJay_H,

It means TS1_CLK is clocked from AIPS_PLAT_CLK.

If you have any question on Time stamps, please create a new thread.

 

Thank you,

BR, Daniel

在原帖中查看解决方案

0 项奖励
回复
5 回复数
8,922 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @JayJay_H,

I can't explain the 20% inaccuracy.

But +-5% can be expected.

danielmartynek_1-1707228376518.png

 

FIRC can be measured at CLKOUT.

S32K312 clock system diagram

danielmartynek_0-1707228263324.png

 

Regards,

Daniel

 

0 项奖励
回复
8,914 次查看
JayJay_H
Contributor III

Hi Daniel

Thank you for your reply

What about AIPS_PLAT_CLK and FXOSC_CLK

Is there any inaccuracy in AIPS_PLAT_CLK and FXOSC_CLK?

If so, what is the inaccuracy range,also +-5%?

Best regards,

Jay

0 项奖励
回复
8,907 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Jay,

The accuracy of FXOSC is given by the tolerance of the external crystal/resonator.

If AIPS_PLAT_CLK is generated by the SPLL, there is Jitter specified in the DS, Table 41.

 

Regards,

Daniel

 

 

 

 

 

Best regards,

Daniel

 

 

 

0 项奖励
回复
8,794 次查看
JayJay_H
Contributor III

Hi Daniel

Thanks for your reply.

I found the following attachment while reading  the referance manual

My questions are:

what's the meaning of "TS1_CLK—AIPS_PLAT_CLK" ?

According to the attachment,  does it means that STM0 should use AIPS_PLAT_CLK?

 

(Please forgive me for replying to you so late, recently it was Chinese New Year and I was on holiday

BTW, Happy New Year of the Loong)

0 项奖励
回复
8,722 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @JayJay_H,

It means TS1_CLK is clocked from AIPS_PLAT_CLK.

If you have any question on Time stamps, please create a new thread.

 

Thank you,

BR, Daniel

0 项奖励
回复