This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RM48: Maximum EEPROM block size

Other Parts Discussed in Thread: HALCOGEN, RM48L952

The datasheet for the RM48L952ZWT states:

Internal Memory:

- 3MB of Program Flash With ECC

- 256KB of RAM With ECC

- 64KB of Flash with ECC for Emulated EEPROM"

I will take this block to mean that I have 64KB of dedicated emulated EEPROM specifically for use as EEPROM.

Halcogen in the FEE tab allows me up to 16 (one based) blocks. (I am using 10).

 

What is the maximum size in bytes that any one block can have?

 

Are there any restrictions on specifying block size (must be even, or in multiples of 32, or whatever)?

  • The largest block size must be smaller than the virtual sector size. In general it should be much smaller than the virtual sector size so that multiple copies of the block can exist before the FEE API has to erase a virtual sector. There is an overhead of 24 bytes for each block, so making very small blocks is not efficient. There is no restriction on the alignment of blocks, but the blocks will use a multiple of 8 bytes to allow for ECC, so multiples of 8 bytes are most efficient. When any item in a block changes, the whole block is rewritten. Having data that is updated frequently with data that is not updated frequently in the same block is also inefficient. In general, data that is updated at the same time should be included in the same block.
  • Thank you for the quick reply Bob.

    How do I find out the size of the virtual sector?

    I found up through testing that I can have a block size of 1728 with no issues, but I get write issues, if the block size goes to 1729. I get EEPROM functionality grind to a halt if I put a block size as 15012.

    I have 10 blocks most of them tiny, but 2 blocks are large. I have one 504 byte block, which is not a problem. That reads/writes fine, however block 10 requires 15012 in size. That trips up the API, hence my posting here.
  • You configure the virtual sector in HALCoGen. By default on the RM48L952 the virtual sectors are equal to the physical sectors, 4 sectors of 16KB each. (A virtual sector cannot be smaller than the physical sector size.) The maximum virtual sector size on this part is two virtual sectors of 32KB each.
  • Okay, so what does that make my maximum block size for block 10 assuming the following layout and default virtual sectors.

    1. 32 bytes
    2. 32 bytes
    3. 96 bytes
    4. 128 bytes
    5. 128 bytes
    6. 64 bytes
    7. 64 bytes
    8. 64 bytes
    9. 504 bytes
    10. ??? bytes
  • If block 10 needs 15012 bytes, then you need to change the default virtual sectoring from 4 16KB sectors to 2 32KB sectors.