2022-04-14 04:48 PM
I developed a stm32 project for the Nucle-H745ZIQ board with stm32cube ide, there's no issue downloading the code from IDE using its debugger. However, when I tried to download with stm32cube programmer, the code doesn't run (no expected actions can be observed on the board) after the download even though the cube programmer shows "download/verify successfully" and the "Device memory" tab shows data have been written to memory address. It doesn't happen every time, but it happens.
The ide version is 1.6.1, programmer version is 2.8. The connection is "ST-LINK", Port is "SWD", Mode I tried "Hot plug" and "Under reset". And I tried both .hex and .bin generated from IDE, the problem could not get fixed.
A brand new board is more likely to have this issue, no .hex file can run on board as expected by downloading from cube programmer. A workaround is to program the new board with CUBE IDE once, then it's less like to have this issue for this particular board while programming with CUBE programmer.
Can someone explain this and tell how this can be avoid?
Thanks.
Solved! Go to Solution.
2022-04-19 07:17 PM
Hi guys, this problem was solved. For dual-core device like the STM32H745 I used, you have to program two separate hex files (one for CM4, the other for CM7) with CUBE PROGRAMMER. You won't find this trick if you keep using CUBE IDE, because the IDE takes care of two hex files internally, you only run the debugger of CM7 to get them both work. Thus it looks like the CM7.hex has included all the code in CM4.hex.
2022-04-14 04:57 PM
> the code doesn't run (no expected actions can be observed on the board)
Perhaps BOOT0 is held high or (more likely) the relevant option bytes which override this and set the user code address are incorrect. Or it's running user code but is hung up in initialization somewhere. You can attach a debugger to the already running board to check.
If it says programming and verification worked, it probably programmed the board successfully.
2022-04-14 06:12 PM
Might want to power cycle, the H7 latches states at power-up, and regular reset won't overcome them, and it will always go into the ROM loader, and not the FLASH code.
2022-04-14 07:17 PM
Power cycle doesn't work. BOOT0 is tied low, this is hardware circuit on the Nucleo board, nobody changed it.
It seems like CUBE IDE did something extra in configuration while downloading, so it works fine every time. And CUBE Programmer doesn't do this extra configuration (not change it either), so it only works after the board is previously programmed by IDE.
2022-04-19 07:17 PM
Hi guys, this problem was solved. For dual-core device like the STM32H745 I used, you have to program two separate hex files (one for CM4, the other for CM7) with CUBE PROGRAMMER. You won't find this trick if you keep using CUBE IDE, because the IDE takes care of two hex files internally, you only run the debugger of CM7 to get them both work. Thus it looks like the CM7.hex has included all the code in CM4.hex.