S32K312-Update the same Block multiple times in a cluster

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K312-Update the same Block multiple times in a cluster

1,601 Views
Simon-Liu
Contributor V

Hello

When I read the RTD_FEE_UM document, I know that the header data of all blocks, including the address of the stored data, is stored in front of each Cluster.
So, if the same Block data is written for the second time, to what address is the data updated? How is the address data in the Block updated?

 

BestRegards

Simon

0 Kudos
Reply
5 Replies

1,566 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @Simon-Liu 
when you write the same block data second time, new records are created in the flash. Old ones are kept/not updated (until next swap) but only the latest records are valid. Addresses of block headers grow up while addresses of data descend down:

lukaszadrapa_0-1717743141974.png

 

To see the behavior, you can use example like this:
c:\NXP\S32DS.3.5\S32DS\software\PlatformSDK_S32K3\RTD\Fee_TS_T40D34M40I0R0\examples\S32DS\S32K3XX\Fee_Example_S32K344\
Just write the same block more times and watch the flash block to see how it works.

Regards,
Lukas

766 Views
kadlecja
Contributor I

Hi @lukaszadrapa ,

Thank you for the explanation of the way of writing the same data. I'm facing the issue with the increasing time of the Init routine. In your mentioned example, there is a while loop waiting for MEMIF_IDLE. After repeated write and PoR the time needed for this routine increases. When I do 1 write and PoR it is something around 1.9 ms. So after 100 write/reset cycles, I have a delay of 190 ms! Do you have any advice on how to resolve this issue?

0 Kudos
Reply

678 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @kadlecja 

Something similar was already discussed here:

https://community.nxp.com/t5/S32K/S32K312-FEE-FLS-INIT-time/m-p/2024662/highlight/true#M44953

According to that post, there's not much you can do...

By the way, it's better to create new thread because we are not getting notifications if you update such old one. 

Regards,

Lukas

0 Kudos
Reply

649 Views
kadlecja
Contributor I
Thank you for your response and support. Thanks for the advice too. I analyzed this delay issue in depth, and it's still unclear to me why it takes so long. We are using a total of 7 Fee blocks and an Internal RC oscillator. 
 
I did some measurements on my side. I checked the no of repetitions of the init loop from the example:
 do
 {
 Fee_MainFunction();
 MemAcc_MainFunction();
 status = Fee_GetStatus();
 } while (status != MEMIF_IDLE);
 
And with my initial setup of Mem and Fee, it takes 38.6 ms with 2985 loops.
When I store data into one memory block, this time prolongs to +1.77 ms and +130 reps of the loop after PoR.
The drivers are quite complex, so I understand that a lot of calls must be made, but is there any option or setting that can speed up this process?
Thank you once more for your support.
Tags (2)
0 Kudos
Reply

1,563 Views
Simon-Liu
Contributor V

Hi @lukaszadrapa 

Thank you for your answer.

I still have some questions about the FEE and MemAcc components:

1.How is the maximum allowed value for each block size calculated?

2.SubAddressAreas in each AddressArea cannot reference the same physical sector, but SubAddressAreas in different AddressAreas can reference the same physical sector. Why is this? Will this not cause conflicts in storing data?

 

BestRegards

Simon

0 Kudos
Reply