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
Code flash programming "wrong":
#define FLS_SECTOR_ADDR 0x601FD0U
#define FLS_SECTOR_TEST C40_CODE_ARRAY_0_BLOCK_2_S256
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
Data flash programming "wrong":
#define FLS_SECTOR_ADDR 0x10001FD0U
#define FLS_SECTOR_TEST C40_DATA_ARRAY_0_BLOCK_4_S000
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
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