Hi @NewOne ,
Here is a simple example to write a simple Text NDEF message and read it after.
/* Init ST25DV driver */
while( NFC04A1_NFCTAG_Init(0) != NFCTAG_OK );
/* Reset Mailbox enable to allow write to EEPROM */
NFC04A1_NFCTAG_ResetMBEN_Dyn(0);
NfcTag_SelectProtocol(NFCTAG_TYPE5);
/* Check NDEF presence, if no init mem in Tag Type 5 */
if( NfcType5_NDEFDetection( ) != NDEF_OK )
{
/* If CCFile is not present add it to memory */
CCFileStruct.MagicNumber = NFCT5_MAGICNUMBER_E1_CCFILE;
CCFileStruct.Version = NFCT5_VERSION_V1_0;
CCFileStruct.MemorySize = ( ST25DV_MAX_SIZE / 8 ) & 0xFF; // ST25DV_MAX_SIZE = 0x200 => 4Kb memory
CCFileStruct.TT5Tag = 0x01;
/* Init of the Type Tag 5 component */
while( NfcType5_TT5Init( ) != NFCTAG_OK );
}
/* write text message to EEPROM */
while( NDEF_WriteText( "NDEF Text message" ) != NDEF_OK );
NDEF_Text_info_t Text;
sRecordInfo_t record;
uint8_t p_ndef_buffer[64];
/* read NDEF file */
NDEF_ReadNDEF(p_ndef_buffer);
/* Extract record info */
NDEF_IdentifyBuffer(&record,p_ndef_buffer);
/* Read Text in record */
NDEF_ReadText( &record, &Text );
Hope this could help you.
Regards.