C40_Ip_Example_S32K344 wrong behavior

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

C40_Ip_Example_S32K344 wrong behavior

924 次查看
ziomocci
Contributor IV

Hi All, 

I am testing the sample project in the subject noticing different behaviors during flash programming with C40 IP (RTD ver.2.0.0, S32DS ver.3.4), both in case of Code Flash and in case of Data Flash, depending on the FLS_SECTOR_ADDR value.

Code flash programming "good":

#define FLS_SECTOR_ADDR 0x601FB0U
#define FLS_SECTOR_TEST C40_CODE_ARRAY_0_BLOCK_2_S256

 

ziomocci_0-1677854525805.png

Code flash programming "wrong":

 

#define FLS_SECTOR_ADDR 0x601FD0U
#define FLS_SECTOR_TEST C40_CODE_ARRAY_0_BLOCK_2_S256

 

ziomocci_1-1677854719808.png

It happens always when address passed to the Main_interfaces implies flash operations across the C40 Sectors 8KBs boundaries of Code Flash (that is, 602000/604000/606000/...).

Same situation in case of Data Flash.

Data flash programming "good":

#define FLS_SECTOR_ADDR 0x10001FB0U
#define FLS_SECTOR_TEST C40_DATA_ARRAY_0_BLOCK_4_S000

ziomocci_2-1677855273056.png

Data flash programming "wrong":

#define FLS_SECTOR_ADDR              0x10001FD0U
#define FLS_SECTOR_TEST              C40_DATA_ARRAY_0_BLOCK_4_S000

ziomocci_3-1677855485132.png

It happens always when address passed to the Main_interfaces implies flash operations across the C40 Sectors 8KBs boundaries of Data Flash(that is, 10002000/10004000/10006000/...).

Those uses case are usually managed during flash reprogramming with external development/diagnostic tool of ECU configuration/errors storing in NVM.

How could be implemented a continuous programming flow?

Of course, to split in multiple Main_interfaces function calls is not acceptable.

Thanks in adv,

K.R.

Andrea

标记 (3)
0 项奖励
回复
1 回复

895 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Andrea,

This is expected, up to four pages (maximum 128 bytes) can be programmed at once on a quad-page boundary (128-byte aligned).
This means the data to be written must fall within a quad-page.

And we must split the write operation based on that boundary.
This is done in the MCAL FLS driver.
Unfortunately, the C40_IP driver can't handle it, it must be done manually.

In RTD 2.0.0 & 2.0.1, there is a bug, because the driver does not report any API_ERROR if you pass these parameters.
In RTD 3.0.0, this condition has been added
Address Offset + Length <= C40_DATA_SIZE_BYTES_U32 (128 Bytes)

 

Regards,

Daniel

0 项奖励
回复