Bootloader / PLL / Crystal / Flash

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

Bootloader / PLL / Crystal / Flash

629 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Tobene on Wed Mar 11 08:56:06 MST 2015
I searched the whole day for solutions, but i didn´t find the right thing.
I developed a board based on a LPC11E67 (64pin). The environment for developing is emIDE with the SEGGER debugger used via SWD. So far everything works fine in debug-mode. But when I wondered why the Program doesn´t stay permanent in flash i discovered some things I don´t understand.

I did not take care of the ISP-pin during my board design. So the PIO0_1-pin was used as digital output without any pull-up or pull-down resistor. The external crystal (10MHz) startet and the PLL could be configured. This is in debug-mode.

In the SEGGER GDBServer Window I can see that the program is written to address 0x00000000. So the program should stay in flash. But when I power up the board without the debugger nothing happens.
Even when I flash the controller with the SEGGER command line tool and read the flash back. I can see that the 4 bytes beginning on address 0x1C were changed. So I think that the checksum should be correct and the program is "valid".

When I attach a pull-up Resistor to ISP pin PIO0_1 then nothing happens even in debug mode.
The programs stops here: In "Chip_SetupXtalClocking()"; it stops at
      /* Dead loop on fail */
"while (resp[0] != PLL_CMD_SUCCESS) {}."  -> So the PLL does not lock

When I use to setup with IRC, it works again in debug-mode. But still the same Problem, that the controller does not start up without debugger for stand-alone mode.

I am using the LPCopen Library 2.11 which is recommended for LPC11U67 and LPC11E67.
But even if I set up the Registern by myself it stops while waiting for the PLL locked.

I never used ARM-controllers before.

So the questions are:
Why doesn´t the PLL work when the ISP Pin PIO0_1 is at high-level?
Why doesn´t the program stay in the flash?

thanks for any kind of help
Labels (1)
0 Kudos
3 Replies

523 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Thu Mar 12 11:58:10 MST 2015

Quote: Tobene
When it is configured to run with the external oscillator, it is only possible to debug when the ISP pin is low. The external oscillator starts up.



:quest:

If you are booting into ISP, IRC is running not the external crystal :) 

Your incomplete description implies that you have a hardware problem with your crystal...


0 Kudos

523 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Tobene on Thu Mar 12 11:38:26 MST 2015
I checked the setup of the clock with two example codes i downloaded from the nxp website.
When the controller is configured to run with the internal oscillator and the ISP pin is at high level, the controller starts up from flash and debugging is also possible.
When it is configured to run with the external oscillator, it is only possible to debug when the ISP pin is low. The external oscillator starts up.
With high ISP pin the external osciallator doesn´t start and starting from flash or debugging isn´t possible.
Maybe I will find a solution ...

0 Kudos

523 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Mar 11 09:44:45 MST 2015

Quote: Tobene
Why doesn´t the program stay in the flash?



If you can read back your code from flash it's obviously in the flash  :)




Quote: Tobene
Why doesn´t the PLL work when the ISP Pin PIO0_1 is at high-level?



Either your hardware or your software is faulty  :((

So compare your schematic with working boards and compare your code with working samples...

0 Kudos