lpcware

can not configure PLL for sysCLK=30MHz by set_pll() ROM-API

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by uratan on Tue Oct 21 07:37:55 MST 2014
Hi all.

I am trying LPC810, it is fun to handle this powerfull small-package-computer.
I am evaluating Power-profile-API-ROM-driver Now, and I have found a problem.

With IRC:12MHz and set_pll() API,
I can tune system-clock to 24MHz/36MHz, but 30MHz.

Parameters like below returns status: 0x03
  cmd[0] = 12 * 1000;
  cmd[1] = 30 * 1000;
  cmd[2] = CPU_FREQ_EQU;
  cmd[3] = 0;
  LPC_PWRD_API->set_pll(cmd, resp);
   ==> resp[0] is: 0x03 (PLL_FREQ_NOT_FOUND)
   ==> resp[1] is: 12*1000
   ==> 00000000 =SYSPLLCTRL
   ==> 00000000 =SYSPLLSTAT
   ==> 00000001 =SYSAHBCLKDIV
   ==> 0000EDF0 =PDRUNCFG

Parameters like below returns status: 0x00, and the PLL is set to 24MHz.
  cmd[0] = 12 * 1000;
  cmd[1] = 30 * 1000;
  cmd[2] = CPU_FREQ_LTE;
  cmd[3] = 0;
  LPC_PWRD_API->set_pll(cmd, resp);
   ==> resp[0] is: 0x00 (PLL_CMD_SUCCESS)
   ==> resp[1] is: 24*1000
   ==> 00000041 =SYSPLLCTRL
   ==> 00000001 =SYSPLLSTAT
   ==> 00000001 =SYSAHBCLKDIV
   ==> 0000ED70 =PDRUNCFG

Parameters like below returns status: 0x00, and the PLL is set to 36MHz !!.
  cmd[0] = 12 * 1000;
  cmd[1] = 30 * 1000;
  cmd[2] = CPU_FREQ_GTE;
  cmd[3] = 0;
  LPC_PWRD_API->set_pll(cmd, resp);
   ==> resp[0] is: 0x00 (PLL_CMD_SUCCESS)
   ==> resp[1] is: 36*1000
   ==> 00000042 =SYSPLLCTRL
   ==> 00000001 =SYSPLLSTAT
   ==> 00000001 =SYSAHBCLKDIV
   ==> 0000ED70 =PDRUNCFG


I confirmed the result by that I can communicate by uart correctly
and register values dumped thru the uart.

My LPC810 is:
    /*
     *   +------------+
     *   | LPC810     |
     *   ) P  M021F   |
     *   ) X  1M28603 |
     *   | N  +D3414C | ... year 3, week 41, 4C' ver.13.4
     *   +------------+
     *      | Dev.ID:  0x00008100
     *      | B.L.Ver: 13.4         <-- by FlashMagic
     */

And referecing:
    /*
     *   UM10601: LPC81x User manual Rev.1.6
     *   LPC81xM: Product data sheet Rev.4.3
     *   lpcopen_2_01_lpcxpresso_nxp_lpcxpresso_812.zip
     */


I want to use sysCLK=30MHz from IRC:12MHz, shall I not use set_pll() ROM-API ?


- * - * -

p.s.
     Some mistakes in UM10601(Rev.1.6) are found, please confirm these.
(1) Page.127 of 370: PINENABLE0 description
  wrong:   ACMP_I0/ACMP_I1
  correct: ACMP_I1/ACMP_I2
(2) Page.27 of 370: Reset value of WDTOSCCTRL
  wrong:   0x0A0
  correct: 0x000

Outcomes