Brown out at slow supply rise

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

Brown out at slow supply rise

282 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Brinkand on Mon Jan 03 06:06:14 MST 2011
I am using the LPC1111 in an application where it is powered from an linear supply. So if the external supply slowly ramps from 0V to nominal voltage, so will the power supply for the LPC1111, which i nominally 3.1V in this application.

The problem is that for slow rising voltages, the processor does not start up correctly. Same problem goes if supply drops from nominal suply to below 1.5V and up again, but i solved that by:
LPC_SYSCON->BODCTRL = 0x12;  // Set Brown out active and at correct level. 0x12 is 2.4V.  
I assume the problem is that the processor starts up with a little too low supply to actually work, and so hangs in some undefined state. (I cannot debug from this state.) Brown out detection is not in fuse bits, so it will have to be set by software - and this happens after start up code has run. I am using CMSIS.

There is no way i can use an external reset device, so I need to modify the code to handle the slow startup scenario.

I guess the problem comes when the startup code tries to switch from RC oscillator to crystal oscillator and use the PLL for generating 48MHz. I will try to modify the start up code to enable brown out detection before it switches clock.

Anyone seen/solved similar problems?

Any hints as to modify start up code?

Thanking You in anticipation.
0 Kudos
2 Replies

248 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Brinkand on Wed Jan 19 05:37:20 MST 2011
I manually turn up the supply voltage using the knobs on my laboratory supply, so I would say 1V/second, but often slower. There is no overshoot, but when the processors supply current goes up (at initial startup and when clock speed is raised from 12MHZ to 48MHz) there will be a dip due to a series resistor in the power supply. The problem is not due to this resistor as I shorted it during debugging with no effect on the problem.

I found that the start up code does not switch on brown out detection by default. I also found that the processer is capable at starting up below the voltage nedded for full 48MHz operation, so what basically happened was that the processor started up and got stuck when (I assume) switching to 48MHz. I solved the problem by adding a single line in the start up code (system_LPC11xx.c):
void SystemInit (void)
{

#if (CLOCK_SETUP)                                 /* Clock Setup              */
#if (SYSCLK_SETUP)                               /* System Clock Setup       */
#if (SYSOSC_SETUP)                                /* System Oscillator Setup  */
  uint32_t i;

// Added to remove slowly rising supply problem.
  LPC_SYSCON->BODCTRL = 0x12;  // Set Brown out active at  2.4V.  

  LPC_SYSCON->PDRUNCFG     &= ~(1 << 5);          /* Power-up System Osc      */
  LPC_SYSCON->SYSOSCCTRL    = SYSOSCCTRL_Val;
  for (i = 0; i < 200; i++) __NOP();
  LPC_SYSCON->SYSPLLCLKSEL  = SYSPLLCLKSEL_Val;   /* Select PLL Input         */
  LPC_SYSCON->SYSPLLCLKUEN  = 0x01;               /* Update Clock Source      */
  LPC_SYSCON->SYSPLLCLKUEN  = 0x00;               /* Toggle Update Register   */
  LPC_SYSCON->SYSPLLCLKUEN  = 0x01;
  while (!(LPC_SYSCON->SYSPLLCLKUEN & 0x01));     /* Wait Until Updated       */
#if (SYSPLL_SETUP)                                /* System PLL Setup         */
  LPC_SYSCON->SYSPLLCTRL    = SYSPLLCTRL_Val;
  LPC_SYSCON->PDRUNCFG     &= ~(1 << 7);          /* Power-up SYSPLL          */
  while (!(LPC_SYSCON->SYSPLLSTAT & 0x01));          /* Wait Until PLL Locked    */
#endif
#endif
With this, the processor shuts down again when brown out detector is enabled and restarts when supply is high enough to support 48MHz operation.

I suppose most applications have fast rising supplies, but for internal testing, this problem has caused some problems.
0 Kudos

248 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_USA on Wed Jan 12 10:31:11 MST 2011
Can you post some more details about the speed of your supply rise? Also, is there any noise or overshoot (>3.6V?) on the rise waveform?

Thank you,
-NXP
0 Kudos