CLOCK_SYS_UpdateConfiguration() fails

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

CLOCK_SYS_UpdateConfiguration() fails

ソリューションへジャンプ
1,429件の閲覧回数
EE_CW
Contributor III

Hi together

We have a prototype pcb with a S32K148_144 MCU on it.

I took a sample program, which runs without problems on the Eval Board S32K148EVBQ176.

But on our prototype pcb, the function CLOCK_SYS_UpdateConfiguration() fails with an TIMEOUT. As a result, the program runs into defaultISR (file startup_S32K148.s line 374) after this functioncall.

Does anybody have a hint or a solution?

Sample project is attached.

reagrds

Mario

1 解決策
1,244件の閲覧回数
EE_CW
Contributor III

Hi Daniel

We checked again the clock settings. Then we found out that we accidentally used a 16MHz crystal instead of a 8MHz crystal.

Another point was to set the correct "HIGH Gain Oscillator Select"-Setting according to the manual.

With these correct settings, we were able to run our program on our prototype PCB.

clockSettings.PNG

We tried out the fault handling already before. There the PC was always pointing on a library function. But it didn't give a hint about the real error.

But for the moment our problem is solved.

Thank you

regards

Mario

元の投稿で解決策を見る

4 返答(返信)
1,244件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Mario,

Sorry for the late response.
I have just run you project and could reproduce the fault on S32K148_144 EVB.

As you can see below, it is a precise bus fault at address 0x40049068.

pastedImage_3.png

pastedImage_4.png

When the PINS driver is initialized, the PORTA PCC clock is gated off. 

pastedImage_5.png

The CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT); function returns STATUS_TIMEOUT because the SOSC module clock cannot be validated.

Do you use an External clock generator or a crystal with the internal SOSC.

Because in the project, you selected external External clock source.

pastedImage_6.png
If crystal, then change the configuration to External crystal oscillator instead.

pastedImage_7.png

Thank you,

Regards,
Daniel

0 件の賞賛
1,244件の閲覧回数
EE_CW
Contributor III

Hi Daniel

Thanks for your answer.

I changed the configuration to External crystal oscillator.

But there is still an error present. If I want to step throug the main program, the program runs into default ISR (file startup_S32K148.s line 377) within CLOCK_SYS_UpdateConfiguration(). If I check then the registers, I can see the following:

IBUSERR.PNG

So there seems to be still a problem with the SOSC module?

regards

Mario

0 件の賞賛
1,244件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Mario,

An instruction bus error, but hard to say what is the cause. 

Have you changed the optimization level?

You can try to get the PC address of the instruction as explained here: Fault handling on S32K144.

pastedImage_1.png

Cortex™ M4 Devices Generic User Guide

Regards,

Daniel

1,245件の閲覧回数
EE_CW
Contributor III

Hi Daniel

We checked again the clock settings. Then we found out that we accidentally used a 16MHz crystal instead of a 8MHz crystal.

Another point was to set the correct "HIGH Gain Oscillator Select"-Setting according to the manual.

With these correct settings, we were able to run our program on our prototype PCB.

clockSettings.PNG

We tried out the fault handling already before. There the PC was always pointing on a library function. But it didn't give a hint about the real error.

But for the moment our problem is solved.

Thank you

regards

Mario