S32K314 failed to write to 0x00588210 Hello, When I tried to write data to address 0x00588210, the write operation failed. At this point, the MCRS register returned a value of 0x00008100. Writing to the area before this address worked without any problems, and erasing the sector containing 0x00588210 also worked without any issues. I want to know how to determine where the problem lies. 回复: S32K314在写入0x00588210处失败 After restoring all PFLASH to 0xFF using another programmer, the sectors that previously failed to be written can be erased and rewritten. However, other random sectors cannot be erased. Is there a problem with my erasure process? -check the DomainID -write erase_addr to the PFCPGM_PEADR_L register (the addr is 0x00580000 to the 0x00588210) -wtire 0xFFFFFFFF to the PROGRAM_DATA -set the MSR[ERS] to 0b1 -set theMSR[EHV] to 0b1 -read the MCRS[DONE] until it was set 1(0x00580000 addr 's MCRS value is 0x0000C100 after erase done) - Check the MCRS error bit -clear MCRS[EHV] -clear MCRS[ERS] 回复: S32K314在写入0x00588210处失败 Before the failure, I successfully wrote data once. The reason for the second write failure was due to an erase failure. My description was not accurate enough; the second write failed because the sector located at 0x00588210 was not correctly identified. I wrote from 0x00400000 to the end of the PFLASH, skipping reserved bytes, writing 128 bytes each time. Each time, I directly wrote Program Data through SWD debugging, without buffering. How can I call the C40 API and check the RTD version? The entire write process was simulated by myself; I did not use flash memory algorithms and there were no logs. 回复: S32K314在写入0x00588210处失败
As we understand the issue, the flash write operation fails at address 0x00588210. This address is within the program flash range of the S32K314.
Since the address is located 16 bytes into a 32-byte flash page, the operation may cross a page boundary depending on the write length. Please provide the write length, source buffer address, exact C40 API return value, and RTD version.
Please also confirm that the corresponding flash sector was erased before writing. If an external debugger/programmer is involved, please provide the programming log and selected flash algorithm.
回复: S32K314在写入0x00588210处失败 I can confirm that it is not a physical flash memory failure. 1. The chip is S32K314HVS1P55ACTAZ2234B 2. I am testing my own SWD debugging process to see if there are any problems. 3. Due to certain reasons, I cannot provide the specific timing sequence; I can only provide my general process. a. Remove sector protection b. Erase the corresponding sector of PFLASH -check the DomainID -write erase_addr to the PFCPGM_PEADR_L register (the addr is 0x00580000 to the 0x00588210) -wtire 0xFFFFFFFF to the PROGRAM_DATA -set the MSR[ERS] to 0b1 -set theMSR[EHV] to 0b1 -read the MCRS[DONE] until it was set 1(0x00580000 addr 's MCRS value is 0x0000C100 after erase done) - Check the MCRS error bit -clear MCRS[EHV] -clear MCRS[ERS] Is there anything wrong with my erasure procedure? 4. After erasing, the value at 0x00588210 is 0xF1, which I previously tested and wrote. 5. The content has been verified using other debuggers. 6. It can be confirmed that the sectors preceding this address can be erased normally. 7. All operations were performed by me directly manipulating the registers through SWD. 8. The device has been programmed and flashed with AB SWAP firmware. 回复: S32K314在写入0x00588210处失败
As we understand the issue, programming fails at address 0x00588210. Erasing the sector containing this address completes, but the sector does not appear to contain only 0xFF afterward. You therefore suspect a physical flash failure and would like to determine the actual cause. Please confirm whether this understanding is correct.
The provided information is not sufficient to determine whether this is a physical flash issue. Please provide:
The complete S32K314 part number and mask set.
The software package and flash driver version being used.
The exact erase and program sequence, including the commands and affected address range.
The complete MCRS values before and after each operation, after previously clearing the relevant status flags.
The exact addresses and values that are not 0xFF after erase.
How the erased content is verified, for example by CPU read, debugger, blank check, or driver verification.
Whether the flash routine executes from RAM and whether interrupts and other accesses to the target flash block are disabled during the operation.
The debugger/programmer used and the complete programming log.
Whether the issue is consistently reproduced on the same address and whether it occurs on more than one device.
Whether the device was previously programmed, protected, or configured with HSE firmware.
Possible causes include an incorrect flash operation sequence, uncleared status flags, access to the target flash block during the operation, an ECC-related read or verification issue, or an actual physical flash failure.
As an initial comparison, please erase and program the affected area using a supported debugger flash algorithm. If the same location fails consistently after a successful erase on the same device, please provide the resulting log and memory dump.
回复: S32K314在写入0x00588210处失败 I noticed that the data in this sector was not 0xFF after erasing, but the MCRS returned 0x0000C100 at the end of the erasure process. Could this be a physical bad sector?
View full article