Hello,
This is a problem that i have posted on the segger forum already and we found out, that this problem seems not to be a segger problem.
Reason: It occurs only if i use the setting "use debug driver" to flash the microcontroller. The segger tools are wroking perfectly.
Now the problem:
I'm using a Jlink Plus, HW V9.10, DLL V5.02h, FW J-Link V9 compiled Oct 9 2015 20:34:47 on Keil MDK-Arm 4.74 and 5.17
Problem: The Debug Adapter fails to erase the second megabyte of the STM32F429 flash. A verify after an erase/program cycle fails. This does not occur when i erase the whole chip!
My Software contains a Bootloader and the real firmware. Both programs are different Keil Projects. The address of the Bootloader is 0x0800_0000 - 0x0800_7FFF.
When i use the Firmware Project, than i won't overwrite the already existing Bootloader. So i have configured the debug Adapter settings inside Keil MDK to use a address range from 0x0800_8000 - 0x081F_FFFF for flash operations.
My second Debug Adapter (Keil ULINK Pro) works perfectly in this Situation!
The Output of the Debug Adapter is:
* JLink Info: Device "STM32F429II" selected.
JLink info: ------------ DLL: V5.02h, compiled Oct 29 2015 19:04:05 Firmware: J-Link V9 compiled Oct 9 2015 20:34:47 Hardware: V9.10 S/N : xxxxxxxxx Feature(s) : RDI, FlashBP, FlashDL, JFlash, GDB
* JLink Info: Found SWD-DP with ID 0x2BA01477 * JLink Info: Found SWD-DP with ID 0x2BA01477 * JLink Info: Found Cortex-M4 r0p1, Little endian. * JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots * JLink Info: CoreSight components: * JLink Info: ROMTbl 0 @ E00FF000 * JLink Info: ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB00C SCS * JLink Info: ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 003BB002 DWT * JLink Info: ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB * JLink Info: ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 003BB001 ITM * JLink Info: ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 000BB9A1 TPIU * JLink Info: ROMTbl 0 [5]: FFF42000, CID: B105900D, PID: 000BB925 ETM ROMTableAddr = 0xE00FF003
Target info: ------------ Device: STM32F429II VTarget = 3.330V State of Pins: TCK: 0, TDI: 1, TDO: 0, TMS: 1, TRES: 1, TRST: 1 Hardware-Breakpoints: 6 Software-Breakpoints: 8192 Watchpoints: 4 JTAG speed: 12000 kHz
Erase Done. Programming Done. Contents mismatch at: 08100000H (Flash=00H Required=80H) ! Contents mismatch at: 08100001H (Flash=20H Required=A0H) ! Contents mismatch at: 08100003H (Flash=00H Required=D3H) ! Contents mismatch at: 08100004H (Flash=00H Required=4AH) ! Contents mismatch at: 08100006H (Flash=00H Required=F3H) ! Contents mismatch at: 08100007H (Flash=23H Required=ABH) ! Contents mismatch at: 08100009H (Flash=00H Required=E1H) ! ... and so on
Thank you Martin
Hi (again),
I don't know why, but i have recompiled the flash driver (STM32F4xx_2048.FLM) on both compilers, and now it works for me. Is it possible that the sourcecode for the driver does not fit to the delivered .FLM file?
Martin
The size of the STM32F4xx 2MB Flash algorithm is (STM32F4xx_2048.FLM) is 0x0020 0000. The address range mentioned would be 8000 over. Maybe reloading the algorithm into uVision reset the range back to its default? I would check the range, again.