2019-06-14 12:19 PM
I am using STM32Cube FW_WB V1.1.1 and built a new project.
I have programmed stm32wb5x_BLE_Stack_fw.bin into the memory space for CPU2 (0x80CB000).
I have added the following interrupt handlers:
void IPCC_C1_TX_IRQHandler(void)
{
HW_IPCC_Tx_Handler();
return;
}
void IPCC_C1_RX_IRQHandler(void)
{
HW_IPCC_Rx_Handler();
return;
}
I have configured STM32_WPAN as follows:
My small application runs fine but I get no indication that the BLE is running at all. I am using ST BLE Sensor to scan but do not see my device.
Any pointers on where to look or what to check would be greatly appreciated.
-Louis
Solved! Go to Solution.
2019-06-28 06:23 AM
2019-06-17 08:54 AM
I see that the Release Notes for STM32WB Copro Wireless Binaries actually say to program stm32wb5x_BLE_Stack_fw.bin at 0x080CC000 so I have made that change. I am still not seeing any BlueTooth activity.
-Louis
2019-06-17 09:30 AM
I am using STM32CubeProgrammer v2.1.0 to program the Copro Wireless Binaries. Is it required that I use the command line interface, STM32_Programmer_CLI.exe, via the on-chip USB port? Is it possible to use ST-Link connected to JTAG on my custom board?
Thanks.
-Louis
2019-06-17 12:51 PM
Moving on.
I now have STM32_Programmer_CLI.exe connected to my custom board using UART1. Now I am getting the "firmware not authentic" error message and can't seem to program the new stm32wb5x_FUS_fw.bin file.
Here is the last part of the attempt.
2019-06-17 02:03 PM
Ok, I am past this now. I used STM32CubeProgrammer to select all sectors and then Erase selected sectors. Full chip erase did not work. Once this was done the "firmware not authentic" error disappeared.
I now get:
0x20030030 : 01000200 (as expected)
2019-06-19 09:31 AM
I am still not having any luck getting to the advertising state.
I have used the bootloader to program stm32wb5x_BLE_Stack_fw.bin at 0x080CC000. I believe that FUS and the BLE stack are both properly programmed.
I have included the call to SCH_Run(~0) in my main while(1) loop.
My program never hits APPE_SysUserEvtRx().
C2BOOT is set to 0x1 when I break in my while(1) loop.
Here are the settings from my Security Configuration Option Bytes:
Any ideas on what to check next would be greatly appreciated.
-Louis
2019-06-28 06:00 AM
My board is finally working. To get it there I had to add the following code along with the two IPCC IRQ handlers.
/**
* @brief This function handles RTC wake-up interrupt through EXTI line 19.
*/
void RTC_WKUP_IRQHandler(void)
{
/* USER CODE BEGIN RTC_WKUP_IRQn 0 */
/* USER CODE END RTC_WKUP_IRQn 0 */
HAL_RTCEx_WakeUpTimerIRQHandler(&hrtc);
/* USER CODE BEGIN RTC_WKUP_IRQn 1 */
/* USER CODE END RTC_WKUP_IRQn 1 */
}
2019-06-28 06:23 AM
I had missed this step:
Works great now.
2019-07-28 05:24 AM
Hello,
@STM: I would like to remind, that month has passed and problem is still present on STM32Cube FW_WB.
According to the STM's workshop presentation, there is an information, that WPAN middleware handles IPCC and HSEM, but apparently not...
For further newbie developers like me: keep in mind, that you have to add IPCC_C1_TX_IRQHandler and IPCC_C1_TX_IRQHandler definitions manually, make all steps which were described by Louis and remember to make sure, that you have SCH_Run(~0) in your main while loop. You will save lot of time.
@STM: Can we expect some fixes or changes for STM32Cube FW_WB in the near future?
Thank you in advance.
Regards
2019-07-28 07:53 AM
I have also found 2 more things that caused me a great deal of lost time.
We designed a custom board using the same STM32WB55CG that the Nucleo dongle uses and experienced very erratic behavior. Our board would come up and advertise for less than a second and then we would see no further activity on the bluetooth core. The problem ended up being our antenna circuitry. If you are designing a custom board, you really need some expertise in that area or a great deal of luck.
The second issue that caused me some grief was really odd behavior with my IAR IDE when using the #pragma pack(1). The tools did not give me a warning or error but I would mysteriously get a hard fault when executing my code. IAR apparently does not support that pragma and fortunately there are other methods to accomplish this needed behavior.
Good luck.