Forums

LPC2148 power up problem on Rowley

Started by mayotte_d February 22, 2007
I have this project that uses a lpc2148 (similar to Kickstart board).
It runs a huge program on the jtag fine and used to run when the jtag
was disconnected. It now doesn't start up correctly when the jtag
isn't present. It never gets to my first instruction correctly.

All of the signals on the jtag connector seem fine.
The RST/ and BSL (p0.14) are find and the DBG jumper is wired in.
The software was generated with the Rowley crossarm.

If I start it on the jtag and then pull the jtag plug, it keeps
running fine.

Also there is another lpc2148 on the board using the same power and
RST/ signal and it works fine.Its program was generated on an IAR
compiler and has its own jtag connector.

Anyone got any idea of where to start looking?

An Engineer's Guide to the LPC2100 Series

STARTUP_FROM_RESET. FAQ. STARTUP_FROM_RESET. FAQ. STARTUP_FROM_RESET.
FAQ. STARTUP_FROM_RESET. FAQ. STARTUP_FROM_RESET. FAQ.
STARTUP_FROM_RESET. FAQ.

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors

> -----Original Message-----
> From: l... [mailto:l...] On
> Behalf Of mayotte_d
> Sent: 22 February 2007 19:35
> To: l...
> Subject: [lpc2000] LPC2148 power up problem on Rowley
>
> I have this project that uses a lpc2148 (similar to Kickstart board).
> It runs a huge program on the jtag fine and used to run when the jtag
> was disconnected. It now doesn't start up correctly when the jtag
> isn't present. It never gets to my first instruction correctly.
>
> All of the signals on the jtag connector seem fine.
> The RST/ and BSL (p0.14) are find and the DBG jumper is wired in.
> The software was generated with the Rowley crossarm.
>
> If I start it on the jtag and then pull the jtag plug, it keeps
> running fine.
>
> Also there is another lpc2148 on the board using the same power and
> RST/ signal and it works fine.Its program was generated on an IAR
> compiler and has its own jtag connector.
>
> Anyone got any idea of where to start looking?
>
> Yahoo! Groups - Join or create groups, clubs, forums & communities.
> Links
If you did a search of this forum, you'd find that this quest has
probably been asked more than a few times. :)

http://ccgi.rowley.co.uk/support/faq.php?do=article&articleidI

--- In l..., "mayotte_d" wrote:
>
> I have this project that uses a lpc2148 (similar to Kickstart board).
> It runs a huge program on the jtag fine and used to run when the jtag
> was disconnected. It now doesn't start up correctly when the jtag
> isn't present. It never gets to my first instruction correctly.
>
> All of the signals on the jtag connector seem fine.
> The RST/ and BSL (p0.14) are find and the DBG jumper is wired in.
> The software was generated with the Rowley crossarm.
>
> If I start it on the jtag and then pull the jtag plug, it keeps
> running fine.
>
> Also there is another lpc2148 on the board using the same power and
> RST/ signal and it works fine.Its program was generated on an IAR
> compiler and has its own jtag connector.
>
> Anyone got any idea of where to start looking?
>
This one is better...
http://ccgi.rowley.co.uk/support/faq.php?do=article&articleid5
--- In l..., "mayotte_d" wrote:
>
> I have this project that uses a lpc2148 (similar to Kickstart board).
> It runs a huge program on the jtag fine and used to run when the jtag
> was disconnected. It now doesn't start up correctly when the jtag
> isn't present. It never gets to my first instruction correctly.
>
> All of the signals on the jtag connector seem fine.
> The RST/ and BSL (p0.14) are find and the DBG jumper is wired in.
> The software was generated with the Rowley crossarm.
>
> If I start it on the jtag and then pull the jtag plug, it keeps
> running fine.
>
> Also there is another lpc2148 on the board using the same power and
> RST/ signal and it works fine.Its program was generated on an IAR
> compiler and has its own jtag connector.
>
> Anyone got any idea of where to start looking?
>
>I have this project that uses a lpc2148 (similar to Kickstart board).
>It runs a huge program on the jtag fine and used to run when the jtag
>was disconnected. It now doesn't start up correctly when the jtag
>isn't present. It never gets to my first instruction correctly.

>All of the signals on the jtag connector seem fine.
>The RST/ and BSL (p0.14) are find and the DBG jumper is wired in.
>The software was generated with the Rowley crossarm.

>If I start it on the jtag and then pull the jtag plug, it keeps
>running fine.

>Also there is another lpc2148 on the board using the same power and
>RST/ signal and it works fine.Its program was generated on an IAR
>compiler and has its own jtag connector.

>Anyone got any idea of where to start looking?
Did you compile with STARTUP_FROM_RESET defined in the xstartup.s file?
Regards,
Richard.

+ http://www.FreeRTOS.org
+ http://www.SafeRTOS.com
for Cortex-M3, ARM7, ARM9, HCS12, H8S, MSP430
Microblaze, Coldfire, AVR, x86, 8051, PIC24 & dsPIC
.... and soon AVR32
The STARTUP_FROM_RESET and the debug_printf was the problem. I always
hoped that the Rowley compiler would take those debug_printf
statements out when I switched from Flash_Debug to Flash_Release. When
I saw those big savings in code size I felt it was a safe assumption.
I guess now I need to figure out a way to inactivate those (there were
around 50 of them).

Anyway, thank you everybody.

