ST25DV04k password present - i2c incomplete transfer
Hello,
I am working with ST25DV04k nfc tag and i have problem with password present routine.
Generally i tested this module on nucleo board with STs library and it works well. Now i am trying to use this module with RSL10 SoC. I can read data from registers, so i2c communication works.
My problem occurs when i try to present password to the module.
First i send module address and pswd register address, then 8 bytes of password + validation code = 0x09 + 8 bytes of password.
Here is the code:
void st25dv_i2c_pswd_present(void){
uint8_t pswd_present_data[17] = { 0 };
pswd_present_data[8] = 0x09; // validation code
uint16_t reg_addr = 0x0009;
uint32_t module_addr = 0xae >> 1;
i2c->MasterTransmit(module_addr, (uint8_t*)(®_addr), 2, true);
while(!tx_cmplt);
tx_cmplt = false;
PRINTF("Data Transferred: %d\n\r", i2c->GetDataCount());
i2c->MasterTransmit(module_addr, pswd_present_data, 17, false);
while(!tx_cmplt);
tx_cmplt = false;
PRINTF("Data Transferred: %d\n\r", i2c->GetDataCount());
PRINTF("PASSWORD PRESENT DONE\n\r");
}What i had noticed is that, when i am transmitting pswd data only three bytes are transferred. I belive that receiver does not ack received byte, but have no idea why.
I am using CMSIS library to handle i2c.
If you have any ideas what can cause this behaviour, i will be grateful if you share them with me =)
Best regards,
mf
