S32K144 Use MCAL PLL configuration

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

S32K144 Use MCAL PLL configuration

Jump to solution
5,787 Views
Embedded_novice
Contributor III

When I was using MCAL to configure the MCU clock, calling the Mcu_GetPLlStatus () function did not return the PLL_LOCKED signal. I found that the register was not set correctly in this MCU_initClock() function, only PLLEN was set to 1, but PLLSEL and PLLVLD were not set, resulting in the inability to achieve PLL locking.

The MCAL version I am using is SW32K1_S32M24xRTD_R21-11_2.0.0uP04, EB version 29.0.0. I would like to know how to solve this problem, whether it is caused by my configuration or other issues?(At the same time, I would like to know the meaning of the P04 suffix in SW32K1_S32M24xRtD_R21-11_2.0.0uP04).clock_cfg.png

Thanks for help!

0 Kudos
Reply
1 Solution
5,711 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Embedded_novice

P->PACTH

View solution in original post

0 Kudos
Reply
14 Replies
5,775 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Embedded_novice

The clock switching to PLL is not completed by "Mcu_InitClock".

Please try use the api "Mcu_DistributePllClock".

0 Kudos
Reply
5,772 Views
Embedded_novice
Contributor III

clock.png

This is the order of my API calls,I cannot escape from the while loop because the PLL_LOCKED signal is not set.

Tags (1)
0 Kudos
Reply
5,768 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Embedded_novice

I can't see any problem with this code. Make sure your current hardware has an external crystal clock.

0 Kudos
Reply
5,765 Views
Embedded_novice
Contributor III
The 8MHz clock of the external SOSC is normal.If there are any other suggestions that can be tried, please let me know. Thank you.
0 Kudos
Reply
5,761 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Embedded_novice

Could you provide me your project's elf file so I can help you test it.

0 Kudos
Reply
5,757 Views
Embedded_novice
Contributor III

Thanks for help!

Tags (1)
0 Kudos
Reply
5,733 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Embedded_novice

Could you please check your McuSystemPll configuration, make sure System PLL is enabled.

Senlent_0-1739344902451.png

 

0 Kudos
Reply
5,723 Views
Embedded_novice
Contributor III

Yes, that's how I did it.Can I send you the EB configuration project to check if there are any configuration errors.EB_CFG.png

0 Kudos
Reply
5,718 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Embedded_novice

You can refer to the routines we provide.

Senlent_1-1739347782755.png

 

 

0 Kudos
Reply
5,715 Views
Embedded_novice
Contributor III
Okay, I will first go to the reference configuration items of the routine. Thank you for your help. Also, may I ask what the meaning of P04 after the MACL name is?
0 Kudos
Reply
5,712 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Embedded_novice

P->PACTH

0 Kudos
Reply
5,703 Views
Embedded_novice
Contributor III
I have found the reason. Thank you for your help
0 Kudos
Reply
5,699 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Embedded_novice

Could you please share the reason why?

0 Kudos
Reply
5,695 Views
Embedded_novice
Contributor III
In MCU ->McuLockSettingConfig ->McuSOSCClockConfig, there is an option called "select external reference clock". When I uncheck this option, it will run normally. I personally understand whether this is related to the crystal oscillator I am using. Currently, I am using an external crystal oscillator, and the external clock source requires an internal OSC oscillator to drive my crystal oscillator to start oscillating. When I use an active crystal oscillator, it can start oscillating directly through external voltage without the need for an internal oscillator to provide a source.