Skip to main content
Explorer II
February 11, 2024
Solved

LL driver for reading register of ST25DV64KC

  • February 11, 2024
  • 2 replies
  • 1272 views

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 topic has been closed for replies.
    Best answer by TDK

    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.

    2 replies

    TDKAnswer
    Super User
    February 11, 2024

    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.

    Danny0007Author
    Explorer II
    February 12, 2024

    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