AnsweredAssumed Answered

STM32L031G6 flashing problem

Question asked by le.bien on Sep 14, 2016
Latest reply on Sep 14, 2016 by ForumSTM32.ForumSTM3
Hi, I need to flash my code into STM32L031G6 chip using an external debugger, but i got the following error:
ERROR: Timeout while checking target RAM, RAMCode did not respond in time
Failed to prepare for programming.
Failed to execute RAMCode for RAM check!


Here is the whole debugging message:

SEGGER J-Link GDB Server V6.00b Command Line Version

JLinkARM.dll V6.00b (DLL compiled Jul 27 2016 18:18:11)

-----GDB Server start settings-----
GDBInit file:                  none
GDB Server Listening port:     2331
SWO raw output listening port: 2332
Terminal I/O port:             2333
Accept remote connection:      localhost only
Generate logfile:              off
Verify download:               on
Init regs on start:            on
Silent mode:                   off
Single run mode:               on
Target connection timeout:     0 ms
------J-Link related settings------
J-Link Host interface:         USB
J-Link script:                 none
J-Link settings file:          none
------Target related settings------
Target device:                 STM32L031G6
Target interface:              SWD
Target interface speed:        1000kHz
Target endian:                 little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link Lite-Cortex-M V8 compiled Aug 20 2015 17:57:19
Hardware: V8.00
S/N: 408000227
Checking target voltage...
Target voltage: 3.18 V
Listening on TCP/IP port 2331
Connecting to target...WARNING: T-bit of XPSR is 0 but should be 1. Changed to 1.
Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0x00000000)
Read 2 bytes @ address 0x00000000 (Data = 0x0000)
Target interface speed set to 1000 kHz
WARNING: T-bit of XPSR is 0 but should be 1. Changed to 1.
Resetting target
Halting target CPU...
...Target halted (PC = 0x00000000)
R0 = FFFFFFFF, R1 = FFFFFFFF, R2 = FFFFFFFF, R3 = FFFFFFFF
R4 = FFFFFFFF, R5 = FFFFFFFF, R6 = FFFFFFFF, R7 = FFFFFFFF
R8 = FFFFFFFF, R9 = FFFFFFFF, R10= FFFFFFFF, R11= FFFFFFFF
R12= FFFFFFFF, R13= 00000000, MSP= 00000000, PSP= FFFFFFFC
R14(LR) = FFFFFFFF, R15(PC) = 00000000
XPSR F1000000, APSR F0000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0x00000000)
Read 2 bytes @ address 0x00000000 (Data = 0x0000)
Select auto target interface speed (2000 kHz)
Flash breakpoints enabled
Semi-hosting enabled (Handle on BKPT)
Semihosting I/O set to TELNET Client
SWO disabled succesfully.
SWO enabled succesfully.
Read 4 bytes @ address 0x00000000 (Data = 0x00000000)
Read 2 bytes @ address 0x00000000 (Data = 0x0000)
Downloading 192 bytes @ address 0x08000000 - Verified OK
Downloading 4072 bytes @ address 0x080000C0 - Verified OK
Downloading 36 bytes @ address 0x080010A8 - Verified OK
Downloading 4 bytes @ address 0x080010CC - Verified OK
Downloading 4 bytes @ address 0x080010D0 - Verified OK
Downloading 4 bytes @ address 0x080010D4 - Verified OK
ERROR: Timeout while checking target RAM, RAMCode did not respond in time
Failed to prepare for programming.
Failed to execute RAMCode for RAM check!
Writing register (PC = 0xa0020008)
Read 4 bytes @ address 0x080002A0 (Data = 0x00000000)
WARNING: T-bit of XPSR is 0 but should be 1. Changed to 1.
Resetting target
Halting target CPU...
...Target halted (PC = 0x00000000)
Read 2 bytes @ address 0x08000F2E (Data = 0x0000)
Read 2 bytes @ address 0x08000F2E (Data = 0x0000)
Read 2 bytes @ address 0x08000F2E (Data = 0x0000)
R0 = FFFFFFFF, R1 = FFFFFFFF, R2 = FFFFFFFF, R3 = FFFFFFFF
R4 = FFFFFFFF, R5 = FFFFFFFF, R6 = FFFFFFFF, R7 = FFFFFFFF
R8 = FFFFFFFF, R9 = FFFFFFFF, R10= FFFFFFFF, R11= FFFFFFFF
R12= FFFFFFFF, R13= 00000000, MSP= 00000000, PSP= FFFFFFFC
R14(LR) = FFFFFFFF, R15(PC) = 00000000
XPSR F1000000, APSR F0000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0x00000000)
Read 2 bytes @ address 0x00000000 (Data = 0x0000)
Setting breakpoint @ address 0x08000F2E, Size = 2, BPHandle = 0x0001
Starting target CPU...
WARNING: T-bit of XPSR is 0 but should be 1. Changed to 1.
...Target halted (DBGRQ, PC = 0xFFFFFFFE)
Reading all registers
Read 4 bytes @ address 0xFFFFFFFE (Data = 0x061AF9D0)
Read 2 bytes @ address 0xFFFFFFFE (Data = 0x0000)
Removing breakpoint @ address 0x08000F2E, Size = 2
Read 4 bytes @ address 0xFFFFFFFC (Data = 0x000000B1)
Read 4 bytes @ address 0xFFFFFFF8 (Data = 0x00000005)
Read 4 bytes @ address 0x00000004 (Data = 0x00000000)
Read 4 bytes @ address 0xFFFFFFFC (Data = 0x000000B1)
Read 4 bytes @ address 0xFFFFFFF4 (Data = 0x00000010)
Read 4 bytes @ address 0xFFFFFFF4 (Data = 0x00000010)
Read 4 bytes @ address 0x00000010 (Data = 0x00000000)
Read 4 bytes @ address 0xFFFFFFFC (Data = 0x000000B1)
Read 4 bytes @ address 0xFFFFFFF4 (Data = 0x00000010)
Read 4 bytes @ address 0x0000000C (Data = 0x00000000)
Read 4 bytes @ address 0x0000000C (Data = 0x00000000)
Read 4 bytes @ address 0xFFFFFFF4 (Data = 0x00000010)
Read 4 bytes @ address 0x0000000C (Data = 0x00000000)
Read 4 bytes @ address 0x00000000 (Data = 0x00000000)
Read 4 bytes @ address 0xFFFFFFFC (Data = 0x000000B1)
Read 4 bytes @ address 0xFFFFFFF4 (Data = 0x00000010)
Read 4 bytes @ address 0x0000000C (Data = 0x00000000)
Read 4 bytes @ address 0xFFFFFFFC (Data = 0x000000B1)
Read 4 bytes @ address 0xFFFFFFF4 (Data = 0x00000010)
Read 4 bytes @ address 0x0000000C (Data = 0x00000000)
Read 4 bytes @ address 0xFFFFFFFF (Data = 0x00000000)


I tried to find a solution but unfortunately couldn't find any. Any help please?
Thanks,
Bien

Outcomes