lpcware

Set the PLL to non-standard settings and can no longer communicate with the MCU

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 18, 2016 by lpcware
Content originally posted in LPCWare by BasicPoke on Tue May 10 15:13:14 MST 2016
I set the PLL to non-standard settings and can no longer communicate with the MCU (LPC3131).  I was trying to see if the PLL could run at lower than 24 MHz, so I changed the 24 MHz settings, changing Pdec from 10 to 20, as follows:

  HP1_MDEC = 1023;    //M divider
  HP1_NDEC = 770;     //N divider
  HP1_PDEC = 20;      //P divider
  HP1_SELR = 0;
  HP1_SELI = 16;
  HP1_SELP = 7;


Now when I try to "Download and Debug" (using IAR embedded workbench IDE), I get a dialog "Failed to get CPU status after 4 retries.  Retry?".  I am using IAR System J-Link as a debugger.  I have tried restarting the IDE and unplugging and replugging the J-Link.  Here is some gibberish in the Debug Log:

Tue May 10, 2016 16:56:37: Loaded macro file: \\...\FlashLoader\FlashEmbArtLPC313x_SPINOR.mac 
Tue May 10, 2016 16:56:37: JLINK command: ProjectFile = \\...\settings\WGProj_Debug_SPINOR_boot_iRAM.jlink, return = 0
Tue May 10, 2016 16:56:37: Device "LPC3131" selected (0 KB flash, 192 KB RAM).
Tue May 10, 2016 16:56:37: DLL version: V4.78m, compiled Dec 18 2013 20:40:58
Tue May 10, 2016 16:56:37: Firmware: J-Link ARM V6 compiled Jun 20 2012 19:43:26
Tue May 10, 2016 16:56:37: JTAG speed is fixed to: 1000 kHz
Tue May 10, 2016 16:56:37: TotalIRLen = ?, IRPrint = 0x..FFFFFFFF8442780003997707
Tue May 10, 2016 16:56:37: Hardware reset with strategy 0 was performed
Tue May 10, 2016 16:56:37: Initial reset was performed
Tue May 10, 2016 16:56:37: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFE072D20001
Tue May 10, 2016 16:56:37: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFF062120001
Tue May 10, 2016 16:56:37: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFE072920001
Tue May 10, 2016 16:56:37: Prepare hardware for Flashloader 
Tue May 10, 2016 16:56:37: TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
Tue May 10, 2016 16:56:37: Hardware reset with strategy 0 was performed
Tue May 10, 2016 16:56:37: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFF062130001
Tue May 10, 2016 16:56:37: TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
Tue May 10, 2016 16:56:37: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFE072120001
...


From the CLOCK_OUT pin running at 2.5 MHz, it appears the PLL is running at 5 MHz.  My app is still running normally.  How can I get out of this state?  It is very unusual for this to happen and I am confident it was caused by my PLL settings.
Thanks
Ron

Outcomes