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.
Hello, thank you for always answering my questions.
Today, we ask about the block size problem of FEE Virtual Sector.
I want to set the Number of Virtual Sector to 2 to store a total of 64 Kbyte data divided into blocks. However, when the Flash Start Sector of Virtual Sector1 is set to 0 and the Flash End Sector is set to 1, and the Flash Start Sector of Virtual Sector2 is set to 2 and the Flash End Sector is set to 3 and the block size is set, the sum of the FEE block sizes is 32Kbyte at the maximum.
Virtual Sector1 and 2 are each 32Kbytes for a total of 64Kbytes, but I don't know why the block size cannot be set above 32Kbytes.
FEE Virtual Sector Configuration says "Please make sure that all Virtual Sectors are configured to be of the same size", "Please make sure that Virtual Sectors do not overlap".
However, when I set Flash Start Sector of Virtual Sector1 to 0, Flash End Sector to 3, and Flash Start Sector of Virtual Sector2 to 3 and Flash End Sector to 3, I set the sum of the FEE block sizes up to 64Kbytes.
Will there be any problems using FEE with the above settings?
Thank you for your time. Have a nice day
Will there be any problems using FEE with the above settings?
The Configuration of Virtual sector (VS) is not correct. VS1 (sector 0~sector 3) and VS2 (sector 3) has overlap, and VS1 and VS2 don't have the same size.
Virtual Sector1 and 2 are each 32Kbytes for a total of 64Kbytes, but I don't know why the block size cannot be set above 32Kbytes.
The emulated EEPROM is divided into two or more Virtual Sectors. Each Virtual Sector is partitioned into several Data Blocks. A Virtual Sector can contain one or more contiguous physical flash sectors. A minimum of 2 Virtual Sectors are required to support the TI FEE Driver.
The size of a virtual sector MUST be larger than the size of all the Data Blocks.
When programming data to EEPROM, the data is written to the first empty location in the Active Virtual Sector. If there is insufficient space in the current Virtual Sector to update the data, it switches over to the next Virtual Sector and copies all the valid data from the other Data Blocks in the current Virtual Sector to the new one. After copying all the valid data, the current Virtual Sector is marked as ready for erase and the new one is marked as Active Virtual Sector. Any new data is now written into the new Active Virtual Sector and the Virtual Sector which is marked as ready for erase will be erased in background.
Data Bock Size = payload size + 24 bytes (header size)
The maximum size for data block in one VS is: VS size - 32 bytes (VS header) = 32KB - 32 bytes in your case
What I want to ask is the block size setting in VS2.
I set 32Kbyte for VS1 and 32Kbyte for VS2, but the block size I can set in HALCoGen is (32Kbyte - overhead).
Even when writing code in CCS, there is no Number of VS setting in the TI_Fee_WriteSync() function.
I want to set the block size to 64Kbyte. However, if the block size is larger than the size of VS, writing to FEE is not possible. How can I set the block size of VS2 and write?
After you issue a write command, it will check if there is sufficient space in the current active VS. If no, it will switch over to the next VS and check again. So if block size > VS size, it won't work.
If block size = VS size - header, the data will be written to VS1 for the 1st write, and to VS2 for the 2nd write, and to VS1 again for the 3rd write.
You can use HALCOGen to configure the size of blocks, and number of blocks, and size of VS.
You can also manually change those config data in ti_fee_cfg.h and ti_fee_cfg.c.
Hello, I am using RM48L952.
According to the above, is 32Kbye the maximum data size that the RM48L952 can write at FEE?
If you count the overhead byte here, it will be less than 32 Kbytes, but what I'm curious about is that the RM48L952 has 64 Kbytes of FEE storage space. Why does the driver provided by TI set the VS operation as above and only use up to 32 Kbytes?
is 32Kbye the maximum data size that the RM48L952 can write at FEE?
No. The total block size should not be > VS size - header.
How many blocks do you have?
I understood that only 32 Kbytes of FEE can be used to use the TI Driver. Is my understanding right now?
Your understanding is not correct. You can use 64KB, or 32KB in your application. Please be aware that:
1. At least two virtual sectors are required
2. Twi virtual sectors should have the same size.
So for 64KB BANK 7, the maximum VS size is 64/2=32KB.
The VS0 and VS1 are similar to two ping-pong buffers. Only one of them is active at a time. When one is full, next VS will be used and becomes active.
I would like to ask you one last question.
QJ Wang sade: You can use 64KB, or 32KB in your application.
However, what I'm talking about is asking for the size that can be written at one time. As a result of my testing, the maximum size was 32712 bytes when writing at once with 2 virtual sectors and 1 block.
I had a question In order to use the driver provided by TI, two or more Virtual Sectors must be used. In this way, the maximum size that can be written at once is 32Kbye.
However, QJ Wang says that 64Kbytes are still available. I would like to know the exact information. In fact, the FEE is no different from 32Kbyte when using two Virtual Sectors.
Please be aware of the difference among FEE size, VS size, and block size, and their relations.
64KB is maximum FEE size = 2 * VS (32KB each)
The maximum block size = VS size - VS header = 32KB - 32Bytes = 32736 bytes
The payload length of the data block = block size - block header = 32736 bytes - 24 bytes = 32712 bytes.
The Bank 7 has 4 physical sectors.
You can also configure VS0=sector0 (16KB), and VS1=sector1 (16KB) --> FEE size = 32KB, and sector 2 and sector 3 are not used.
You can design two FEEs. VS0 (sector 0), and VS1 (sector1) --> FEE1
VS0 (sector2), and VS1 (sector 3) --> FEE2
is the maximum size that can be written to FEE at once 32712 bytes?
Yes
Is there any way to write more than 32712 kbytes at once?
No
RM57Lx has a bigger EEPROM: 128KB