How to "reset" Ntag i2c address?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to "reset" Ntag i2c address?

2,805 Views
eljeffo
Contributor III

Ntag2_i2c_address_change_trace.pngHi!

I've somehow managed to change the i2c address of my "Ntag i2c" chip from 0x55 to 0x2A.

I've tried several different writes to the chip and and verified that all ACKs from the slave are provided, but have not been able to get the chip to subsequently slave on 0x55.

Here's some byte array's I've sent to I2c Address 0x2A (Write mode) with the hopes of targeting block 0 byte 0:

uint8_t fix[17] = {0x00, 0x55,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x01,0x02,0x03,0x04};

uint8_t fix[17] = {0x00, 0x55,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00};

uint8_t fix[2] = {0x00, 0x55}

And just in case we get right shifted:

uint8_t fix[17] = {0x00, 0xAA,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x01,0x02,0x03,0x04};

uint8_t fix[17] = {0x00, 0xAA,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00};

uint8_t fix[2] = {0x00, 0xAA}

Of course, I've also tried just for fun to reset to a totally different address 

uint8_t fix[17] = {0x00, 0x0F,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x01,0x02,0x03,0x04};

uint8_t fix[17] = {0x00, 0x0F,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00};

uint8_t fix[2] = {0x00, 0x0F}

But none of the above seem to work.

Nothing else is on the i2c bus.

I've confirmed all static lock bytes and dynamic lock bytes are 0

Can you think of anything else I should consider?

Thanks!

Labels (1)
0 Kudos
Reply
4 Replies

1,925 Views
d_schoenfisch
Contributor I

I had the same problem.
Briefly about the origin:
If the first block(0x00) is set with the first byte as 0x55, then the I2C address becomes 0x2A (0x55 bitshift 1 to the right).
When searching for I2C devices on the bus, the NTAG does not respond with an ACK if only a read is sent without sending a prior write pointer!

So, if you search for the NTAG on the bus, you need to loop through all I2C addresses and trying to write on it. This is the only way the NTAG confirms with an ACK. 


If you want to reset the NTAG to 0x55, you have to write 0xAA on Byte 0 of Block 0.

The entire block must be written! Otherwise it will not work.

0 Kudos
Reply

2,127 Views
GeV
Contributor I

Same situation here. I accidentally changed the I2C address to 0x00. I can access the tag, and send the write 0x00 to 0x55. The devices answers with ACK... but then the address is still 0x00.

0 Kudos
Reply

2,127 Views
eljeffo
Contributor III

By any chance, is the i2c address only settable once?

0 Kudos
Reply

2,127 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hi Jeff Chan,

The I2C address can be changed many times, not just once. I cannot say from your log if you do so, but you have to wait for approx 4 ms after sending the WRITE command for the EEPROM programming cycle to complete, before trying to reach the NTAG I2C with the new slave address.

Regards!

Jorge Gonzalez

0 Kudos
Reply