Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


Flash write failed when connecting to STM32H753IIK

Noticed one difference.

The device successfully flashed is “Device ID Y” (found on Nucleo).
The device not-successfully flashed is, “Device ID X” (new revision).

Refer “STM32H750xB and STM32H753xI Errata sheet (ES0396 Rev 4)”.
I suspect that we may need different flash writing procedure between the two device revisions...

Regards,
Atsushi

Hello,

Indeed, H7xx rev X needs an update for flash writing, a new version will be available soon to correct this.

Rgds,
Laurent

Hi Laurent,

Thank you for your reply! Before reading the reply, I think I found a possible solution.

In OpenOCD source code src/flash/nor/stm32h7x.c, I added the following line.

target_write_u32(target, stm32x_get_flash_reg(bank, FLASH_CR), FLASH_PG);

just prior calling “target_run_flash_async_algorithm()”.

By the change, the problem looks resolved.

I’m not sure if this is the case and why revision Y doesn’t complain about PG bit.

Once again, thank you for your attention.

Regards,
Atsushi

I found assembly code stm32h7x.S is actually setting PG bit as following.

define STM32_CR_PROG 0x00000032 /* PSIZE64 | PG */
// ...
mov r6, #STM32_CR_PROG
str r6, r4, #STM32_FLASH_CR_OFFSET

I’m confused.

I’m waiting for an analysis by specialists.

Regards,
Atsushi

Hello,

The issue was not with the PG bit but more with the QW bit when polling the programming status.
You can try the latest version SW4STM32 V2.8.0.
It includes the correction and should work now on all H7 revisions.

Rgds,
Laurent

Hi Laurent,

Thank you for the update. I will try the latest version ASAP.

Regards,
Atsushi

Hi Laurent,

Confirmed that SW4STM32 v2.8 (Windows version) could flash rev X of STM32H753. Thank you for your support!

Regards,
Atsushi