Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Smart Bluetooth Forum Discussions

legic_1490776
Level 5
Level 5
25 likes received 10 likes received First like received

Is there a limit on the number of times we can use bleprofile_NVRAM_Write() to the same address?

That is, if it's writing to an eeprom, is there some limit on the order of 100K or 1M writes before it wears out?

0 Likes
1 Solution
ShawnA_01
Employee
Employee
25 solutions authored 10 solutions authored 5 solutions authored

I checked the module die schematic for the 20732S module. The datasheet for the EEPROM claims it supports more than 4 Million write events.

View solution in original post

0 Likes
8 Replies
ShawnA_01
Employee
Employee
25 solutions authored 10 solutions authored 5 solutions authored

I checked the module die schematic for the 20732S module. The datasheet for the EEPROM claims it supports more than 4 Million write events.

0 Likes

thanks, shawn!

Do you know whether the software layer that implements the 'nvram' functions is just a simple write or whether it does anything more complicated like wear leveling?

0 Likes

The FW does not do any sophisticated wear leveling. Though with serial flashes, because of the way they work, new and modified items are always appended to the end of the 'used' area of the sector allocated for NV storage and the old item will be invalidated. An NV sector will be erased/consolidated (by double buffering) only when an item has to be stored but contiguous storage space cannot be found (but there are enough invalidated/unused but scattered blocks that can be defragmented) to fit the new item.

Are NVRAM 'locations' mapped onto sectors?  Based on your description, it sounds as if my repeated writes to a single NVRAM location are likely to not map to write/erase cycles if the write is small compared with a sector?

How big are the sectors?

0 Likes

Be careful ldgirod - the 20736S module uses an EEPROM.  The comment from Arvind on 7/31 shifted the conversation to SFLASH which is a different beast, and which you are not using.

0 Likes

True. So then, for the eeprom implementation, does each NVRAM write

correspond to an erase and write to the eeprom?

On Jul 31, 2014 11:42 AM, "shawn antol" <admin@community.broadcom.com>

0 Likes

No. EEPROMs don't need to be erased before writing to it. If you add a new item, it will  be appended to the end to of the used sections. If you modify an item and it will still fit in the original physical location allocated for it (see other discussions - items + headers are rounded up to 32 byte pages), then it will be overwritten, else the item will be appended to the end and the old item will be invalidated (by marking it as such in the ToC). If you delete an item, it will be invalidated leaving a hole (which will be reclaimed when defragmentation is needed).

Most small density flash use a larger NOR based cell architecture that is optimized for random reads as opposed to a NAND architecture that is optimized for writes and is typically used in high density storage apps.  The NOR architecture typically does not require error correction, bad block management or wear leveling, and where is does, the manufacture will build this functionality into the part and abstract the complexity from the user (newer Spansion GL flash is an example).

While there are managed NAND options available today which provide onboard management (Micron ClearNAND, e-MMC, etc.), raw NAND will still require external management from a dedicated NAND controller of some type.