Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

I2C and bootloader control on the same pin

I2C and bootloader control on the same pin

2005-04-20 by peterssonmikael

On the LPC2138, P0.14 is both SDA1 and bootloader control pin. So if I 
am using the second I2C-channel in a multimaster application there 
might a situation where another I2C-unit send a 0 during reset 
(startup) of my unit forcing it into boot mode. Have anyone thought 
about this?

Re: I2C and bootloader control on the same pin

2005-04-20 by wittrockjeff

Hello,

I was also recently considering using the 2nd I2C interface on an 
LPC2138.  I am using the first I2C channel for communication with an 
external device, and wanted to use the second channel for 
communication with an internal EEPROM.  I noticed the same thing... 
with P0.14 shared like this, if a device latches up the SDA line on 
startup (which I have seen some EEPROMS and other I2C devices do 
even as slave devices), the LPC2138 would go into boot mode.

Clearing the slave device SDA line is usually a matter of applying 
some number of clocks, but if the LPC goes into boot mode, that does 
not good of course. 

On my design, I ended up sharing the first I2C channel with the 
internal and external devices.  I don't like doing this either.  If 
the SDA line gets held low by the external device or by an external 
short circuit, I won't be able to talk to the internal EEPROM.  I 
may end up using an I2C buffer between the internal interface, and 
the external device.

I would also like to know if there is something I am missing.  Being 
able to use the 2nd I2C channel would be nice.

Jeff W

--- In lpc2000@yahoogroups.com, "peterssonmikael" 
<mikael.petersson@k...> wrote:
> 
> On the LPC2138, P0.14 is both SDA1 and bootloader control pin. So 
if I 
> am using the second I2C-channel in a multimaster application there 
> might a situation where another I2C-unit send a 0 during reset 
> (startup) of my unit forcing it into boot mode. Have anyone 
thought 
> about this?

Re: [lpc2000] Re: I2C and bootloader control on the same pin

2005-04-21 by Musharraf Hanif

I know this is not an elegent solution, but it is the first thing that came 
to my mind this early in the morning:

You could try an external buffer circuit with enable and disable to connect 
the SDA pin on the controller to the I2C bus devices. To the best of my 
knowledge, all/most of the pins are set as inputs upon a reset. In this 
case, you could use one of these pins with an external pull up / pull down 
to keep the buffer disabled while the processor is restarting. In one of the 
initialization functions run after reset, you could change the mode of the 
pin and put the buffer in an active state.

Regards,

Musharraf Hanif
----- Original Message ----- 
Show quoted textHide quoted text
From: "wittrockjeff" <jwittrock@...>
To: <lpc2000@yahoogroups.com>
Sent: Wednesday, 20 April, 2005 15:59
Subject: [lpc2000] Re: I2C and bootloader control on the same pin


>
>
> Hello,
>
> I was also recently considering using the 2nd I2C interface on an
> LPC2138.  I am using the first I2C channel for communication with an
> external device, and wanted to use the second channel for
> communication with an internal EEPROM.  I noticed the same thing...
> with P0.14 shared like this, if a device latches up the SDA line on
> startup (which I have seen some EEPROMS and other I2C devices do
> even as slave devices), the LPC2138 would go into boot mode.
>
> Clearing the slave device SDA line is usually a matter of applying
> some number of clocks, but if the LPC goes into boot mode, that does
> not good of course.
>
> On my design, I ended up sharing the first I2C channel with the
> internal and external devices.  I don't like doing this either.  If
> the SDA line gets held low by the external device or by an external
> short circuit, I won't be able to talk to the internal EEPROM.  I
> may end up using an I2C buffer between the internal interface, and
> the external device.
>
> I would also like to know if there is something I am missing.  Being
> able to use the 2nd I2C channel would be nice.
>
> Jeff W
>
> --- In lpc2000@yahoogroups.com, "peterssonmikael"
> <mikael.petersson@k...> wrote:
>>
>> On the LPC2138, P0.14 is both SDA1 and bootloader control pin. So
> if I
>> am using the second I2C-channel in a multimaster application there
>> might a situation where another I2C-unit send a 0 during reset
>> (startup) of my unit forcing it into boot mode. Have anyone
> thought
>> about this?
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>

Re: [lpc2000] Re: I2C and bootloader control on the same pin

2005-04-21 by 42Bastian Schick

> I would also like to know if there is something I am missing.  Being
> able to use the 2nd I2C channel would be nice.

Why not put a driver inbetween port and i2c slave enabled by the CS for 
the i2c slave(s) ?

-- 
42Bastian Schick

Re: I2C and bootloader control on the same pin

2005-04-21 by wittrockjeff

Well... thats kind of what I was talking about when I mentioned 
putting the buffer in between my external device and the first I2C 
channel.  I guess I was wondering if I am missing anything in terms 
of using the second I2C channel without having to use some kind of 
glue logic or buffers (yeah.. I guess I'm lazy).

Also, just wondering about the logic in sharing the boot loader pin 
with the I2C SDA.  I know there is a limited number of pins, but 
this seems to be a pretty bad pin to try and share.

Thanks,
Jeff W


--- In lpc2000@yahoogroups.com, 42Bastian Schick <bastian42@m...> 
wrote:
> 
> > I would also like to know if there is something I am missing.  
Being
> > able to use the 2nd I2C channel would be nice.
> 
> Why not put a driver inbetween port and i2c slave enabled by the 
CS for 
Show quoted textHide quoted text
> the i2c slave(s) ?
> 
> -- 
> 42Bastian Schick

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.