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.
已解决! 转到解答。
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
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
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
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