cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProg stm32h7xx Option Bytes User Configuration disappears if disabled by firmware

dariis
Associate II

If on a STM32H747 the Cortex-M4 (BCM4 or BOOT_M4 Bit) is disabled by software, it is impossible to reactivate it with the STM32CubeProg v2.18.0 because the checkbox disappears in the user interface. But this happens only if you do a power cycle and reconnect to the target.

11 REPLIES 11
TDK
Guru

Unable to replicate this on a STM32H745.

What happens if you clear it using STM32CubeProgrammer instead of firmware?

If you feel a post has answered your question, please click "Accept as Solution".
dariis
Associate II

It happens with STM32CubeProg too:

reproduce_missing_BCM4.png

Hello,

I was not able to reproduce the behavior with CubeProgrammer V2.18:

mALLEm_0-1740661920721.png

- Connected to the H745 Disco board (ested also with H747 Disco board)

- Disable BCM4 in the option bytes

- Disconnect the USB cable (power cycle)

- Reconnect USB + connect with CubeProgrammer

- In the option bytes BCM4 still available.

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
mÆŽALLEm
ST Employee

What is your platform/OS?

Is that possible to uninstall and reinstall CubeProgrammer and see what happens?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Fair enough, I do not have the problem with the H747 disco board (but I did not test to write the OB by SW).

I use a custom HW and a J-Link with Linux Debian, I tried reinstall CubeProgrammer but it did not help.

So I think we keep it as it is.

Hello,

After applying the the new option byte configuration go to the device memory and read the content of the registers

FLASH_OPTSR_CUR and FLASH_OPTSR_PRG:

FLASH_OPTSR_CUR located at the address 0x5200201C 

FLASH_OPTSR_PRG located at the address 0x52002020 

mALLEm_1-1740674871397.png

For example this is a screenshot of my FLASH_OPTSR_CUR reading:

mALLEm_2-1740674955363.png

8 means the CM4 is disabled. C means CM4 is enabled.

If you find that the reading of these registers corresponds to what you set in the option bytes, this means the option byte were physically correctly set and there is something went wrong in CubeProgrammer.

 

 

 

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

So I write it by SW and it works as far as I can tell, but CubeProg hides the setting (only if CM4 boot is disabled and a power cycle has been done) in the OB tab.

BCM4_mem_read.png

PS: Did I forgot to mention that BCM4 reappears in CubeProg when I enable CM4 boot OB by SW.

Do you confirm when CM4 boot is disabled, the register contains 0x0B86AAF0 and when it is enabled it contains 0x0BC6AAF0?

I want to be sure that the bit is effectively written.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Yes