2023-04-03 06:40 AM
I have a project which has the requirement of BLE and USB in CDC mode. The implementation is done with the FreeRTOS. BLE and USB are working independently, but when I integrate both of them in a single project then there are some issues which are being faced mentioned below.
Microcontroller - STM32WB55VGYX
Using the BLE full stack v1.15 with the FUS v1.2.0
USB is using the PLLSAI1Q clock source with the frequency of 48MHz.
CPU2 is operating with the frequency of 32MHz.
Main core is operating at 64MHz frequency.
Solved! Go to Solution.
2023-04-12 09:39 AM
Hello,
There is an extra dot in linker script (see STM32WB55RGVX_FLASH.ld file
), line 178 :
*(.MB_MEM2);
This line should be replaced by the following line:
*(MB_MEM2);
Due to this extra dot, the buffers that need to be in SRAM2 are not placed there, so your application doesn't work. It will be corrected in the next release.
Best Regards,
Remy
2023-04-05 06:43 AM
Hello,
You can look STM32WB-BLE-USB-CDC-VCOM example available on STM32-Hotspot GitHub. This example demonstrates how to use the BLE component alongside the USB peripheral for point-to-point communications. In addition, you can look AN5289 which describes the algorithm to use USB on CPU1 (see Figure 9). The USB and RNG IPs share the same source clock. Before switching off the clock, the USB driver must first check whether the CPU2 requires the clock or not.
Best Regards
2023-04-05 07:31 AM
@Remy ISSALYS
I looked through the example code. But this is not having the FreeRTOS implementation. Whether implementing FreeRTOS cause any issues?
Secondly, semaphore SEM5 was managed in the firmware, but didn't improve the expected behavior. Currently the RNG block is not enabled/activated and I'm presuming that with this configuration the clock sharing is not possible.
2023-04-12 02:21 AM
Which IDE are you using? IAR or CubeIDE or else ....?
2023-04-12 02:25 AM
CubeIDE
2023-04-12 09:39 AM
Hello,
There is an extra dot in linker script (see STM32WB55RGVX_FLASH.ld file
), line 178 :
*(.MB_MEM2);
This line should be replaced by the following line:
*(MB_MEM2);
Due to this extra dot, the buffers that need to be in SRAM2 are not placed there, so your application doesn't work. It will be corrected in the next release.
Best Regards,
Remy