LPC 4357 booting issue.

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

LPC 4357 booting issue.

1,048 Views
Jaga123
Contributor I

Hi,

I am using LPC4357 controller. I wrote a code for led blinking. After downloading the code into uC  and reset the uC the code is not running. If I do restart some 4-6 times, then 1-2 times uC running properly. but in debug mode it is running every time properly. If I change the code to internal oscillator, then every time the code is running. I probed the crystal output (crystal load capacitance is 20pf) and input it is coming proper waveform including the time when led is not blinking. After that I probed reset circuit also it is taking around 80msec to reach 3.3V. I observed a strange behavior while measuring reset voltage, whenever I touch reset pin with multimeter probe then controller is up and running properly. 

What I am understanding is controller is getting up with internal oscillator, but it is not able to shift to external oscillator sometimes. I am not able to find the proper root cause of the issue. can anyone please help me to debug the issue?

0 Kudos
Reply
11 Replies

943 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

From your description, it appears that the external crystal leads to the issue that the LPC4357 can not start-up reliably, because the chip runs fine if you use internal clock.

First of all, pls check the loading capacitor value.

The Cx1=Cx2=2*(crystal load capacitance)-cap_parasitic.

for example, if the required crystal load capacitance is 20pF, assume the parasitic cap value is 3pF,the

Cx1=Cx2=2*20pF-3pF=37pF.

Secondly, pls check the code to switch from internal clock to external crystal clock? do you use PLL?

BR

XiangJun Rong

 

0 Kudos
Reply

918 Views
Jaga123
Contributor I

Hi, 

My load capacitance of crystal is 10pf and I mounted 20pf. yes code is working in PLL1. Since low frequency clock shifting from internal to external is happening so I think code is right. 

0 Kudos
Reply

906 Views
Jaga123
Contributor I

 This is my PLL configuration.

for 192Mhz

MSEL 11

DIRECT 1

and other values are zero.

0 Kudos
Reply

1,004 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Pls check if the P2_7 is high during/after Reset so that the LPC4357 can boot-up from internal flash.

xiangjun_rong_0-1705974683607.png

Hope it can help you

BR

XiangJun Rong

0 Kudos
Reply

1,000 Views
Jaga123
Contributor I

Yes, P2_7 is pulled high.

0 Kudos
Reply

1,038 Views
frank_m
Senior Contributor III

I am not a hardware designer, but picked up one or the other thing during the years ...

First, I guess you are talking about a custom board, i.e. your own design, don't you ?

Second, such instabilities can come from the clock path or the power supply path. Insufficient power supply or capacitive buffering can cause such problems, especially during transients (like clock switching).

And third, I would check the PLL setting code, so as to not exceed any parameter limits, even temporarily (multiplier, divider). 

I would try lower core clock values, and see if they work more stable. At least as a start.

1,035 Views
Jaga123
Contributor I
Yes, this is a custom board. I used PLL1 setting to 192Mhz and all PLL parameters are in the limit. I have taken an example code of keil for LPC4357 and changed the clock parameters. My external clock is 16 Mhz. If I changed this to internal RC clock 12Mhz and PLL1 frequency to 180Mhz then it is working fine.
I think the clock switch is not happening sometime and code is stuck in that place. but same thing is not happening in debug case.
I tried giving 3.3V direct to board from a DC power supply and making current limit set as 3A. but I didn,t observed any improvement.
0 Kudos
Reply

847 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

You use 16MHz external clock as the PLL1 input clock, the M is 12, the FCCO is 16*12=192MHz, so the FCLKOUT is 192MHz, I suppose it is okay.

I suppose that PLL1 lock is not implemented, you poll the lock bit, but is it not set, the the code hangs.

BR

XiangJun Rong

 

0 Kudos
Reply

676 Views
Jaga123
Contributor I

 Hi, 

Here I attached the PLL1 code part.

Jaga123_0-1707110127515.png

I am thinking it is correct. please check the same. If I call this part two times once for PLL1 clock for 144Hz and other for 192 MHz then code is working fine.

0 Kudos
Reply

1,032 Views
Jaga123
Contributor I

I tried to set PLL1 at 160Mhz and it is working fine. But what could be the issue in higher clock settings? we can set clock upto 204Mhz. In some pcb I used same circuit and I am using 192Mhz.

0 Kudos
Reply

1,030 Views
frank_m
Senior Contributor III

As said, I'm not a hardware guy, thus I can't really answer the question.
But the result would give an indication.
I assume you (or the designer) used the recommended values and placement of clock tree and power supply components.

> In some pcb I used same circuit and I am using 192Mhz.

That would indicate hardware, IMHO. Perhaps one of the component values is "marginal", or the PCB layout is needs improvement.

But I leave that to hardware guys with more experience in this area ...

0 Kudos
Reply