Hi Folks,
I've got a problem with an LPC2106 uC at the moment that I'm really
struggling with.
When I power up the board (or press the reset button) I get a stream of mostly
garbage from TXD0 lasting several seconds then it goes silent. Sending a
'?' to RXD0 sometimes yields more garbage back, but mostly does
nothing. After this stream of data the line doesn't always return to idling
high (as you'd expect for a serial line) - sometimes it ends up low (but
mostly high).
Amongst the garbage received I often see the string 'Synchronised' and
sometimes see 'Synchronised OK', or very occasionally
'Synchronised OK RESEND'. I see this at several different baud rates
(4800, 9600 and 115200), so from this I can conclude the garbage is probably
'Synchronised' being sent at other baud rates.
This stream of activity from TXD0 occurs whether I send anything to the device
or not - just to reassure myself I even tied RXD0 to 3V3 with a bit of wire and
the same thing still happens.
To set the scene: The system the uC is in is nothing out of the ordinary -
it's a 160x100mm board with several voltage regulators (1V8 linear, 3V3
linear and 5V SM), a few I2C devices, an SPI device and a simple RC reset
circuit (with button). The crystal is 14.74Mhz with 18pF load caps. The uC is an
NXP LPC2106F/01, supplied by Farnell. The uC is unprogrammed. I have a jumper on
P0.14 to connect it to 0V (with a 10k pull to 3V3). The TTL to RS232 is done
with a MAX3232, and the P0.14, RXD0 and TXD0 aren't used for any other
purpose. I had 5 PCBs made at the same time and all 5 show this problem (this is
the first prototype batch, so the design is un-proven).
Tests I've tried:
1. I've check the oscilator is running correctly
2. I've checked the 3V3 and 1V8 supplies to the IC. All are at the correct
voltage and appear very clean.
3. I've checked the reset pulse. Apart from being fairly wide (300ms)
it's very clean and rises to the full 3V3.
4. I've monitored TXD0 with a scope (but without a PC attached) and the uC
still sends data out upon reset.
5. I've double / tripple checked the pinouts against the PCB layout and all
appears okay.
6. I've removed the 14.74Mhz crystal and injected a 1Mhz clock in - the
same thing happens except slower.
7. I've tried connecting RXD0 to 3V3 (and later 0V) just to prove to myself
it isn't cross-talk / noise on the RXD0 line triggering the responses
From what I've read the LPC210x shouldn't transmit anything upon
entering the ISP bootloader, it should wait until a ? is received on RXD0 then
return with the string Synchronised. It then expects the string Synchronised to
be repeated back to it before further communication can take place.
The fact that I often see the string 'Synchronised' and even
occasionally 'Synchronised OK RESEND' at various baud rates suggests
to me it is somehow picking up noise on RXD0, but I don't understand how
this could still happen when I connect RXD0 to 3V3 or 0V (I've even
verified the line is silent with a scope). The fact I see 'OK'
suggests that it managed to echo the 'Synchronised' string back to
itself (cross talk?)....
The fact that after the string of garbage is sent the TXD0 line sometimes ends
up idling low instead of high suggests some form of serious hardware malfunction
- the internal UART should never allow this to happen, so either the uC has
executed some code to put the pins back into GPIO mode or something has really
locked up inside. Perhaps this points to issues with my reset circuit? It's
a simple 10k / 4.7uF RC circuit and looking on a scope it does what it's
supposed to.
Anyhow, does anybody have any ideas? I'm getting quite desperate now -
I've used the LPC2106 on several previous projects with no problems, this
one has really baffled me!
Any thoughts are really much appreciated!
Strange LPC2106 ISP / General booting issue
Started by ●September 23, 2011
Reply by ●September 23, 20112011-09-23
It could be the size of the reset capacitor. I would have a tendency to use
Olimex's design:
http://olimex.com/dev/pdf/lpc-p2106.pdf
It uses 10k and 0.1 ufd...
Actually, I might even consider a power supervisor chip to generate the reset signal.
Richard
--- In l..., "Martin" wrote:
>
> Hi Folks,
>
> I've got a problem with an LPC2106 uC at the moment that I'm really struggling with.
>
> When I power up the board (or press the reset button) I get a stream of mostly garbage from TXD0 lasting several seconds then it goes silent. Sending a '?' to RXD0 sometimes yields more garbage back, but mostly does nothing. After this stream of data the line doesn't always return to idling high (as you'd expect for a serial line) - sometimes it ends up low (but mostly high).
>
> Amongst the garbage received I often see the string 'Synchronised' and sometimes see 'Synchronised OK', or very occasionally 'Synchronised OK RESEND'. I see this at several different baud rates (4800, 9600 and 115200), so from this I can conclude the garbage is probably 'Synchronised' being sent at other baud rates.
>
> This stream of activity from TXD0 occurs whether I send anything to the device or not - just to reassure myself I even tied RXD0 to 3V3 with a bit of wire and the same thing still happens.
>
> To set the scene: The system the uC is in is nothing out of the ordinary - it's a 160x100mm board with several voltage regulators (1V8 linear, 3V3 linear and 5V SM), a few I2C devices, an SPI device and a simple RC reset circuit (with button). The crystal is 14.74Mhz with 18pF load caps. The uC is an NXP LPC2106F/01, supplied by Farnell. The uC is unprogrammed. I have a jumper on P0.14 to connect it to 0V (with a 10k pull to 3V3). The TTL to RS232 is done with a MAX3232, and the P0.14, RXD0 and TXD0 aren't used for any other purpose. I had 5 PCBs made at the same time and all 5 show this problem (this is the first prototype batch, so the design is un-proven).
>
> Tests I've tried:
>
> 1. I've check the oscilator is running correctly
> 2. I've checked the 3V3 and 1V8 supplies to the IC. All are at the correct voltage and appear very clean.
> 3. I've checked the reset pulse. Apart from being fairly wide (300ms) it's very clean and rises to the full 3V3.
> 4. I've monitored TXD0 with a scope (but without a PC attached) and the uC still sends data out upon reset.
> 5. I've double / tripple checked the pinouts against the PCB layout and all appears okay.
> 6. I've removed the 14.74Mhz crystal and injected a 1Mhz clock in - the same thing happens except slower.
> 7. I've tried connecting RXD0 to 3V3 (and later 0V) just to prove to myself it isn't cross-talk / noise on the RXD0 line triggering the responses
>
> From what I've read the LPC210x shouldn't transmit anything upon entering the ISP bootloader, it should wait until a ? is received on RXD0 then return with the string Synchronised. It then expects the string Synchronised to be repeated back to it before further communication can take place.
>
> The fact that I often see the string 'Synchronised' and even occasionally 'Synchronised OK RESEND' at various baud rates suggests to me it is somehow picking up noise on RXD0, but I don't understand how this could still happen when I connect RXD0 to 3V3 or 0V (I've even verified the line is silent with a scope). The fact I see 'OK' suggests that it managed to echo the 'Synchronised' string back to itself (cross talk?)....
>
> The fact that after the string of garbage is sent the TXD0 line sometimes ends up idling low instead of high suggests some form of serious hardware malfunction - the internal UART should never allow this to happen, so either the uC has executed some code to put the pins back into GPIO mode or something has really locked up inside. Perhaps this points to issues with my reset circuit? It's a simple 10k / 4.7uF RC circuit and looking on a scope it does what it's supposed to.
>
> Anyhow, does anybody have any ideas? I'm getting quite desperate now - I've used the LPC2106 on several previous projects with no problems, this one has really baffled me!
>
> Any thoughts are really much appreciated!
>
http://olimex.com/dev/pdf/lpc-p2106.pdf
It uses 10k and 0.1 ufd...
Actually, I might even consider a power supervisor chip to generate the reset signal.
Richard
--- In l..., "Martin" wrote:
>
> Hi Folks,
>
> I've got a problem with an LPC2106 uC at the moment that I'm really struggling with.
>
> When I power up the board (or press the reset button) I get a stream of mostly garbage from TXD0 lasting several seconds then it goes silent. Sending a '?' to RXD0 sometimes yields more garbage back, but mostly does nothing. After this stream of data the line doesn't always return to idling high (as you'd expect for a serial line) - sometimes it ends up low (but mostly high).
>
> Amongst the garbage received I often see the string 'Synchronised' and sometimes see 'Synchronised OK', or very occasionally 'Synchronised OK RESEND'. I see this at several different baud rates (4800, 9600 and 115200), so from this I can conclude the garbage is probably 'Synchronised' being sent at other baud rates.
>
> This stream of activity from TXD0 occurs whether I send anything to the device or not - just to reassure myself I even tied RXD0 to 3V3 with a bit of wire and the same thing still happens.
>
> To set the scene: The system the uC is in is nothing out of the ordinary - it's a 160x100mm board with several voltage regulators (1V8 linear, 3V3 linear and 5V SM), a few I2C devices, an SPI device and a simple RC reset circuit (with button). The crystal is 14.74Mhz with 18pF load caps. The uC is an NXP LPC2106F/01, supplied by Farnell. The uC is unprogrammed. I have a jumper on P0.14 to connect it to 0V (with a 10k pull to 3V3). The TTL to RS232 is done with a MAX3232, and the P0.14, RXD0 and TXD0 aren't used for any other purpose. I had 5 PCBs made at the same time and all 5 show this problem (this is the first prototype batch, so the design is un-proven).
>
> Tests I've tried:
>
> 1. I've check the oscilator is running correctly
> 2. I've checked the 3V3 and 1V8 supplies to the IC. All are at the correct voltage and appear very clean.
> 3. I've checked the reset pulse. Apart from being fairly wide (300ms) it's very clean and rises to the full 3V3.
> 4. I've monitored TXD0 with a scope (but without a PC attached) and the uC still sends data out upon reset.
> 5. I've double / tripple checked the pinouts against the PCB layout and all appears okay.
> 6. I've removed the 14.74Mhz crystal and injected a 1Mhz clock in - the same thing happens except slower.
> 7. I've tried connecting RXD0 to 3V3 (and later 0V) just to prove to myself it isn't cross-talk / noise on the RXD0 line triggering the responses
>
> From what I've read the LPC210x shouldn't transmit anything upon entering the ISP bootloader, it should wait until a ? is received on RXD0 then return with the string Synchronised. It then expects the string Synchronised to be repeated back to it before further communication can take place.
>
> The fact that I often see the string 'Synchronised' and even occasionally 'Synchronised OK RESEND' at various baud rates suggests to me it is somehow picking up noise on RXD0, but I don't understand how this could still happen when I connect RXD0 to 3V3 or 0V (I've even verified the line is silent with a scope). The fact I see 'OK' suggests that it managed to echo the 'Synchronised' string back to itself (cross talk?)....
>
> The fact that after the string of garbage is sent the TXD0 line sometimes ends up idling low instead of high suggests some form of serious hardware malfunction - the internal UART should never allow this to happen, so either the uC has executed some code to put the pins back into GPIO mode or something has really locked up inside. Perhaps this points to issues with my reset circuit? It's a simple 10k / 4.7uF RC circuit and looking on a scope it does what it's supposed to.
>
> Anyhow, does anybody have any ideas? I'm getting quite desperate now - I've used the LPC2106 on several previous projects with no problems, this one has really baffled me!
>
> Any thoughts are really much appreciated!
>
Reply by ●September 23, 20112011-09-23
I got to the bottom of it in the end... it was actually a power supply issue.
The de-coupling around the main 5V switchmode regulator was badly laid out (it was too far away from the regulator). I hadn't previously seen it as my 40 year old 10Mhz scope wasn't really showing me the spikes generated as it switched (the pulses were really very narrow).
So for me several obvious lessons learnt:
1. Don't always trust what you see on a 'scope, even an old analog one!
2. Pay more attention to PCB layout, especially around SM regulators.
3. Don't go looking for unlikely / complicated problems (like unstable clocks, reset pulses too long, noise on serial lines) before you have really ruled out the obvious (like the supply!).
It's all textbook stuff really!
--- In l..., "rtstofer" wrote:
>
> It could be the size of the reset capacitor. I would have a tendency to use Olimex's design:
> http://olimex.com/dev/pdf/lpc-p2106.pdf
>
> It uses 10k and 0.1 ufd...
>
> Actually, I might even consider a power supervisor chip to generate the reset signal.
>
> Richard
> --- In l..., "Martin" wrote:
> >
> > Hi Folks,
> >
> > I've got a problem with an LPC2106 uC at the moment that I'm really struggling with.
> >
> > When I power up the board (or press the reset button) I get a stream of mostly garbage from TXD0 lasting several seconds then it goes silent. Sending a '?' to RXD0 sometimes yields more garbage back, but mostly does nothing. After this stream of data the line doesn't always return to idling high (as you'd expect for a serial line) - sometimes it ends up low (but mostly high).
> >
> > Amongst the garbage received I often see the string 'Synchronised' and sometimes see 'Synchronised OK', or very occasionally 'Synchronised OK RESEND'. I see this at several different baud rates (4800, 9600 and 115200), so from this I can conclude the garbage is probably 'Synchronised' being sent at other baud rates.
> >
> > This stream of activity from TXD0 occurs whether I send anything to the device or not - just to reassure myself I even tied RXD0 to 3V3 with a bit of wire and the same thing still happens.
> >
> > To set the scene: The system the uC is in is nothing out of the ordinary - it's a 160x100mm board with several voltage regulators (1V8 linear, 3V3 linear and 5V SM), a few I2C devices, an SPI device and a simple RC reset circuit (with button). The crystal is 14.74Mhz with 18pF load caps. The uC is an NXP LPC2106F/01, supplied by Farnell. The uC is unprogrammed. I have a jumper on P0.14 to connect it to 0V (with a 10k pull to 3V3). The TTL to RS232 is done with a MAX3232, and the P0.14, RXD0 and TXD0 aren't used for any other purpose. I had 5 PCBs made at the same time and all 5 show this problem (this is the first prototype batch, so the design is un-proven).
> >
> > Tests I've tried:
> >
> > 1. I've check the oscilator is running correctly
> > 2. I've checked the 3V3 and 1V8 supplies to the IC. All are at the correct voltage and appear very clean.
> > 3. I've checked the reset pulse. Apart from being fairly wide (300ms) it's very clean and rises to the full 3V3.
> > 4. I've monitored TXD0 with a scope (but without a PC attached) and the uC still sends data out upon reset.
> > 5. I've double / tripple checked the pinouts against the PCB layout and all appears okay.
> > 6. I've removed the 14.74Mhz crystal and injected a 1Mhz clock in - the same thing happens except slower.
> > 7. I've tried connecting RXD0 to 3V3 (and later 0V) just to prove to myself it isn't cross-talk / noise on the RXD0 line triggering the responses
> >
> > From what I've read the LPC210x shouldn't transmit anything upon entering the ISP bootloader, it should wait until a ? is received on RXD0 then return with the string Synchronised. It then expects the string Synchronised to be repeated back to it before further communication can take place.
> >
> > The fact that I often see the string 'Synchronised' and even occasionally 'Synchronised OK RESEND' at various baud rates suggests to me it is somehow picking up noise on RXD0, but I don't understand how this could still happen when I connect RXD0 to 3V3 or 0V (I've even verified the line is silent with a scope). The fact I see 'OK' suggests that it managed to echo the 'Synchronised' string back to itself (cross talk?)....
> >
> > The fact that after the string of garbage is sent the TXD0 line sometimes ends up idling low instead of high suggests some form of serious hardware malfunction - the internal UART should never allow this to happen, so either the uC has executed some code to put the pins back into GPIO mode or something has really locked up inside. Perhaps this points to issues with my reset circuit? It's a simple 10k / 4.7uF RC circuit and looking on a scope it does what it's supposed to.
> >
> > Anyhow, does anybody have any ideas? I'm getting quite desperate now - I've used the LPC2106 on several previous projects with no problems, this one has really baffled me!
> >
> > Any thoughts are really much appreciated!
>
The de-coupling around the main 5V switchmode regulator was badly laid out (it was too far away from the regulator). I hadn't previously seen it as my 40 year old 10Mhz scope wasn't really showing me the spikes generated as it switched (the pulses were really very narrow).
So for me several obvious lessons learnt:
1. Don't always trust what you see on a 'scope, even an old analog one!
2. Pay more attention to PCB layout, especially around SM regulators.
3. Don't go looking for unlikely / complicated problems (like unstable clocks, reset pulses too long, noise on serial lines) before you have really ruled out the obvious (like the supply!).
It's all textbook stuff really!
--- In l..., "rtstofer" wrote:
>
> It could be the size of the reset capacitor. I would have a tendency to use Olimex's design:
> http://olimex.com/dev/pdf/lpc-p2106.pdf
>
> It uses 10k and 0.1 ufd...
>
> Actually, I might even consider a power supervisor chip to generate the reset signal.
>
> Richard
> --- In l..., "Martin" wrote:
> >
> > Hi Folks,
> >
> > I've got a problem with an LPC2106 uC at the moment that I'm really struggling with.
> >
> > When I power up the board (or press the reset button) I get a stream of mostly garbage from TXD0 lasting several seconds then it goes silent. Sending a '?' to RXD0 sometimes yields more garbage back, but mostly does nothing. After this stream of data the line doesn't always return to idling high (as you'd expect for a serial line) - sometimes it ends up low (but mostly high).
> >
> > Amongst the garbage received I often see the string 'Synchronised' and sometimes see 'Synchronised OK', or very occasionally 'Synchronised OK RESEND'. I see this at several different baud rates (4800, 9600 and 115200), so from this I can conclude the garbage is probably 'Synchronised' being sent at other baud rates.
> >
> > This stream of activity from TXD0 occurs whether I send anything to the device or not - just to reassure myself I even tied RXD0 to 3V3 with a bit of wire and the same thing still happens.
> >
> > To set the scene: The system the uC is in is nothing out of the ordinary - it's a 160x100mm board with several voltage regulators (1V8 linear, 3V3 linear and 5V SM), a few I2C devices, an SPI device and a simple RC reset circuit (with button). The crystal is 14.74Mhz with 18pF load caps. The uC is an NXP LPC2106F/01, supplied by Farnell. The uC is unprogrammed. I have a jumper on P0.14 to connect it to 0V (with a 10k pull to 3V3). The TTL to RS232 is done with a MAX3232, and the P0.14, RXD0 and TXD0 aren't used for any other purpose. I had 5 PCBs made at the same time and all 5 show this problem (this is the first prototype batch, so the design is un-proven).
> >
> > Tests I've tried:
> >
> > 1. I've check the oscilator is running correctly
> > 2. I've checked the 3V3 and 1V8 supplies to the IC. All are at the correct voltage and appear very clean.
> > 3. I've checked the reset pulse. Apart from being fairly wide (300ms) it's very clean and rises to the full 3V3.
> > 4. I've monitored TXD0 with a scope (but without a PC attached) and the uC still sends data out upon reset.
> > 5. I've double / tripple checked the pinouts against the PCB layout and all appears okay.
> > 6. I've removed the 14.74Mhz crystal and injected a 1Mhz clock in - the same thing happens except slower.
> > 7. I've tried connecting RXD0 to 3V3 (and later 0V) just to prove to myself it isn't cross-talk / noise on the RXD0 line triggering the responses
> >
> > From what I've read the LPC210x shouldn't transmit anything upon entering the ISP bootloader, it should wait until a ? is received on RXD0 then return with the string Synchronised. It then expects the string Synchronised to be repeated back to it before further communication can take place.
> >
> > The fact that I often see the string 'Synchronised' and even occasionally 'Synchronised OK RESEND' at various baud rates suggests to me it is somehow picking up noise on RXD0, but I don't understand how this could still happen when I connect RXD0 to 3V3 or 0V (I've even verified the line is silent with a scope). The fact I see 'OK' suggests that it managed to echo the 'Synchronised' string back to itself (cross talk?)....
> >
> > The fact that after the string of garbage is sent the TXD0 line sometimes ends up idling low instead of high suggests some form of serious hardware malfunction - the internal UART should never allow this to happen, so either the uC has executed some code to put the pins back into GPIO mode or something has really locked up inside. Perhaps this points to issues with my reset circuit? It's a simple 10k / 4.7uF RC circuit and looking on a scope it does what it's supposed to.
> >
> > Anyhow, does anybody have any ideas? I'm getting quite desperate now - I've used the LPC2106 on several previous projects with no problems, this one has really baffled me!
> >
> > Any thoughts are really much appreciated!
>