Skip to main content
cm0x4d
Associate
June 15, 2020
Solved

How to disable the M4 core on the STM32H745?

  • June 15, 2020
  • 8 replies
  • 3949 views

We have to write firmware for a STM32H745. It was not our decision to use a dual-core version and we are pretty sure that a single M7 core will easily do the trick, so the next iteration of the PCB will contain a single core variant. Now we would like to deactivate the M4 core completely. Is this possible and how can it be done?

This topic has been closed for replies.
Best answer by berendi

I think it can't be accessed through the firmware image, but STM32Cubeprogrammer can read and write option bits.

STM32_Programmer_CLI -c port=SWD -ob displ
[...]
 BCM7 : 0x1 (CM7 boot enabled)

(I have a STM32H743 so there is no BCM4 bit)

8 replies

berendi
Principal
June 15, 2020

Search for the BOOT_CM4 option bit in the reference manual.

Be careful not to disable the BOOT_CM7 bit (the bit right next to BOOT_CM4), because it might brick the MCU, or at least I don't know how to recover it then.

cm0x4d
cm0x4dAuthor
Associate
June 15, 2020

Thanks. Exactly what I need, but how can I modify the value?

Can I write directly to that location as part of the program download using SWD (and linker script) or do I have to modify it after the firmware has started?

berendi
berendiBest answer
Principal
June 15, 2020

I think it can't be accessed through the firmware image, but STM32Cubeprogrammer can read and write option bits.

STM32_Programmer_CLI -c port=SWD -ob displ
[...]
 BCM7 : 0x1 (CM7 boot enabled)

(I have a STM32H743 so there is no BCM4 bit)

cm0x4d
cm0x4dAuthor
Associate
June 15, 2020

Works like a charm.

10^6 thanks!

cm0x4d
cm0x4dAuthor
Associate
June 16, 2020

For reference, the effective command to disable the M4 is:

STM32_Programmer_CLI -c port=SWD -ob BCM4=0x0

victagayun
Senior III
November 3, 2020

Newbie here, so I mostly use CubeMX.

How to do this in CubeIDE/CubeMx?

I have H747i-disco..

cm0x4d
cm0x4dAuthor
Associate
November 3, 2020

Unfortunately you can not do this using CubeIDE nor CubeMX.

You need to download the STM32CubeProgrammer.

No fear though - it has an UI too where you can modify these option bits.

victagayun
Senior III
November 3, 2020

As I am not quite sure what would happen if I disable CM4 as shown below,

https://raw.githubusercontent.com/MaJerle/stm32h7-dual-core-inter-cpu-async-communication/master/docs/option_bytes.png

I have not done it yet.

I would like to know what would happen if I use CubeIDE/CubeMX after disabling CM4?