X-NUCLEO-NFC01A1 I2C Timeout problem
Hello, i have a strange problem with x-nucelo-nfc01a1 shield.
I get an i2c timeout but under different conditions it occurs in different places in code.
My setup is nucelo board with stm32L073RZ and X-NUCLEO-NFC01A1 shield, and to communicate with M24SR module i am using xcube libraries, which i downloaded from st.com site.
Case 1.
I2C is configured to 100kHz.
I2C timeout occurs during initialization phase. From my observations it looks like the transmission holds during sending verify command (M24SR_Verify()).
The I2C_WaitOnTXISFlagUntilTimeout() function in HAL_I2C_Master_Transmit() returns I2C_TIMEOUT and it is always in the half of transmission.
The verify command is 24 bytes length, and when timeout occurs hi2c.Instance.XferCount is equal to 12.
So in result i cannot even initialize the module.
Case 2.
I2C is configured to 400kHz or 1000kHz.
Initialization phase passes with success. I can even write and read an URL using TT4_WriteURI() / TT4_ReadURI().
But when i try to write for example vcard or sms, i2c timeout occurs again.
I have no idea whan can cause this. From smartphone i can write and read any type of record.
PS. I've one additional question.
Shouldn't be in lib_NDEF.c in function NDEF_ParseSP() in line 328
if( NDEF_IdentifySPRecord ( pSPRecordStruct, pPayload ) == SUCCESS)instead of
if( NDEF_IdentifySPRecord ( pSPRecordStruct, pPayload ))as the SUCCESS code is 0?
Thanks,
mf
