cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F767 debugging issue with J Link

AShel.1
Associate III

Hello,

I'm using STM32F767 custom target board with J Link debugger, everything was working fine since last 2 months till today morning, while debugging my existing project following pop up message came up. instead of selecting options right way, I've checked for similar issues reported earlier and found some posts where selecting yes was good option. I've selected yes and then I was not able to debug target , directly its going to hard fault handler. I see flash programming steps are ok. then I've tried J link commander to erase(EnableEraseAllFlashBanks) flash but therein it returns error -5.

Please help me to resolve this issue

3 REPLIES 3
AShel.1
Associate III

I've tried erasing STM32F767VG through JFlash tool, but there I get error,below is the log from JFlash tool, sometimes it gives RAM read error(picture is attached)

did anybody faced similar issue, any clue to resolve it?

0693W000004Gd0IQAS.png

- Connected successfully

Erasing chip ...

 - 1033 sectors, 3 ranges, 0x8000000 - 0x80FFFFF, 0x1FFF0000 - 0x1FFF001F, 0x90000000 - 0x93FFFFFF

 - 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 chip

 - End of erasing chip

 - Start of restoring

 - End of restoring

 - 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.

 - Chip erase not supported for flash bank @ 0x1FFF0000. Switched to sector erase

 - Start of determining dirty areas in flash cache

 - End of determining dirty areas

 - Start of erasing sectors

 - Blank checking 0x1FFF0000 - 0x1FFF001F

 - Erasing range 0x1FFF0000 - 0x1FFF001F ( 1 Sector, 32 Bytes)

 - End of erasing sectors

 - ERROR: Erase failed

 - Start of restoring

 - End of restoring

 - ERROR: Failed to erase chip

Disconnecting ...

 - Disconnected

AShel.1
Associate III

Tried erasing sectors from 0x08000000 but it gives error, is it because of flash is corrupted?

 - Connected successfully

Erasing selected sectors ...

 - 1033 of 1032 sectors selected, 3 ranges, 0x8000000 - 0x80FFFFF, 0x1FFF0000 - 0x1FFF001F, 0x90000000 - 0x93FFFFFF

 - 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

 - Erasing range 0x08000000 - 0x0801FFFF ( 4 Sectors, 128 KB)

 - Erasing range 0x08020000 - 0x0803FFFF ( 1 Sector, 128 KB)

 - Erasing range 0x08040000 - 0x0807FFFF ( 1 Sector, 256 KB)

 - Erasing range 0x08080000 - 0x080BFFFF ( 1 Sector, 256 KB)

 - Erasing range 0x080C0000 - 0x080FFFFF ( 1 Sector, 256 KB)

 - End of erasing sectors

 - Start of restoring

 - End of restoring

 - WARNING: Flash bank 1 disabled, skipped.

 - Start of determining flash info (Bank 2 @ 0x90000000)

 - End of determining flash info

 - Flash bank info:

 - 1024 * 64 KB @ 0x90000000

 - 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

 - Erasing range 0x90000000 - 0x9001FFFF ( 2 Sectors, 128 KB)

 - ERROR: PC of target system has unexpected value after preparing target. (PC = 0x20010220)!

---------------------------------------------------------------------- Registers -------------------------------------------------------------------------------------

   PC  = 20010220

Current: R0  = 20001EB4, R1  = 00000000, R2  = 00000000, R3  = 20010221

   R4  = 20000724, R5  = 20000744, R6  = 20000744, R7  = 00000000

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 - ERROR: Failed to initialize RAMCode

 - End of erasing sectors

 - ERROR: Erase failed

 - Start of restoring

 - ERROR: PC of target system has unexpected value after restoring target. (PC = 0x20010220)!

---------------------------------------------------------------------- Registers -------------------------------------------------------------------------------------

   PC  = 20010220

Current: R0  = 20001EB4, R1  = 00000000, R2  = 00000000, R3  = 20010221

   R4  = 20000724, R5  = 20000744, R6  = 20000744, R7  = 00000000

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 - End of restoring

 - ERROR: Failed to erase sectors

Disconnecting ...

 - Disconnected

Please don't PM on threads.

I don't have any specific experience with the Segger Debugger

You'd probably want to ponder what changed in your code or system between the time it worked and stopped working.

Software updates/installs.

Changes to code related to flash, pins, debug settings, etc.

If you had additional boards you could at least make a determination if it is a chip level issue, or a more systemic one.

See if it follows onto a second computer, using different ports, cables, etc.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..