hello!
I'm using s32k312 with RTD5.0.0, there's some problem about C40_Ip erasing pflash :
I found a post https://community.nxp.com/t5/S32K/S32K344-C40-IP-Hardware-Fault-Problem/td-p/1697432
I modify C40_Ip.h, but the erasing still fails.
Hi @lucaswang,
It works with this test project:
https://community.nxp.com/t5/S32K-Knowledge-Base/S32K312-C40-Ip-SRAM-RTD-500-DS35/ta-p/2074245
Make sure these functions are also placed in SRAM (SchM_Mem_43_INFLS.h).
extern void SchM_Enter_Mem_43_INFLS_MEM_EXCLUSIVE_AREA_xx(void);
extern void SchM_Exit_Mem_43_INFLS_MEM_EXCLUSIVE_AREA_xx(void);
Regards,
Daniel
Thank you for your reply! According to what you said, I can perform the erase and write operations. However, I still encountered other problems. My program receives data sent from the PC via the serial port and writes to the FLASH while receiving the data. But each time, it can only write a part of the data, and then the program triggers a HARDFAULT reset. Here is the interface of my write function:
Hello @lucaswang,
There can be a collision if
are in that PFlash block that is being programmed.
Can you mask the interrupts before the flash operations are launched?
Regards,
Daniel
This is expected, as you can see in the RM, we can program max. 128B at once.
Regards,
Daniel