Why SPI become abnormal when we runtime trim LPO clock in S32K148

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Why SPI become abnormal when we runtime trim LPO clock in S32K148

ソリューションへジャンプ
244件の閲覧回数
Ferty
Contributor I

Hello, NXP support team

Our system have a s32k148 mcu and a SoC, MCU and SoC communication by SPI, SoC is master and MCU is slave.

Now we open MCU internal RTC and assign the clock as 1Khz LPO, but the clock is not accuracy, so we "runtime" adjust the trim value of LPO.

If the MCU need to adjust the trim value, it will call CLOCK_SYS_UpdateConfiguration
clockMan1_InitConfig0.pmcConfig.lpoClockConfig.trimValue = lpo_clock_trim_value;
CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT);

Sometimes after the MCU update the trim value, the SoC's SPI driver will crash.

MCU is SPI slave, so it will use the clock from master, why the MCU change LPO clock will let SPI crash?

What relationship between LPO clock and SPI?

0 件の賞賛
1 解決策
201件の閲覧回数
Ferty
Contributor I

Hello, NXP support team

Sorry, it is our mistake. It is because we call this function CLOCK_SYS_UpdateConfiguration() to trim LPO. And this function will re-initiate SIRC and affect SPI connection. I think it is root cause. Thanks for your help.

元の投稿で解決策を見る

2 返答(返信)
202件の閲覧回数
Ferty
Contributor I

Hello, NXP support team

Sorry, it is our mistake. It is because we call this function CLOCK_SYS_UpdateConfiguration() to trim LPO. And this function will re-initiate SIRC and affect SPI connection. I think it is root cause. Thanks for your help.

224件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Ferty,

Could you share some information about your project? Which SoC are you utilizing as master? Is the slave MCU using an example from the SDK package? 

Just to be sure, you are using the SoC as master, and when the MCU changes LPO clock, the master's SPI driver crashes? Have you tried disabling the SPI module while the MCU changes the LPO clock just so the LPO configuration does not affect it?

Best regards,
Julián

 

0 件の賞賛