cancel
Showing results for 
Search instead for 
Did you mean: 

LL driver for reading register of ST25DV64KC

Danny0007
Senior

Hi community,

since I cannot find a suitable LL-driver for reading register with 16bits address, here is my experiment.

the nfc tag init function:

 

Danny0007_3-1707670881254.png

the ReadID funciton is called, in background is GetICREF function.

Danny0007_1-1707670564641.png

in low level the BSP_I2C2_Read16 function is called:

Danny0007_0-1707670333905.png

console output:

Danny0007_4-1707670999633.png

but the logic analyser only captures these values:

Danny0007_5-1707671112725.png

*******************************************************************************************************************

my questions:
1. is my BSP_I2C2_Read16 funciton ok?

2. the device address is 0xae, where does the value 0x57 come from?

3. the register address is 0x0017, why is only the LSB 0x17 captured?

Any other suggestions are willcome! thanks a lot.

 

 



 

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

That's the first part of the transaction. A write of 0x17 to 0x57. On the bus, this shows up as 0x57 << 1 (i.e. 0xAE) and 0x17, which is what you see.

0x57 is the 7-bit address, 0xAE is the 8-bit address (7 bit address with the R/W bit appended).

 

Not enough info to determine why the memory address is 8 bits instead of 16. Presumably the nBuffSize parameter specified it as 8 bits.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Guru

That's the first part of the transaction. A write of 0x17 to 0x57. On the bus, this shows up as 0x57 << 1 (i.e. 0xAE) and 0x17, which is what you see.

0x57 is the 7-bit address, 0xAE is the 8-bit address (7 bit address with the R/W bit appended).

 

Not enough info to determine why the memory address is 8 bits instead of 16. Presumably the nBuffSize parameter specified it as 8 bits.

If you feel a post has answered your question, please click "Accept as Solution".
Danny0007
Senior

Hi @TDK 

thanks a lot. It works now.

Here is my read process, share it for someone who maybe also need it:)

Danny0007_1-1707774951998.png