Hi,
We are using jlink V 4.99a software with JLink Lite CoretxM Hardware to erase/reflash to stm32l476 controller, Our application is sleep intensive, So when we are trying to re-flash the controller, its getting failed.
JLink.exe -device STM32L476QE -CommanderScript C:\CommandFile.jlink
CommandFile.jlink looks like
Below is the error log
Display All
When manually pressing/releasing the reset button 2-3 times while flashing, in that case somehow it's succeeding
Display All
I think by using "Reset strategies Type 3: Connect under Reset" it
can be solved, If yes, where and what command i should put in above
script?
We are using jlink V 4.99a software with JLink Lite CoretxM Hardware to erase/reflash to stm32l476 controller, Our application is sleep intensive, So when we are trying to re-flash the controller, its getting failed.
JLink.exe -device STM32L476QE -CommanderScript C:\CommandFile.jlink
CommandFile.jlink looks like
Below is the error log
Source Code
- $ mingw32-make flash_erase
- SEGGER J-Link Commander V4.99a ('?' for help)
- Compiled May 8 2015 17:36:27
- Script file read successfully.
- Info: Device "STM32L476QE" selected.
- DLL version V4.99a, compiled May 8 2015 17:35:47
- Firmware: J-Link Lite-Cortex-M V8 compiled Jul 17 2014 11:40:12
- Hardware: V8.00
- S/N: 518110332
- Feature(s): GDB
- VTarget = 3.338V
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- No devices found on JTAG chain. Trying to find device on SWD.
- Info: Found SWD-DP with ID 0x2BA01477
- ****** Error: Error while identifying Cortex-M core.
- Info: Found SWD-DP with ID 0x2BA01477
- No device found on SWD.
- Failed to identify target. Trying again with slow (4 kHz) speed.
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- No devices found on JTAG chain. Trying to find device on SWD.
- Info: Found SWD-DP with ID 0x2BA01477
- ****** Error: Error while identifying Cortex-M core.
- Info: Found SWD-DP with ID 0x2BA01477
- No device found on SWD.
- No device found at all. Selecting JTAG as default target interface.
- Processing script file...
- Firmware: J-Link Lite-Cortex-M V8 compiled Jul 17 2014 11:40:12
- Hardware: V8.00
- Target interface speed: 2000 kHz
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Reset delay: 0 ms
- Reset type UNKNOWN: ???
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- PC: (R15) = 00000000, CPSR = 00000000 (Unknown mode, ARM)
- Current:
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- R0 =00000000, R1 =00000000, R2 =00000000, R3 =00000000
- R4 =00000000, R5 =00000000, R6 =00000000, R7 =00000000
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- USR: R8 =00000000, R9 =00000000, R10=00000000, R11=00000000, R12=00000000
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- R13=00000000, R14=00000000
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- FIQ: R8 =00000000, R9 =00000000, R10=00000000, R11=00000000, R12=00000000
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- R13=00000000, R14=00000000, SPSR=00000000
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- IRQ: R13=00000000, R14=00000000, SPSR=00000000
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- SVC: R13=00000000, R14=00000000, SPSR=00000000
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- ABT: R13=00000000, R14=00000000, SPSR=00000000
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- UND: R13=00000000, R14=00000000, SPSR=00000000
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Erasing device (STM32L476QE)...
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- ERROR: Erase returned with error code -1.
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Reset delay: 0 ms
- Reset type UNKNOWN: ???
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Script processing completed.
When manually pressing/releasing the reset button 2-3 times while flashing, in that case somehow it's succeeding
Source Code
- JLink.exe -device STM32L476QE -CommanderScript C:\CommandFile.jlink
- SEGGER J-Link Commander V4.99a ('?' for help)
- Compiled May 8 2015 17:36:27
- Script file read successfully.
- Info: Device "STM32L476QE" selected.
- DLL version V4.99a, compiled May 8 2015 17:35:47
- Firmware: J-Link Lite-Cortex-M V8 compiled Jul 17 2014 11:40:12
- Hardware: V8.00
- S/N: 518110332
- Feature(s): GDB
- VTarget = 3.338V
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFE11
- No devices found on JTAG chain. Trying to find device on SWD.
- Info: Found SWD-DP with ID 0x2BA01477
- Info: Found Cortex-M4 r0p1, Little endian.
- Info: FPUnit: 6 code (BP) slots and 2 literal slots
- Info: CoreSight components:
- Info: ROMTbl 0 @ E00FF000
- Info: ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB00C SCS
- Info: ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 003BB002 DWT
- Info: ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB
- Info: ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 003BB001 ITM
- Info: ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 000BB9A1 TPIU
- Info: ROMTbl 0 [5]: FFF42000, CID: B105900D, PID: 000BB925 ETM
- Cortex-M4 identified.
- Target interface speed: 100 kHz
- Processing script file...
- Firmware: J-Link Lite-Cortex-M V8 compiled Jul 17 2014 11:40:12
- Hardware: V8.00
- Target interface speed: 2000 kHz
- Reset delay: 0 ms
- Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
- PC = 1FFF3E8A, CycleCnt = 00000000
- R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
- R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
- R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000
- R12= 00000000
- SP(R13)= 20002AD0, MSP= 20002AD0, PSP= 00000000, R14(LR) = FFFFFFFF
- XPSR = 01000000: APSR = nzcvq, EPSR = 01000000, IPSR = 000 (NoException)
- CFBP = 00000000, CONTROL = 00, FAULTMASK = 00, BASEPRI = 00, PRIMASK = 00
- FPU regs: FPU not enabled / not implemented on connected CPU.
- Erasing device (STM32L476QE)...
- **************************
- WARNING: CPU is running at low speed (4018 kHz).
- **************************
- Info: J-Link: Flash download: Total time needed: 5.797s (Prepare: 0.135s, Compar
- e: 0.000s, Erase: 5.654s, Program: 0.000s, Verify: 0.000s, Restore: 0.008s)
- Erasing done.
- Reset delay: 0 ms
- Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
- Script processing completed.
I think by using "Reset strategies Type 3: Connect under Reset" it
can be solved, If yes, where and what command i should put in above
script?
The post was edited 3 times, last by Horaira ().