Cannot Use J-Flash to Erase or Write S32k311 chip

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

Cannot Use J-Flash to Erase or Write S32k311 chip

1,031 Views
bestegg
Contributor I

J-Flash Version: V7.94g

Firmware code: just empty main code

S32DS version: S32DS 3.5

RTD version: 4.0.0

bestegg_0-1707187669572.png

 

We are using our own board, so I wanna know how to unlock the sector to erase or program the sector, because I can successful connect the s32k311 mcu.

When using Jlink to burn the MCU program to the chip of S32k311, the following error occurred.

  • The first burn is successful
  • The second burn will generate an error code as follow.

I have tried the following methods, but the problem still exists:

   Trying another Jlink emulator for burning.

   Update J-Flash version to V7.94h

- Data file opened successfully (27020 bytes, 1 range, CRC of data = 0x9F3362FB, CRC of file = 0x9F3362FB)
Auto programming target (27020 bytes, 1 range) ...
- Checking if selected data fits into selected flash sectors.
- Start of preparing flash programming
- End of preparing flash programming
- Start of determining dirty areas in flash cache
- End of determining dirty areas
- CPU speed could not be measured.
- Start of erasing sectors
- Blank checking 0x00400000 - 0x00407FFF
- End of erasing sectors
- Start of flash programming
- Programming range 0x00400000 - 0x00407FFF ( 4 Sectors, 32 KB)
- ERROR: Programming failed @ address 0x20000954 (sector is locked)
- End of flash programming
- ERROR: Program failed
- Start of restoring
- ERROR: Timeout while restoring target, RAMCode did not respond in time (PC = 0x2000035A, XPSR = 0x21000000, SP = 0x200008C0)!
- ERROR: Failed to restore target. RAMCode never stops
- End of restoring
- ERROR: Failed to auto program target

bestegg_0-1707181342357.png

 

Tags (1)
0 Kudos
Reply
1 Reply

1,002 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @bestegg,

This problem could be because the sector is protected in FPROT.

This is a common practice to protect the bootloader areas as this code does not get erased. If the sectors are protected, they cannot be erased/programmed.

The protection can be removed by a mass erase or the ERSALLU FTFC command. If the CSEc register is enabled, it is blocked.

Just as a note, J-link is not an NXP product, you would get better support from SEGGER: Ticket | SEGGER.

Best regards,
Julián

 

0 Kudos
Reply