Skip to main content
cm0x4d
Associate
Jun 15, 2020 7:15 AM UTC
Solved

How to disable the M4 core on the STM32H745?

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.
berendi
berendiBest answer
Principal
Jun 15, 2020 9:28 AM UTC

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
Jun 15, 2020 8:06 AM UTC

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
Jun 15, 2020 8:36 AM UTC

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
Jun 15, 2020 9:28 AM UTC

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
Jun 15, 2020 11:57 AM UTC

Works like a charm.

10^6 thanks!

cm0x4d
cm0x4dAuthor
Associate
Jun 16, 2020 2:29 PM UTC

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

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

victagayun
Senior III
Nov 3, 2020 12:53 PM UTC

Newbie here, so I mostly use CubeMX.

How to do this in CubeIDE/CubeMx?

I have H747i-disco..

cm0x4d
cm0x4dAuthor
Associate
Nov 3, 2020 1:55 PM UTC

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
Nov 3, 2020 4:37 PM UTC

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?