Running the program

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

Running the program

2,043 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Elianco_ES on Wed Apr 29 11:44:57 MST 2015

  Hello LPCXpresso users,

  I just start using the  LPCXpresso  ( Version LPCXpresso_7.4.0_229)  IDE/compiler for my LPC1768  board.

  Using the LPC-Link 2 I'm able to load the program and debug it.

  The program is running fine.

However I'd like to run the program after disconnecting  LPC-Link 2

(because the second I disconnect it, the program stops running).

  Can someone explain please what steps I need to make to achieve this.

  Thank you  in advance. :)

  Elik.

 

0 Kudos
Reply
13 Replies

2,026 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Mon May 04 14:50:09 MST 2015

Quote: Elianco_ES
Is there something special about this Port0_6 pin ?



No  


Quote: Elianco_ES
Data sheet says it can be used as GPIO.



And did you switch to GPIO  :quest:

User Manual:

The direction control bit in FIO0DIR register is effective only when the GPIO function is selected for a pin. For other functions, the direction is controlled automatically.
0 Kudos
Reply

2,026 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Elianco_ES on Mon May 04 13:36:39 MST 2015
Hello R2D2,

Thanks for your advice.

My hardware engineer fixed the RESET control pin and now the program runs after disconnecting LPC Link2.

Now I got another problem.

When I program Port0_6 (pin79) as a digital out port, it doesn't work,  it always stays high.

The other pins  Port0_7,  Port0_8,  Port0_9  are working OK.

I used this Port0_6 on Mbed NXP LPC1768 board and it worked just fine. (I use these pins for SPI interface with external Flash

memory).

Is there something special about this Port0_6 pin ?

Data sheet says it can be used as GPIO.

Regards,

Elik.
0 Kudos
Reply

2,026 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Apr 29 13:42:22 MST 2015

Quote: Elianco_ES
I'll have to wait till my hardware engineer fixes the ISP or Reset pins.



Meanwhile you could test a simple blinky project...

Just to ensure that your software isn't including a strange runtime error  :O
0 Kudos
Reply

2,026 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Elianco_ES on Wed Apr 29 13:37:02 MST 2015

  R2D2,

  Thanks for the post.
 
  You are right. It looks like it's  the hardware problem.

  I'll have to wait till my hardware engineer fixes the ISP or Reset pins.

  Best Regards,

   Elik. 

 
0 Kudos
Reply

2,026 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Apr 29 13:24:56 MST 2015

Quote: Elianco_ES
Here is what  I did so far...

  I click on  "Debug" button and wait until the program is  fully loaded.

  Then I press on "Stop" button (I don't need to single step it)

   and the program starts running with all the its bells and whistles.

  However, after I disconnect LPC Link2,  the program stops.




LPCXpresso_User_Guide.pdf:


Quote:

4.4 Debugging a project
....
When debug is started, the program is automatically downloaded to the target and is programmed into FLASH memory, a default breakpoint is set on the first instruction in main(), the application is started (by simulating a processor reset), and code is executed until the default breakpoint is hit.

0 Kudos
Reply

2,026 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Elianco_ES on Wed Apr 29 13:11:55 MST 2015
 
   R2D2,

   You mentioned "At least if you've flashed a working program..."

   How do I flash  a  working program?

   Maybe I missed this step.

   Here is what  I did so far...

  I click on  "Debug" button and wait until the program is  fully loaded.

  Then I press on "Stop" button (I don't need to single step it)

   and the program starts running with all the its bells and whistles.

  However, after I disconnect LPC Link2,  the program stops.

  Regards,

   Elik.

 
   

0 Kudos
Reply

2,026 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Apr 29 13:07:06 MST 2015

Quote: Elianco_ES
So once this problem is resolved  the program should run without the LPC Link2, right ?



Of course  :)

At least if you've flashed a working program..

Therefore I would suggest to flash a very simple project (blinking LED)  :) 
0 Kudos
Reply

2,026 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Elianco_ES on Wed Apr 29 12:47:08 MST 2015


  R2D2,

  Thanks  for your advice.

  I'll ask my hardware engineer to check the  ISP and Reset pins.

  So once this problem is resolved  the program should run without the LPC Link2 , right ?

Regards,

  Elik.



0 Kudos
Reply

2,026 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Apr 29 12:25:57 MST 2015
Then it's time to check your hardware  :)

Especially ISP and Reset pins...

What is your chip doing? Is it in ISP?
0 Kudos
Reply

2,026 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Elianco_ES on Wed Apr 29 12:21:17 MST 2015

  R2D2,

thanks for the link.

After  reading it I'm sure that I'm not using semihosting.

Regards,

Elik.
0 Kudos
Reply

2,026 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Apr 29 12:14:19 MST 2015

Quote: Elianco_ES
  What is  semihosting?



http://www.lpcware.com/content/faq/lpcxpresso/semihosting
0 Kudos
Reply

2,026 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Elianco_ES on Wed Apr 29 12:10:04 MST 2015

Hello R2D2,

Thanks for your  quick reply.

  What is  semihosting?

  I don't think that my board has a problem since the program is running fine.

  The LCD display, the keypad , the uart port and I2c port all are functioning properly

  only while the LPC Link 2 is connected to the board.

  Regards,


  Elik.

 

0 Kudos
Reply

2,026 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Apr 29 11:54:15 MST 2015
Are you using semihosting?

Or is it a problem with your board?
0 Kudos
Reply