--- In l..., "Darcy Williams" wrote:
> This one is better...
> http://ccgi.rowley.co.uk/support/faq.php?do=article&articleid5
> --- In l..., "mayotte_d" wrote:
> >
> > I have this project that uses a lpc2148 (similar to Kickstart board).
> > It runs a huge program on the jtag fine and used to run when the jtag
> > was disconnected. It now doesn't start up correctly when the jtag
> > isn't present. It never gets to my first instruction correctly.
> >
> > All of the signals on the jtag connector seem fine.
> > The RST/ and BSL (p0.14) are find and the DBG jumper is wired in.
> > The software was generated with the Rowley crossarm.
> >
> > If I start it on the jtag and then pull the jtag plug, it keeps
> > running fine.
> >
> > Also there is another lpc2148 on the board using the same power and
> > RST/ signal and it works fine.Its program was generated on an IAR
> > compiler and has its own jtag connector.
> >
> > Anyone got any idea of where to start looking?
>
There are definitely better ways to do this, but this one is nice and
simple... primarily, it should achieve what you're trying to do. You
could just as easily use debug_putchar for the "\n". I just threw it in
there as I got annoyed at having to add newlines to all of my traces.

ERROR() will print out the file name, line of code, and function in
which this statement is called. I couldn't get "assert()" to work so I
use this instead.

To use them...
TRACE("Hello World");
or
ERROR("Hello World");
Define "__DEBUG" in your debug project properties
void debug_printTraceInfo( const char *file, uint32_t line, const char
*func );

#ifdef __DEBUG

#define ERROR(...) do{ debug_printTraceInfo(__FILE__,
__LINE__,__func__); debug_printf(__VA_ARGS__);
debug_printf("\n");}while(0)

#define TRACE(...) do{ debug_printf(__VA_ARGS__);
debug_printf("\n");}while(0)

#else
#define TRACE(...)
#define ERROR(...)
#endif

--- In l..., "mayotte_d" wrote:
>
> The STARTUP_FROM_RESET and the debug_printf was the problem. I always
> hoped that the Rowley compiler would take those debug_printf
> statements out when I switched from Flash_Debug to Flash_Release. When
> I saw those big savings in code size I felt it was a safe assumption.
> I guess now I need to figure out a way to inactivate those (there were
> around 50 of them).
>
> Anyway, thank you everybody.
> --- In l..., "Darcy Williams" darcyw@ wrote:
> >
> >
> > This one is better...
> > http://ccgi.rowley.co.uk/support/faq.php?do=article&articleid5
> >
> >
> > --- In l..., "mayotte_d" wrote:
> > >
> > > I have this project that uses a lpc2148 (similar to Kickstart
board).
> > > It runs a huge program on the jtag fine and used to run when the
jtag
> > > was disconnected. It now doesn't start up correctly when the jtag
> > > isn't present. It never gets to my first instruction correctly.
> > >
> > > All of the signals on the jtag connector seem fine.
> > > The RST/ and BSL (p0.14) are find and the DBG jumper is wired in.
> > > The software was generated with the Rowley crossarm.
> > >
> > > If I start it on the jtag and then pull the jtag plug, it keeps
> > > running fine.
> > >
> > > Also there is another lpc2148 on the board using the same power
and
> > > RST/ signal and it works fine.Its program was generated on an IAR
> > > compiler and has its own jtag connector.
> > >
> > > Anyone got any idea of where to start looking?
> > >
>
Either macroize your calls to debug_printf or use #ifdef around each call.

#ifndef NDEBUG
debug_printf("This is debug-mode only");
#endif

-- Paul.

> -----Original Message-----
> From: l... [mailto:l...] On
> Behalf Of mayotte_d
> Sent: 22 February 2007 22:26
> To: l...
> Subject: [lpc2000] Re: LPC2148 power up problem on Rowley
>
> The STARTUP_FROM_RESET and the debug_printf was the problem. I always
> hoped that the Rowley compiler would take those debug_printf
> statements out when I switched from Flash_Debug to Flash_Release. When
> I saw those big savings in code size I felt it was a safe assumption.
> I guess now I need to figure out a way to inactivate those (there were
> around 50 of them).
>
> Anyway, thank you everybody.
> --- In l..., "Darcy Williams" wrote:
> >
> >
> > This one is better...
> > http://ccgi.rowley.co.uk/support/faq.php?do=article&articleid5
> >
> >
> > --- In l..., "mayotte_d" wrote:
> > >
> > > I have this project that uses a lpc2148 (similar to Kickstart
> board).
> > > It runs a huge program on the jtag fine and used to run when the
> jtag
> > > was disconnected. It now doesn't start up correctly when the jtag
> > > isn't present. It never gets to my first instruction correctly.
> > >
> > > All of the signals on the jtag connector seem fine.
> > > The RST/ and BSL (p0.14) are find and the DBG jumper is wired in.
> > > The software was generated with the Rowley crossarm.
> > >
> > > If I start it on the jtag and then pull the jtag plug, it keeps
> > > running fine.
> > >
> > > Also there is another lpc2148 on the board using the same power and
> > > RST/ signal and it works fine.Its program was generated on an IAR
> > > compiler and has its own jtag connector.
> > >
> > > Anyone got any idea of where to start looking?
> > >
> >
> Yahoo! Groups - Join or create groups, clubs, forums & communities.
> Links