cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable the M4 core on the STM32H745?

cm0x4d
Associate III

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?

1 ACCEPTED SOLUTION

Accepted Solutions
berendi
Principal

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)

View solution in original post

8 REPLIES 8
berendi
Principal

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
Associate III

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
Principal

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)

Works like a charm.

10^6 thanks!

cm0x4d
Associate III

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

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

victagayun
Senior III

Newbie here, so I mostly use CubeMX.

How to do this in CubeIDE/CubeMx?

I have H747i-disco..

cm0x4d
Associate III

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

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?