s32k312 FEE

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

s32k312 FEE

3,697 Views
fengba_360
Contributor III

Dear NXP engineer, I submitted a question about FEE this Monday, which needs your answer. Due to the urgency of the project, I have to submit it again. Thank you for your reply, and I'm sorry for any inconvenience caused to your work!

I'm encountering an issue with the FEE initialization process on the s32k312. My program seems to be stuck at the Fee_MainFunction(), preventing me from proceeding with further operations. I've attached my project code. Could you kindly review it for me?

2222222.png11111.png

 

0 Kudos
Reply
7 Replies

3,660 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

I imported your project to S32DS and I can see following error message in the configurator:

***
Issue: The total size of blocks is too big. They do not fit into the cluster group FeeClusterGroup_0. Increase the size of the cluster or reduce the size of blocks.
Level: Error
Type: Tool problem
Tool: Peripherals
Origin: Peripherals
Resource: Sources
Information: The total size of blocks is too big. They do not fit into the cluster group FeeClusterGroup_0. Increase the size of the cluster or reduce the size of blocks.
***

So, you need to reduce FeeBlockSize (I can see in FeeBlockConfiguration_2 that FeeBlockSize is 7168) or you need to increase the size of cluster. The size of cluster can be increased by adding another FeeSubAddressArea. 

I believe that it will work as expected if you fix this error as described above.

lukaszadrapa_3-1727782560039.pnglukaszadrapa_4-1727782567023.pnglukaszadrapa_5-1727782573370.png
 
 

 

0 Kudos
Reply

3,646 Views
fengba_360
Contributor III

Of course, I have also tried the block size of 4 bytes as mentioned in the example routine, but it still didn't work. I have carefully compared the example routine with my configuration and can't find any differences. That's why I'm reaching out to you for help. Thank you.

0 Kudos
Reply

3,611 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

When calling:

MemAcc_Init(NULL_PTR);

...with NULL_PTR, you need to configure:

lukaszadrapa_0-1727871762930.png

Not post-build:

lukaszadrapa_1-1727871783676.png

As a result, the MemAcc was not initialized and some pointers pointed to invalid locations which caused hard fault reading.

Regards,

Lukas

0 Kudos
Reply

3,598 Views
fengba_360
Contributor III

@lukaszadrapa 

Thank you for your guidance. Now I can use FEE for data storage normally, but I have another question for you. Regarding the issue: "The total size of blocks is too big. They do not fit into the cluster group FeeClusterGroup_0. You need to increase the size of the cluster or reduce the size of the blocks." How should I configure the size of the cluster group? The places where I currently know I can make configurations are shown in the screenshots below. Please help.

微信图片_20241003111430.png

微信图片_20241003111134.png微信图片_20241003111311.png

0 Kudos
Reply

3,563 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

I was playing with the configuration but I can see that adding next physical sectors, clusters etc. does not help in this use case. The limitation is obviously given by physical size of sectors which is 8KB on S32K3. It also depends on other FeeBlocks. If you exceed certain threshold, the configurator will show mentioned message. The expectation is that the size of FeeBlocks is significantly smaller than size of physical sector. So, one solution I can see is to split the data to more blocks.

Regards,

Lukas

0 Kudos
Reply

3,511 Views
fengba_360
Contributor III
I have conducted tests and found that the block size can work normally at 3072 bytes, but it cannot exceed 4000 bytes. However, the physical sector size can accommodate up to 8192 bytes. If you have any new developments, please let me know. Thank you for your answers.
0 Kudos
Reply

3,653 Views
fengba_360
Contributor III

Thank you for responding despite your busy schedule. I just tried your suggested solution. Of course, I had doubted whether this issue was the cause before, but after reducing the size of FeeBlockSize as shown in the image, the program still doesn't work as expected. Here is a screenshot of my recent test. Could you please look at it again?微信图片_20241001195743.png微信图片_20241001195752.png

0 Kudos
Reply