hex file does not run when download with Flash Magic

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

hex file does not run when download with Flash Magic

2,037件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dan Griffin on Thu Apr 17 05:45:34 MST 2014
Have created a simple "blinky" project which runs just fine with the LPCxpresso download to a target LPC1114/301 processor on the OM11049 board. I use the format
arm-none-eabi-size ${BuildArtifactFileName}; arm-none-eabi-objcopy -O ihex ${BuildArtifactFileName} ${BuildArtifactFileBaseName}.hex ; to create the hex file. which all works just fine. The hex file is then downloaded to a custom board using Flash Magic. Flash Magic reads the target "LPC11114/302 device code back correctly and the code is download and verified correctly, however, the code just fails to run. Any suggestions to get the simple code to work! Have tried on two different boards, so don't think their is a problem with the custom target!

Original Attachment has been moved to: BLINKY.zip

0 件の賞賛
返信
6 返答(返信)

1,912件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Apr 22 11:49:25 MST 2014

Quote: Dan Griffin
Why is default is set to ext crystal clock????



Datasheet:


Quote:
The IRC is trimmed to 1 % accuracy...



So it's not possible to use all peripherals (at least if higher baudrates are required) with this accuracy.
0 件の賞賛
返信

1,912件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dan Griffin on Tue Apr 22 11:28:56 MST 2014
Final Solution::  For some reason the project default build for the lpcxpresso for the LPC11xx using CMSISv2p00_LPC11xx has in the file system_LPC11xx.c default set to and external clock!
#define SYSPLLCLKSEL_Val      0x00000001  {line 128}
  // changed value from 1 to 0 to select IRC inplace of the ext crystal clock.
Note my board has no external crystal, so when the code try to  wait until the PLL lock { which never happen--It never got out of the while loop}
Why is default is set to ext crystal clock????
Making the change to line 128 now permits the hex file downloaded by Flash Magic to run correctly. The test board LPCXpresso Board has a external crystal installed, so this section of code did not hang, before reiniting the clock to the IRC osc in the main program.
0 件の賞賛
返信

1,912件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Thu Apr 17 07:32:31 MST 2014

Quote: Dan Griffin
Any suggestions to get the simple code to work! Have tried on two different boards, so don't think their is a problem with the custom target!



Your code is working (at least with a working hardware) and toggling the LEDs with 0.7s. So you have not a software problem  :)
0 件の賞賛
返信

1,912件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Thu Apr 17 07:19:03 MST 2014
A common design problem with custom boards is floating ISP and RESET pins - which would stop your board running. Search this forum - there are lots of posts on this subject.

I also suggest that you learn how to attach a debugger. Its not difficult and will save you a lot of time in the long run.
0 件の賞賛
返信

1,912件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dan Griffin on Thu Apr 17 06:50:46 MST 2014
Leds are on correct GPIO pins PIO1_10, PIO1_11 and verified on LPCXpresso board with added LEDs on these same ports!  How to debugg with no attached debugger!
Scope verifies the clock is not running on CLOCKOUT.
0 件の賞賛
返信

1,912件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Thu Apr 17 05:53:13 MST 2014
How do you know that it doesn't run? Maybe it is running, but the LED is on a different GPIO? Why don't you debug it?
0 件の賞賛
返信