[ST25DV] Restore RFSwitchOn (RF disabled)
Hello everyone,
before introducing you to the issue I am experiencing, let me share my setup:
- uC: STM32U585
- I2C: Fast Mode Plus
- Ide: STM32CubeIde
- Power Source: 3.6VDC (laboratory power supply)
- st25dvxxkc package: GitHub st25dvxxkc
- RF Reader: ST25 App (Google Play Store)
- Before sending any I2C command to protected area an I2C security session is opened with ST25DVxxKC_PresentI2CPassword() function;
My RF Interface is NOT working anymore after sending ST25DVxxKC_SetI2CCFG_RFSWITCHOFF(&(pObj->Ctx), ®_value) I2C command. I'm trying to restore it but until now I have not succeed. In order to restore it I've tried to apply some I2C command such ST25DVxxKC_ResetRFOff_Dyn() from st25dvxxkc package I pasted beforehand, but it's not working since it writes NULL data:
ret = pObj->IO.Write((pObj->IO.DeviceAddress | ST25DVXXKC_ADDR_RFSWITCH_BIT_I2C) & ~ST25DVXXKC_ADDR_MODE_BIT_I2C, ST25DVXXKC_ICREF_REG, NULL, 0);which is of course denied from HAL_I2C_Mem_Write() function. I've read the following thread but I have still not found anything helpful: Solved: ST25DV64KC RF SWITCH ON/OFF - STMicroelectronics Community
Therefore, I made some changes in source code, as it follows (i have commented the beforehand expression and added ST25DVxxKC_SetRF_MNGT_DYN_RFOFF function):

but it's not working either; in that case HAL_I2C_Mem_Write() works fine, but when I read the register value it does not change its value (RF_MNGT_DYN is equal to 0). According to ST25DV datasheet RF should be enabled but actually it isn't.
