2021-02-04 06:40 PM
Hello,
I have a custom PCB using a STM32WB35CCU6A that I'm trying to get Bluetooth up and running. I'm using the latest firmware available at this time: "STM32Cube_FW_WB_V1.10.1".
I've been unable to get CPU2 to initialize from my STM32CubeIDE project. When I set breakpoints in `APPE_SysStatusNot`and `APPE_SysUserEvtRx` from `app_entry.c` the former is the only one that is called. Looking in STM32CubeProgrammer it appeared my wireless stack was not running.
I followed UM2550 section 5: when I get to "Download new wireless stack" I get the following error:
The Copro Binaries do not list this 256K chip in the binary tables; I'm assuming the FUS address is 0x0803A00, and BLE_Stack_full_fw 0x800B000, it's possible I'm not using the correct address for the BLE stack.
Solved! Go to Solution.
2021-02-16 08:25 AM
OK. You have the most recent FUS version. This is good. Now you need to program the M0+ FW (RF stack).
The error is resulting from the fact that you try to start the wireless stack though it is not installed.
Select the BLE stack = stm32wb3x_BLE_Stack_full_fw.bin file here under this directory: STM32Cube_FW_WB_V1.10.0\Projects\STM32WB_Copro_Wireless_Binaries\STM32WB3x.
Once it is programmed, the SFSA value should be different from 0xF4.
Then select one application among those proposed: BLE_p2pserver for example and download it at address 0x08000000.
When the application is programmed, you can remove the connector CN5-CN7 and reset the board.
A small LED should be blinking.
You can use the BLE sensor Android application on your mobile to detect your board and connect to it.
2021-02-15 11:55 AM
For the 256K chip, the FUS is not located in the user area but somewhere higher in the memory not being accessible.
So you should be able to load the RF stack being 40 sectors big at address 0x08040000 - 0x29000 = 0x8017000.
But I don’t expect this to be the reason of the failure.
Now could you show me the option bytes?
2021-02-16 08:01 AM
2021-02-16 08:25 AM
OK. You have the most recent FUS version. This is good. Now you need to program the M0+ FW (RF stack).
The error is resulting from the fact that you try to start the wireless stack though it is not installed.
Select the BLE stack = stm32wb3x_BLE_Stack_full_fw.bin file here under this directory: STM32Cube_FW_WB_V1.10.0\Projects\STM32WB_Copro_Wireless_Binaries\STM32WB3x.
Once it is programmed, the SFSA value should be different from 0xF4.
Then select one application among those proposed: BLE_p2pserver for example and download it at address 0x08000000.
When the application is programmed, you can remove the connector CN5-CN7 and reset the board.
A small LED should be blinking.
You can use the BLE sensor Android application on your mobile to detect your board and connect to it.
2021-02-16 09:53 AM
These are the settings I used to update on my new chip:
I get a Warning after flashing: "Warning: Connection to device 0x495 is lost", I attached the log.
After reconnecting to the DFU device this is what I see for my option bytes:
I then downloaded "STM32Cube_FW_WB_V1.10.1\Projects\P-NUCLEO-WB55.USBDongle\Applications\BLE\BLE_p2pServer\Binary\BLE_p2pServer_reference.hex" to the device at 0x08000000 and removed my BOOT0 jumper. When I start the device I see my green and blue LED (PB0, PB1) turn on, after another hardware reset I can see a device called "P2PSRV1" in the ST BLE Sensor app.
I also tested my project, it does not show up in the Android app and I see the same behaviour as before.
This BLE_p2pServer does not appear to open in STM32CubeIDE, I'd like to debug `APPE_SysStatusNot`and `APPE_SysUserEvtRx`.
2021-02-16 10:51 AM
Seeing the P2PSRV1 name in the ST BLE sensor application shows your board was properly programmed and is working fine.
Now the issue is in your application. No name may mean you did not use /create a name in your application.
Look ath the app_ble.c file under STM32Cube_FW_WB_V1.10.0\Projects\P-NUCLEO-WB55.Nucleo\Applications\BLE\BLE_p2pServer\STM32_WPAN\App. This file contains the definition of the local_name variable which is then used in the aci_gap_set_discoverable function to start the advertizing phase.
Do you see a device with no name but a mac address appearing on your mobile screen when you turn the board on?
What kind of application are you trying to build?
You should mimic what is done in the BLE_p2pserver application especially the release of the CPU2 to boot on the RF FW.
>This BLE_p2pServer does not appear to open in STM32CubeIDE
Go to STM32Cube_FW_WB_V1.10.0\Projects\P-NUCLEO-WB55.Nucleo\Applications\BLE\BLE_p2pServer\STM32CubeIDE and click on .cproject icon. The project should open in CubeIDE.
2021-02-16 02:24 PM
I was able to open the .cproject into my existing workspace and build from source. I started a new project targeting STM32WB35CCUXA and added chunks of code from BLE_p2pServer until I was able to see my device from the BLE sensor app. I had to change the RAM_SHARED ORIGIN from 0x20008000 to 0x20030000 for this code to work properly.
I can now use Bluetooth on my board design from my own source project.
2021-02-17 06:04 AM
Indeed the STM32WB3x Linker file generated by CubeMX tool has an invalid Ram_Shared address.
RAM_SHARED is set to 0x20008000 while it must be 0x20030000.
This will be corrected in the next STM32CubeIDE (which embeds CubeMX tool) , Version: 1.6.0.