cancel
Showing results for 
Search instead for 
Did you mean: 

Fast transfer mode mailbox - how many write cycles can it handle?

EGiff
Associate III

I have an application which must send > 100KB/day to an RFID/NFC reader (I'm using the STM25R Disco) - for days and years on end.

Looking at the EEPROM spec, it's good for 600k write cycles at 85 °C

(That means even at 64Kbit EEPROM, wear leveling would be critical for long life.)

The Fast Transfer Mode buffer / mailbox is intriguing (256 Bytes) - it seems perfect for my use case - (mainly polling data) - however I cannot find any information about the type of memory used for this or number of write cycles it supports in the datasheet.

So, what type memory is used for this FTM mailbox? How many write cycles can it handle?

Thank you very much

33 REPLIES 33
johnson jiang
Associate II

Hello evan:

Thanks very much.

I tried your methods, but the distance doesn't increase.

I decide to change the reader from ST25R3911B to ST25R3916.

And ST25R3916 board will be available in the next week.

I get another issue, when the reader first read data from the tag in the mailbox mode, it takes such a long time(about 40 seconds) to get the right data.

Johnson

Hi: if I set gpo to 0xA0 to enable RF_GET_MSG, then i don't get any gpo interrupt. Do you get similar phenomena? Thanks�? At 2019-11-21 17:15:02, "ST Community" wrote: Ok, in SmarTagNFC.c (and .h), you need to add this: //EMG ported from ST25-DISCOVERY NFCTAG_StatusTypeDef InitMailBoxMode( void ) { NFCTAG_StatusTypeDef ret = NFCTAG_OK; //Changing system registers from I2C and RF side both require a password //default password is 00 00 00 00 00 00 00 00 ST25DV_PASSWD passwd; passwd.MsbPasswd = 0; passwd.LsbPasswd = 0; /* Present password to open session */ ret = St25Dv_i2c_ExtDrv.PresentI2CPassword( passwd ); if ( ret != NFCTAG_OK) return ret; //password failed, can't go any further //Configure GPO as RF_ACTIVITY interrupt //Since this is a real-time system, we only want fresh data //so we use RF_ACTIVITY instead of RF_GET_MSG_EN //and accept data loss if sample time is too slow //This exists but is not used by the driver //ST25DV_GPO gpo; //gpo.GPO_Enable = 1; //gpo.GPO_RFActivity_en = 1; //so we use hex uint16_t gpo = 0x82; ret = St25Dv_i2c_Drv.ConfigIT( gpo ); if ( ret != NFCTAG_OK) return ret; //password failed, can't go any further //Should be A0 for RF_GET_MSG_EN /* If not activated, activate Energy Harvesting */ ST25DV_EH_MODE_STATUS EH_mode = ST25DV_EH_ON_DEMAND; St25Dv_i2c_ExtDrv.ReadEHMode( &EH_mode); if( EH_mode != ST25DV_EH_ACTIVE_AFTER_BOOT ) { /* EH_MODE, default: 1 (meaning only energy harvesting upon demand) 0 (ST25DV_EH_ACTIVE_AFTER_BOOT): EH forced after boot 1 (ST25DV_EH_ON_DEMAND): EH on demand only Set EH_MODE TO 0 to always start energy harvesting on boot (when a field is strong enough) "Writing 0 in EH_MODE at any time after boot will automatically set EH_EN bit to 1, and thus activate energy harvesting" Note: This should only ever happen after initial flash of firmware it can also be manually set from RF side */ EH_mode = ST25DV_EH_ACTIVE_AFTER_BOOT; ret = St25Dv_i2c_ExtDrv.WriteEHMode( EH_mode ); } if ( ret != NFCTAG_OK) return ret; //can't go any further ST25DV_EN_STATUS MB_mode = ST25DV_DISABLE; /* If not activated, activate Mailbox */ St25Dv_i2c_ExtDrv.ReadMBMode( &MB_mode); if( MB_mode == ST25DV_DISABLE ) { MB_mode = ST25DV_ENABLE; ret =St25Dv_i2c_ExtDrv.WriteMBMode( MB_mode ); } else { /* if already activated Clear MB content and flag */ ret =St25Dv_i2c_ExtDrv.ResetMBEN_Dyn( ); ret |=St25Dv_i2c_ExtDrv.SetMBEN_Dyn( ); } /* Disable MB watchdog feature */ ret |= St25Dv_i2c_ExtDrv.WriteMBWDG( 1 ); //Watch dog duration = 2(MB_WDG-1)x30ms±6, 4 = ~240ms, 1 = 60ms //ret |= St25Dv_i2c_ExtDrv.WriteMBWDG( 0 ); //Disable MB Watch Dog /* present wrong password for closing the session */ passwd.MsbPasswd = ~passwd.MsbPasswd; passwd.LsbPasswd = ~passwd.LsbPasswd; St25Dv_i2c_ExtDrv.PresentI2CPassword( passwd ); return ret; } /** * @brief DeInitializes the Mailbox mode, disables mailbox mode. * @param None No parameters. * @return NFCTAG_StatusTypeDef status. */ NFCTAG_StatusTypeDef DeInitMailBoxMode( void ) { return St25Dv_i2c_ExtDrv.ResetMBEN_Dyn( ); } evan.gifford1.5377818004144224E12 (Community Member) Ok, in SmarTagNFC.c (and .h), you need to add this: //EMG ported from ST25-DISCOVERY NFCTAG_StatusTypeDef InitMailBoxMode( void ) { NFCTAG_StatusTypeDef ret = NFCTAG_OK; //Changing system registers from I2C and RF side both require a password //default password is 00 00 00 00 00 00 00 00 ST25DV_PASSWD passwd; passwd.MsbPasswd = 0; passwd.LsbPasswd = 0; /* Present password to open session */ ret = St25Dv_i2c_ExtDrv.PresentI2CPassword( passwd ); if ( ret != NFCTAG_OK) return ret; //password failed, can't go any further //Configure GPO as RF_ACTIVITY interrupt //Since this is a real-time system, we only want fresh data //so we use RF_ACTIVITY instead of RF_GET_MSG_EN //and accept data loss if sample time is too slow //This exists but is not used by the driver //ST25DV_GPO gpo; //gpo.GPO_Enable = 1; //gpo.GPO_RFActivity_en = 1; //so we use hex uint16_t gpo = 0x82; ret = St25Dv_i2c_Drv.ConfigIT( gpo ); if ( ret != NFCTAG_OK) return ret; //password failed, can't go any further //Should be A0 for RF_GET_MSG_EN /* If not activated, activate Energy Harvesting */ ST25DV_EH_MODE_STATUS EH_mode = ST25DV_EH_ON_DEMAND; St25Dv_i2c_ExtDrv.ReadEHMode( &EH_mode); if( EH_mode != ST25DV_EH_ACTIVE_AFTER_BOOT ) { /* EH_MODE, default: 1 (meaning only energy harvesting upon demand) 0 (ST25DV_EH_ACTIVE_AFTER_BOOT): EH forced after boot 1 (ST25DV_EH_ON_DEMAND): EH on demand only Set EH_MODE TO 0 to always start energy harvesting on boot (when a field is strong enough) "Writing 0 in EH_MODE at any time after boot will automatically set EH_EN bit to 1, and thus activate energy harvesting" Note: This should only ever happen after initial flash of firmware it can also be manually set from RF side */ EH_mode = ST25DV_EH_ACTIVE_AFTER_BOOT; ret = St25Dv_i2c_ExtDrv.WriteEHMode( EH_mode ); } if ( ret != NFCTAG_OK) return ret; //can't go any further ST25DV_EN_STATUS MB_mode = ST25DV_DISABLE; /* If not activated, activate Mailbox */ St25Dv_i2c_ExtDrv.ReadMBMode( &MB_mode); if( MB_mode == ST25DV_DISABLE ) { MB_mode = ST25DV_ENABLE; ret =St25Dv_i2c_ExtDrv.WriteMBMode( MB_mode ); } else { /* if already activated Clear MB content and flag */ ret =St25Dv_i2c_ExtDrv.ResetMBEN_Dyn( ); ret |=St25Dv_i2c_ExtDrv.SetMBEN_Dyn( ); } /* Disable MB watchdog feature */ ret |= St25Dv_i2c_ExtDrv.WriteMBWDG( 1 ); //Watch dog duration = 2(MB_WDG-1)x30ms±6, 4 = ~240ms, 1 = 60ms //ret |= St25Dv_i2c_ExtDrv.WriteMBWDG( 0 ); //Disable MB Watch Dog /* present wrong password for closing the session */ passwd.MsbPasswd = ~passwd.MsbPasswd; passwd.LsbPasswd = ~passwd.LsbPasswd; St25Dv_i2c_ExtDrv.PresentI2CPassword( passwd ); return ret; } /** * @brief DeInitializes the Mailbox mode, disables mailbox mode. * @param None No parameters. * @return NFCTAG_StatusTypeDef status. */ NFCTAG_StatusTypeDef DeInitMailBoxMode( void ) { return St25Dv_i2c_ExtDrv.ResetMBEN_Dyn( ); } or reply to this email Replying to evan.gifford1.5377818004144224E12 (Community Member) asked a question. Monday, September 24, 2018 3:00 AM Fast transfer mode mailbox - how many write cycles can it handle? I have an application which must send > 100KB/day to an RFID/NFC reader (I'm using the STM25R Disco) - for days and years on end. Looking at the EEPROM spec, it's good for 600k write cycles at 85 °C (That means even at 64Kbit EEPROM, wear leveling would be critical for long life.) The Fast Transfer Mode buffer / mailbox is intriguing (256 Bytes) - it seems perfect for my use case - (mainly polling data) - however I cannot find any information about the type of memory used for this or number of write cycles it supports in the datasheet. So, what type memory is used for this FTM mailbox? How many write cycles can it handle? Thank you very much evan.gifford1.5377818004144224E12 (Community Member) Ok, in SmarTagNFC.c (and .h), you need to add this: //EMG ported from ST25-DISCOVERY NFCTAG_StatusTypeDef InitMailBoxMode( void ) { NFCTAG_StatusTypeDef ret = NFCTAG_OK; //Changing system registers from I2C and RF side both require a password //default password is 00 00 00 00 00 00 00 00 ST25DV_PASSWD passwd; passwd.MsbPasswd = 0; passwd.LsbPasswd = 0; /* Present password to open session */ ret = St25Dv_i2c_ExtDrv.PresentI2CPassword( passwd ); if ( ret != NFCTAG_OK) return ret; //password failed, can't go any further //Configure GPO as RF_ACTIVITY interrupt //Since this is a real-time system, we only want fresh data //so we use RF_ACTIVITY instead of RF_GET_MSG_EN //and accept data loss if sample time is too slow //This exists but is not used by the driver //ST25DV_GPO gpo; //gpo.GPO_Enable = 1; //gpo.GPO_RFActivity_en = 1; //so we use hex uint16_t gpo = 0x82; ret = St25Dv_i2c_Drv.ConfigIT( gpo ); if ( ret != NFCTAG_OK) return ret; //password failed, can't go any further //Should be A0 for RF_GET_MSG_EN /* If not activated, activate Energy Harvesting */ ST25DV_EH_MODE_STATUS EH_mode = ST25DV_EH_ON_DEMAND; St25Dv_i2c_ExtDrv.ReadEHMode( &EH_mode); if( EH_mode != ST25DV_EH_ACTIVE_AFTER_BOOT ) { /* EH_MODE, default: 1 (meaning only energy harvesting upon demand) 0 (ST25DV_EH_ACTIVE_AFTER_BOOT): EH forced after boot 1 (ST25DV_EH_ON_DEMAND): EH on demand only Set EH_MODE TO 0 to always start energy harvesting on boot (when a field is strong enough) "Writing 0 in EH_MODE at any time after boot will automatically set EH_EN bit to 1, and thus activate energy harvesting" Note: This should only ever happen after initial flash of firmware it can also be manually set from RF side */ EH_mode = ST25DV_EH_ACTIVE_AFTER_BOOT; ret = St25Dv_i2c_ExtDrv.WriteEHMode( EH_mode ); } if ( ret != NFCTAG_OK) return ret; //can't go any further ST25DV_EN_STATUS MB_mode = ST25DV_DISABLE; /* If not activated, activate Mailbox */ St25Dv_i2c_ExtDrv.ReadMBMode( &MB_mode); if( MB_mode == ST25DV_DISABLE ) { MB_mode = ST25DV_ENABLE; ret =St25Dv_i2c_ExtDrv.WriteMBMode( MB_mode ); } else { /* if already activated Clear MB content and flag */ ret =St25Dv_i2c_ExtDrv.ResetMBEN_Dyn( ); ret |=St25Dv_i2c_ExtDrv.SetMBEN_Dyn( ); } /* Disable MB watchdog feature */ ret |= St25Dv_i2c_ExtDrv.WriteMBWDG( 1 ); //Watch dog duration = 2(MB_WDG-1)x30ms±6, 4 = ~240ms, 1 = 60ms //ret |= St25Dv_i2c_ExtDrv.WriteMBWDG( 0 ); //Disable MB Watch Dog /* present wrong password for closing the session */ passwd.MsbPasswd = ~passwd.MsbPasswd; passwd.LsbPasswd = ~passwd.LsbPasswd; St25Dv_i2c_ExtDrv.PresentI2CPassword( passwd ); return ret; } /** * @brief DeInitializes the Mailbox mode, disables mailbox mode. * @param None No parameters. * @return NFCTAG_StatusTyp
asant.1
Associate II

ST25r3911b dll WITH sendreceive for c/c++

Good morning,

we are using your evm ST25R3911 buth we found only a dll demod that include only first command as RQA/ANTICOLL/SEL/PPS but not a SEND and receive as showed in your GUI ST tag editor, because I need to write A NDEF file but using a program in c/c++. Could you support us?

Hi asant.1,

I think this post is completely unrelated to the original post. Please open a new ticket and we will provide guidance.

Regards, Ulysses