Skip to main content
MRebo.2
Associate II
April 25, 2022
Solved

How I Program the CPU2 memory area using STM32CubeProgrammer?

  • April 25, 2022
  • 3 replies
  • 3069 views

I'm trying to understand how I program the BLE Stack and FUS in the CPU2 of STM32WB55G (1Mb). When I use the binary available of ST repositoy, in default mode I program the "stm32wb5x_BLE_Stack_full_fw.bin" in address started 0x08000000, but in the release_note that is available of ST repository, it's show us that the binary needs program in address started 0x080D0000:

0693W00000LyyeUQAR.png 

When I program with this configuration and also program the "BLE_Ota", the application works (I can see the device in the app "ST BLE SENSOR"). But I didn't understand like it works, because the BLE_Ota start address in the 0x08000000 and it's overwrite the program previous (stm32wb5x_BLE_Stack_full_fw.bin), right?

0693W00000LyyigQAB.pngI did any tests: I Followed the video "STM32WB Getting Started Series: Part 7, Over-the-Air (OTA)" for understand the construction of memory, I understood that the memory of CPU 1 is 0x0800000 until 0x080CB000 and CPU 2 is 0x080CB000 until 0x080FFFFF:

0693W00000LyyhsQAB.pngSo, when I try to read the memory of 0x080CB000, I get this message in STM32CubeProgrammer:

0693W00000LyygkQAB.pngBut, if I try read one byte less, it's works:

0693W00000LyygQQAR.pngWith these tests, I can understand that the STM32CubeProgrammer cannot read CPU 2. How did the firmware "stm32wb5x_BLE_Stack_full_fw.bin" go to CPU 2 and did the application work? How do I read or write to CPU 2 by STM32CubeProgrammer?

This topic has been closed for replies.
Best answer by Remy ISSALYS

Hello,

You can look this wiki page which talk about how to setup your board and explain the procedure to upgrade the FUS and the wireless stack:

https://wiki.st.com/stm32mcu/wiki/Connectivity:STM32WB_BLE_Hardware_Setup

The address in the release note is the optimal address for flashing the wireless stack, so it advise to follow it. The SFSA option bytes correspond to the secure start address for the Flash memory and it's not possible to read the flash secure part.

Best Regards

3 replies

Remy ISSALYS
Remy ISSALYSBest answer
ST Technical Moderator
April 26, 2022

Hello,

You can look this wiki page which talk about how to setup your board and explain the procedure to upgrade the FUS and the wireless stack:

https://wiki.st.com/stm32mcu/wiki/Connectivity:STM32WB_BLE_Hardware_Setup

The address in the release note is the optimal address for flashing the wireless stack, so it advise to follow it. The SFSA option bytes correspond to the secure start address for the Flash memory and it's not possible to read the flash secure part.

Best Regards

MRebo.2
MRebo.2Author
Associate II
April 26, 2022

Thanks Remy! This worked! Now the stack BLE and FUS are updates and if I pass any code with app BLE in the CPU 1, It's works.

I think that in my case worked because the stack BLE was in CPU 1 (CORTEX M4), right?

Remy ISSALYS
ST Technical Moderator
April 28, 2022

Hello,

CPU1 can't decrypt the BLE stack, maybe you have done a wrong manipulation.

Best Regards