cancel
Showing results for 
Search instead for 
Did you mean: 

Communication with M24SR over I2C

igorlunev89
Associate
Posted on January 22, 2016 at 10:18

Hi everyone, i try to connect M24SR chip with my MarS Board i.MX6 

I didn't try to configure my inputs and outputs, just try to use it with command, that already exists in Linux.  For example with ''write()'' and ''read()'' like a work with normal files. 

I have problem with communication, all commands i sent - gave no result. Only one command i can sent and see it over my Osziloskop - 1) Slave adress select, it's 0x2d for my chip.

2) 0x26 - to open the Session.

After that i try to build a block command to select NFC-T4

AC 02 00 A4 04 00 07 D2 76 00 00 85 01 01 00 CRC CRC 

After that i get write error -1

Is it actually possible to send command with ''write/read'' functions?

Adress of my M24SR chip with

i2c-detect -y 0  -- 0x2D 

Thanks!
1 ACCEPTED SOLUTION

Accepted Solutions
JP Miller
Senior
Posted on February 02, 2016 at 04:33

Hello,

It is possible that the address you are reporting (0x56) corresponds in fact to the M24SR address: 0x56 shifted by 1 bit on the left is in fact 0xAC. That would take into account the R/W LSB.

May I suggest you retry your testing with 0x56 as the device address (instead of 0x2D as done earlier)?

Have a good day,

Best Regards

View solution in original post

3 REPLIES 3
JP Miller
Senior
Posted on January 25, 2016 at 17:22

Hello,

The I2C M24SR device address is fixed to 0xAC for write, and 0xAD for read. It is strange that i2c-detect returns 0x2D. It should be 0xAD. It might explain why the session is not opened, and no further access is performed.

Would it be possible to open the I2C session with 0xAD instead?  Alternatively could you please check the wired connections on SDA/SCL up to M24SR. Please let me know what the results are.

Hoping this will help you.

Have a good day.

Best Regards,

igorlunev89
Associate
Posted on January 26, 2016 at 18:39

Hello NFC Support, 

thank you for your quick answer. 

I've tried to change my adress ro 0xAC or 0xAD --- no result. 

I've tried to use my board with Arduino and i get this.

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Scanning...

I2C device found at address 0x2D  !

I2C device found at address 0x56  !

done

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

I've tried it with 3 M24SR chips - the result is the same.

I don't know, what i do wrong ))

Thanks.

JP Miller
Senior
Posted on February 02, 2016 at 04:33

Hello,

It is possible that the address you are reporting (0x56) corresponds in fact to the M24SR address: 0x56 shifted by 1 bit on the left is in fact 0xAC. That would take into account the R/W LSB.

May I suggest you retry your testing with 0x56 as the device address (instead of 0x2D as done earlier)?

Have a good day,

Best Regards