Run LPCXplorer 1830 without JTAG

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Run LPCXplorer 1830 without JTAG

1,617件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ArriaLive on Sat Oct 12 22:51:36 MST 2013
I know there has to be a simple answer to this, but I can't seem to find it.

I have a small program running decently well on the LPCXplorer 1830 board using the LPCXpresso JTAG interface with the LPCXpresso Eclipse IDE to load the program into flash.  It works great.

I would like to have the Xplorer board boot up when powered on to run the program without having to load it each time using the Xpresso debug option.  In other words, I just want to remove the JTAG board, and have the Xplorer just boot up when powered on and execute the code loaded in the last time.

When I just try to power the Xplorer up, there is no indication that the software is functioning (I have the LED's blinking when the program is running).

I know there must be a simple way to power on directly to my code, but I can't figure it out.  Any hints?

Thanks!
0 件の賞賛
返信
9 返答(返信)

1,595件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ArriaLive on Tue Oct 15 12:28:08 MST 2013
Again, thanks for everyone's help.  Your direction led me to do some testing.  Here's what I've learned.

I am running the PLL1 clock at 180MHz to drive the processor at the full rate.  That should be fine.  However, I was dividing that rate by 2 to drive the SPIFI rate at 90MHz.  At first glance, the specs on the Spansion flash memory part say it can read at 104MHz, so 90MHz should be fine, right?  Wrong.

104MHz would be true in serial mode, but in Quad mode, which is what the Xplorer board uses, the max clock frequency on the Spansion flash memory is 80MHz.

So, I changed the divider value to 3 to reduce the SPIFI clock rate down to 60MHz, and voila, everything works great.  I can boot on power up.  Problem solved.

I'm not sure why with the JTAG board attached it actually did work at 90MHz.  I can only assume that the JTAG interface somehow slowed the processor just enough that it worked out ok, but without the debug board attached, the flash memory just couldn't keep up.  Is that logical?

I hope this information is useful to others!

Thanks,
EdA
0 件の賞賛
返信

1,595件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wellsk on Mon Oct 14 10:24:45 MST 2013
There are 4 small DIP switches on the board next to the JTAG connector that select boot mode. Make sure these jumpers are setup for booting from SPIFLASH.

See http://www.lpcware.com/content/nxpfile/an11239-boot-mode-jumper-settings-lpc1800-and-lpc4300-boards
0 件の賞賛
返信

1,595件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ArriaLive on Mon Oct 14 08:47:58 MST 2013
Thank you all for your responses.

From your responses, I learned that if the board runs with JTAG connected, it should run on its own.  Ok, so why doesn't mine?

It occurred to me that I had modified some of the CGU and I2S functions (including CGU_Init to push the frequency up to 180MHz, and to initialize and control PLL0AUDIO).  Even when compiling the Blinky project, I was using my CGU library.

So, I created a new workspace with the original CGU library and Blinky project, compiled them and ran them in debug.  I then disconnected them and hit reset (twice).  Bingo.  It is running on its own.

That means that if it runs with debug, it should run on it's own.  That also means that I've done something with the CGU library that isn't working without JTAG attached.  With a few test cycles, maybe I can narrow it down.

Thanks for the help, I don't know the resolution yet, but I know that it is code related and I can at least do some testing to resolve it.

EdA
0 件の賞賛
返信

1,595件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Oct 14 00:06:17 MST 2013
Have you tried just using the examples that ship for this board within the LPCXpresso 6 Examples subidrectory. Just use import on...

C:\nxp\LPCXpresso_6.0.4_159\lpcxpresso\Examples\NXP\LPC1000\LPC18xx\NGX_LPC1830-Xplorer.zip


If this doesn't work there, then confirm:
[list=1]
  [*]Which version of LPCXpresso IDE you are using?
  [*]Which debug probe you are using?
[/list]

And provide the contents of the debug log:
http://www.lpcware.com/content/faq/lpcxpresso/debug-log

Regards,
LPCXpresso Support
0 件の賞賛
返信

1,595件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cfbsoftware on Sun Oct 13 22:13:40 MST 2013
I have been able to get standalone programs that I have developed with our Astrobe IDE running on an Xplorer LPC1830 board. I have connected an USB->RS232 breakout board from SparkFun to UART0 so that I can see what is going on. However, the behavior is a little unusual. After powerup I typically have to wait about a minute before the board responds to a reset button press. Also I have to press the Reset button twice (that is mentioned somewhere in the documentation).
0 件の賞賛
返信

1,595件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ArriaLive on Sun Oct 13 21:13:53 MST 2013
FallGuy,

Thank you for your response.  No, not doing any semi hosting, no Printf.  My ISR is simply interrupting on the I2S buffer being full, and reading the buffer.  It's basically, the audio demo that comes with the LPCXpresso.  I'm actually not making any special attempt to copy the ISR into RAM, other than declaring it for the linker (using the _attribute_ declaration).  It works fine in debug mode, and the ISR moves to the right address, but I obviously have no visibility into how it works without the debugger.  Shouldn't it be the same?

I also took the demo "blinky" project from the LPCXpresso and compiled and ran it.  No ISR, no moving of code, etc.  Yet, after loading the application into flash, and trying to restart, even that applet doesn't work on its own.

This shouldn't be this difficult.  Are others using LPCXpresso able to get the Xplorer board to run on its own?

Thanks again!
0 件の賞賛
返信

1,595件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Sun Oct 13 14:49:56 MST 2013
Are you doing any semi hosting? I.e. Printf or similar? That requires a debugger to be attached.

Also, you mention an isr running in ram. How does that function get copied into ram.

You could try debugging a running system, to find out why it isn't running. My guess would be you have taken are hard fault and are just spinning in the handler.
0 件の賞賛
返信

1,595件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ArriaLive on Sun Oct 13 14:36:26 MST 2013
tha,

Thank you for your response.  While the LPC1830 is a flashless part, the Xplorer board has on-board flash connected through SPIFI.  In debug mode, I can validate that instructions are running from SPIFI in two ways.  First, the address is 0x14000xxx which is, of course, the SPIFI memory block.  Second, when I slow the SPIFI bus down to 12MHz (normally I'm running it at 90MHz), execution slows down as expected.  So, I'm pretty confident that the instructions are in flash.  Note that I do have one IRQ handler that I have placed in SRAM.

Also, the boot pins are set for SPIFI boot (which is the default for the Xplorer board).  I have verified that the setting is correct by comparing the schematics and documentation to the actual settings.

So, there's something else going on, and I'm not sure what it is.  Is it normal for code that runs fine through JTAG to run ok when disconnected?  Is there a setting that must be changed?  Do I need to disable JTAG somehow?

I must be missing something about making the Xplorer board run on its own.  What am I missing?

Thank you in advance for any help!

EdA
0 件の賞賛
返信

1,595件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tha on Sat Oct 12 23:16:38 MST 2013
The LPC1830 is a flashless part.  I suspect the debug code is residing in the RAM, so that why on a RESET nothing happens.

You need to download the code to external memory and set the boot pins to the appropriate selection.  Or you can program the OTP to boot from the correct source.
0 件の賞賛
返信