LPC553x PMC clocking when adjusting the FRO settings

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

LPC553x PMC clocking when adjusting the FRO settings

Jump to solution
2,566 Views
asund
Contributor II

Hi, I ran into an issue with the generated code from Config Tools / MCUxpresso for the LPC553x system.

The clock tools don't understand the dependency of the power management controller (PMC) on the FRO1M or FRO12M clock. The clocks tool can be configured to disable the FRO12M clock source (I had no use for it in my design) and it will happily cut power to the module without switching it to the FRO1M clock source. After this, all PMC register values will be reported as 0x0 and my debugger session will go unresponsive.

A warning (at least) should probably be generated if both FRO1M and FRO12M clocks are disabled.

My temporary solution is to leave this otherwise unused clock enabled.

0 Kudos
Reply
1 Solution
2,484 Views
marek_neuzil
NXP Employee
NXP Employee

Hello,

Thank you for your hints. I have checked also the SDK power driver (fsl_power.c/.h) and both clock source FRO 12MHz and FRO 1MHz are used in this driver.

The FRO 12MHz is selected in the POWER_PowerInit() function by default. The FRO 1MHz is used in the POWER_SetLowPowerMode() API function before entering a power down mode. Therefore both clock sources are used by the PMC when SDK power driver is used.

I will create an issue to fix this problem in the Clocks tool for LPC55xx MCUs. The PMC clock sources shall be also specified for the Clock Consumers view in the Clocks tool.

Best Regards,

Marek Neuzil

View solution in original post

5 Replies
2,511 Views
marek_neuzil
NXP Employee
NXP Employee

Hello,

Thank you for reporting this issue. I have checked the reference manual of the LPC553x but there is not any specific description of the FRO 12 MHz and FRO 1MHz usage for the PMC. Could you provide the .mex configuration file or step-by-step instructions how to reproduce the issue, please?

I need to know the exact configuration to fix the issue.

Best Regards,

Marek Neuzil

0 Kudos
Reply
2,502 Views
asund
Contributor II
Hi, thank you for the quick response. I am away from the office today so cannot get you the details right away, but in checking the reference manual for the PMC CTRL register there’s a SELCLOCK field that allows the choice. I think it’s used to switch the source to FRO12M on startup in order to execute faster.

I didn’t see this in the normal clock tree documentation either.
0 Kudos
Reply
2,485 Views
marek_neuzil
NXP Employee
NXP Employee

Hello,

Thank you for your hints. I have checked also the SDK power driver (fsl_power.c/.h) and both clock source FRO 12MHz and FRO 1MHz are used in this driver.

The FRO 12MHz is selected in the POWER_PowerInit() function by default. The FRO 1MHz is used in the POWER_SetLowPowerMode() API function before entering a power down mode. Therefore both clock sources are used by the PMC when SDK power driver is used.

I will create an issue to fix this problem in the Clocks tool for LPC55xx MCUs. The PMC clock sources shall be also specified for the Clock Consumers view in the Clocks tool.

Best Regards,

Marek Neuzil

2,517 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @asund 

Do you want to disable both FRO1M AND FRO12M clock ? Or just want to disable FRO12M, while the FRO1M also does not work? Please take a screenshot show your issue more detail, I will help to check on my  side.

 

BR

Alice

0 Kudos
Reply
2,500 Views
asund
Contributor II
Thank you as well for the response. As I said above, I am away from the office and so I can’t get the details at the moment. I am in the habit of turning off unused clocks, which is what I did with the FRO12M oscillator. However, due to the missing dependency, no code is generated to switch the PMC to the FRO1M prior to doing this in the generated clock setup code.

I would expect the generated code to select whatever clock will still be active prior to turning off one of these clocks.

I am using the FRO1M for the watchdog, but I believe both of these clocks can be turned off in the tools and at least a warning or error about the PMC being unclocked should be generated for the user if this is attempted.
0 Kudos
Reply