Can't program a RA4M2 with J-Link

Hello,

I'm working with custom boards equipped with R7FA4M2ABC3FP devices. I use a J-Link prob and the SWD interface to debug/program the RA4M2 and it's usually running fine.

But for some reason I can't program some of them anymore, I was able to program these boards before but after usingthem a few times I get an error each time I try to flash or erase a program. I don't know the reason for the error or what operation can cause the problem. Has this appened to anyone ?

I tried to program with J-Flash Lite V7.56d and e2 studio.

With e2 studio I get this error message when I try to start a debug session:

Failed to execute MI command:

load

...

Error message from debugger back end:

Could not write register "pc"; remote failure reply

'E..FFFFFFFF'

I also have this in the Console log :

Connecting to R7FA4M2AB, ARM Target
GDBServer endian : little
Target power from emulator : Off
Starting target connection

Current status of the RA TrustZone device
DLM state : Non-debugging Mode
Debug level : N/A
Secure/NSC memory partition size :
- Code Flash Secure (kB) : 0
- Code Flash NSC (kB) : 0
- Data Flash Secure (kB) : 0
- SRAM Secure (kB) : 0
- SRAM NSC (kB) : 0

Finished target connection
GDB: 56306
Target connection status - OK
Target connection status - OK
Starting download
GDB action 'write register', has failed with error code, 0xfffffffc
Disconnected from the Target Debugger.