LPC54608 Powerlib/User manual UM10912

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

LPC54608 Powerlib/User manual UM10912

2,491 Views
joachimbeck
Contributor I

Hello,

in the user manual UM10912 in chapter 6 page 120 the following can be found:

Use the PLL to boost the input frequency if a main clock is needed with a frequency higher than the FRO 12
MHz clock and the FRO 96 MHz or 48 MHz clock (fro_hf) is not appropriate. Before connecting the output
of the system PLL to the main clock, the user must call the POWER_SetVoltageForFreq API in SDK
software package to deliver the amount of power needed for the CPU operating frequency. The API call
sets the FLASHCFG register. See Chapter 8 “LPC546xx Power profiles/Power control API”. At 220 MHz
the system clock/access time can be lower when compared to 180 MHz because the power library
optimizes the on-chip voltage regulator.

I use Keil and copied the keil_lib_power.lib from the actual SDK_2.3.0_LPCXpresso64608. If i call the function 

POWER_SetVoltageForFreq (for example with frequency 96000000Hz) the register FLASHCFG is not changed by the function as stated in the manual (checked with the debugger).

If I do not change FLASHCFG manually together with the call of POWER_SetVoltageForFreq, my application crashes after switching the main clock to FROHF. If i manually set the FLASHCFG.FLASHTIM  everything seems to work. 

Is this a bug in the library or a documentation problem in UM10912?

Thank you for your support.

Joachim 

Labels (1)
0 Kudos
Reply
2 Replies

1,978 Views
joachimbeck
Contributor I

Hi Kerry,

thank you for your detailed answer, that was exactly the way i do it, after finding out,  m that the documentation seems to be wrong. 

In UM10912 it is written:

The API call sets the FLASHCFG register.

and that seems to be wrong!

POWER_SetVoltageForFreq does not set the FLASHCFG register. This has to be done by calling CLOCK_SetFLASHAccessCyclesForFreq.

So this should be corrected in UM10912.

Thank your for your support.

Best regards

Joachim

0 Kudos
Reply

1,978 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Joachim,

    I have test POWER_SetVoltageForFreq with frequency 96000000Hz. the FLASHCFG[FLASHTIM] is changed , it works.

   I think you didn't add this code:

    POWER_SetVoltageForFreq(
        96000000U); /*!< Set voltage for the one of the fastest clock outputs: System clock output */
    CLOCK_SetFLASHAccessCyclesForFreq(96000000U); /*!< Set FLASH wait states for core */

  I also use the SDK code, the project:SDK_2.3.0_LPCXpresso54608\boards\lpcxpresso54608\driver_examples\fmeas\mdk

Then do this modification:

 pastedImage_1.png

Then test the 96M function.

 pastedImage_2.png

pastedImage_3.png

 

I think you didn't add  CLOCK_SetFLASHAccessCyclesForFreq(96000000U);///*!< Set FLASH wait states for core */

Please follow my step, then try it again.

If you still have questions about it, please kindly let me know


Have a great day,
Kerry

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply