cancel
Showing results for 
Search instead for 
Did you mean: 

Conflict with two EEPROM

jonathannakache9
Associate II
Posted on July 06, 2012 at 10:02

Hi,

With a STM32, I have a problem

to select

either

EEPROM

(

M24LR64-R and M24M02-DR)

on the same bus

I2C

.

Here are the

''device

select

code

'':

For

M24LR64

-R:  1 0 1 0     X 1  1 X

In the order

:  1 0 1 0 = Device type identifier   X = E2   1 1 = E1 E0 ( chip enable)   X = RW

For

M24M02

-DR:

1 0 1

0   1

X

X

X

In the order

: 1 0 1 0 = Device type identifier   1 = E2 ( chip enable)   X X = A17 A16 (MSB address bits )    X = RW

The two

address bits

A17

and

A16

for

M24M02

-DR

can not be

used

because they would

pose

a conflict with the

R

-

M24LR64

there is

there a way

around the problem

?

Thank you for your

response

,

#pounds-head-on-desk
27 REPLIES 27
emalund
Associate III
Posted on July 10, 2012 at 15:10

another option

NXP has I²C 'splitters'

Erik
jonathannakache9
Associate II
Posted on July 10, 2012 at 17:24

in fact

,

my problem

is not from

here

:

even by disconnecting

the EEPROM

  M24LR64 , I

still can

'

t access the

address

bit

A17 on the M24M02

however A16

is ok...

emalund
Associate III
Posted on July 10, 2012 at 19:26

in fact

,

my problem

is not from

here

:

even by disconnecting

the EEPROM

  M24LR64 , I

still can

'

t access the

address

bit

A17 on the M24M02

has a look at the datasheet, now I totally I do not understand

8192 bytes in I

2

C mode

what does A17 have to do with 8k bytes?

also there are 2 strappable address pins, why the address conflict?

Erik

John F.
Senior
Posted on July 11, 2012 at 10:30

M24M02 Memory array : 2 Mb (

256 KBytes

) of EEPROM

2^18 = 262144 Address lines 0..17 required.

John F.
Senior
Posted on July 11, 2012 at 10:30

M24M02 Memory array : 2 Mb (

256 KBytes

) of EEPROM

2^18 = 262144 Address lines 0..17 required.

jonathannakache9
Associate II
Posted on July 11, 2012 at 14:21

So

my problem

is I can

use bit

A16

but

i can't use

the bit

A17:

i use the STM32 library and after the send:

I2C_Send7bitAddress(I2C1, device_select , I2C_Direction_Transmitter);

the program gets stuck on:

I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED));

only

with the address bit

A17

=

1

John F.
Senior
Posted on July 11, 2012 at 14:54

Your problem does not make sense. Are you sure you are addressing an M24M02 device? The A17 bit is simply part of the intrinsic operation of the device. (Also note it is not recommended to drive the hardware input pin E2 dynamically - is it hardwired high or low?)

jonathannakache9
Associate II
Posted on July 11, 2012 at 15:28

E2 is hardwired high

but A17 bit and A16 bit are selected in the device_selected... when i do:

I2C_Send7bitAddress(I2C1, device_select , I2C_Direction_Transmitter);

when device select is set: 1010 1000 and 1010 1010 are ok

 but 1010 1100 or 1010 1110 aren't ok...

emalund
Associate III
Posted on July 11, 2012 at 15:44

but A17 bit and A16 bit are selected in the device_selected

 

so you have 4 devices on the bus? if not the above makes no sense

Erik
jonathannakache9
Associate II
Posted on July 11, 2012 at 16:22

I have

just

two

EEPROM...

 

A17

and

A16

are

sent

during 

the

device

_select code

but

are used to

select

a

memory location

in EEPROM

because

the M24M02 EEPROM

may contain

2M bit