lpcware

PLL0 PDEC calculation

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by jgorsk on Tue Oct 23 04:31:59 MST 2012
Is the PLL0 PDEC calculation  pseudo-code correct? It's producing different
values of PDEC than this tool (PLL Dialog)

http://www.lpcware.com/content/nxpfile/audio-pll-settings-calculation-tool

P_max=0x00000200, x=0x00000010;
switch (P) {
case 0: x = 0xFFFFFFFF;
case 1: x = 0x00000062;
case 2: x = 0x00000042;
default: for (i = P; i <= P_max; i++)
x = (((x ^ (x>>2)) & 1) << 4) | ((x>>1) & 0xF); }

PDEC[6:0] = x;


The values generated by PLL Dialog are correct.

Outcomes