Help Clarifying FEE Space allocation for RTD 5.0.0

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Help Clarifying FEE Space allocation for RTD 5.0.0

1,790件の閲覧回数
pb632146
Contributor V

I have recently updated my RTD to 5.0.0 and I realized that the organization of cluster and memacc subaddress changed compared to 3.0.0. Please point out any error in the flow of my understanding of how EEPROM works here.

 

pb632146_1-1738668194762.png

pb632146_2-1738668199353.png

 

FeeGeneral wants me to set an alignment value, this only takes one AddressAreaConfiguration

pb632146_3-1738668314929.png

 

This address area configuration can have any number of sub configurations, in this case 4, (is the Logical Start Address of each subsequent sub area supposed to be the erase size of its previous sub area?)

pb632146_5-1738668375567.png

pb632146_13-1738669993140.png

 

Each of these sub configurations map to a MemSectorBatch, again in this case 4 batches, with each one erasing the full sector of 8192 bytes for use by FEE. (What does Number of Sectors do?)

pb632146_6-1738668638947.png

pb632146_7-1738668675242.png

This means I have 4 subAddressAreas each with 8192 bytes of total space. FeeClusters are then assigned to a subAddressArea. 

pb632146_8-1738668939034.png

All of these Blocks belong to a cluster group, and you do not need to specify which subAddressArea they belong to, so as long as the total amount of space taken up by the blocks and their headers is less than the space provided by the subAddressAreas assigned to the Clusters in the ClusterGroup, in this case 4 * 8192, I can fill it however I wish?

However I am currently running into an error testing trying to go over 8192 Bytes as it says my Cluster group is not large enough.

This is 10 blocks of 1000 bytes each, which I will need to do in a larger quantity of eventually.

pb632146_12-1738669918792.png

This would seem to mean my cluster group is only 8192 bytes large? The error goes away if I have 6 blocks of 1000 and 1 block of 50, but anything over presents the error again. How do I increase the amount of space I can allocate blocks to?

 

If I have 10+ blocks of 1200bytes  each how do I configure my FEE, Mem_43_INFLS, and MemAcc to take them all?  

Also, What is the total amount of space a Block takes up? Is it 16 bytes for header + 16 for status + the actual space for data?

pb632146_9-1738669060782.png

 

 

 

 

 

 

0 件の賞賛
返信
3 返答(返信)

1,757件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @pb632146 


It's described in the user manual how to set the alignment:

 

fee_buffer_align.png

Then see section "3.2.1.3 Examples of configuration" in MEMACC_UM:
c:\NXP\S32DS.3.5_RTD\S32DS\software\PlatformSDK_S32K3\RTD\MemAcc_TS_T40D34M50I0R0\doc\RTD_MEMACC_UM.pdf

The examples explain how logical and physical addressing work. And it shows how to use more sectors for one SectorBatch (that's the number of sectors you are talking about). If you are not going to spread the sectors over different flashes etc., it can be just continuous space (large single SectorBatch with many sectors).

And this text from FEE user manual is important:
"During the FEE module configuration, each FEE block is assigned to specific FEE cluster group where the FEE block
will be physically emulated. Each FEE cluster group consists of at least two FEE clusters, where each FEE cluster
consists of at least one sub address area(Note: Sub address area is in same address Areaa). The list of available
Address areas that can be used by the FEE module for emulation depends on actual MemAcc driver logical Address
Area list configuration."

So, both (or more) clusters must be large enough to accommodate all the blocks. This is the key point. And the clusters should be even larger to avoid frequent swapping.

Regards,
Lukas

0 件の賞賛
返信

1,743件の閲覧回数
pb632146
Contributor V

So for that last point, for every block I have I actually need double the space of what that block's size + header is?

Is this for memory validation? I.E. A block in one cluster becomes invalid so the other is checked instead?

 

Assuming that is the case then, if I understand correctly then I can set the number of continuous sectors in one MemSectorBatch equal to the total size of my blocks, create a second MemSectorBatch with an equal number of sectors, and assign each of the two clusters for one cluster group to each MemSectorBatch, and assign all my blocks to that cluster group.

Is there any problem with doing this?

I.E. If I had a 40kb total size of blocks, I could do the following, with 5 continuous sectors

pb632146_0-1738935097746.png

pb632146_1-1738935106326.png

 

pb632146_3-1738935260479.png

pb632146_4-1738935269049.png

pb632146_5-1738935316734.pngpb632146_6-1738935321918.png

 

And indeed this does seem to work as it does not give me an error of not being able to fit my blocks within the cluster group anymore, implying that it has increased the allowed space.

However one question I still have is how many bytes does a block actually take up? I am trying to experiment with adding large blocks of 1200 bytes each as that is what I need. With 5 sectors I should have  8192*5 = 40960 bytes of space, but at 30 blocks of 1200 (36000) adding even another default sized block of 4 bytes gives me an error that it will no longer fit.

Going off the documentation in RTD_FEE_UM, each block carries with it a 32 byte header and status, however adding this 30 *32 byte amount to the previous 36k only adds up to  37080 bytes, where do the last 3880 bytes go? It is not a big deal to assign a very large sector batch to this data, but it would be nice to know where I am losing about a 10th of the sector batch to.

pb632146_7-1738935995721.png

 

I have attached my current project if you could look at the settings to see what might be happening to the memory.

 

0 件の賞賛
返信

1,682件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Generally, due to nature of Emulated EEPROM, you will get best results when the size/sum of all your data is significantly smaller than size of flash allocated for the EEPROM. If you want to use ratio between data and flash only 2 (i.e. flash size = 2 x useful data), I would consider this as a bare minimum. Higher ratio will provide better results - fewer swaps and higher endurance (more possible program/erase cycles).
Yes, you can use configuration like that. If you plan to update the records on a rare basis, it could be sufficient. If you plan to update the records frequently, I would recommend higher data/flash ration as described above.
I think that the "overhead" is caused by alignments and maybe by placement when crossing sector boundaries. Not sure how this works exactly, I can try to allocate some time in next days to check it. Or you can simply write a couple of blocks to Fee and watch the flash to see if there are some empty spaces explaining this.

Regards,
Lukas

0 件の賞賛
返信