Skip to main content
juvann
Associate III
January 8, 2023
Solved

STM32WB55 enable IPCC chage clock and broken usb

I'm generating code with STM32CubeIde 1.11.0 for a STM32WB55, in my test project there is an USB CDC and BLE is enabled.

When I enable BLE also IPCC must be enabled, but after HW_IPCC_Init is called usb clock is wrong so my usb device doesn't work anymore.

The specific function which corrupt the clock is HAL_NVIC_EnableIRQ(IPCC_C1_RX_IRQn)

I have error on my linux: usb 1-2: Device not responding to setup address.

Is there a solution?

This topic has been closed for replies.
juvann
juvannBest answer
Associate III
January 10, 2023

I solved following this thread where the user KMuel reccomend to call this function:

LL_HSEM_1StepLock( HSEM, 5 );

so CPU2 can't disable USB 48MHz.

I expected cubemx to generate this code.

4 replies

Ghofrane GSOURI
ST Technical Moderator
January 10, 2023

Hello @juvann​ 

First let me thank you for posting .

It sounds like there may be an issue with how you are initializing the IPCC (Inter-Processor Communication Controller) and the USB CDC on the STM32WB55.

It's important to note that the IPCC is used to communicate between the Cortex-M4 and Cortex-M0+ cores on the STM32WB55.

Enabling the IPCC will likely impact the clocks for the Cortex-M4 core, which could be causing the problem with the USB CDC.

One possible solution would be to ensure that the USB clock is properly configured and enabled before calling the IPCC initialization functions. Additionally, you could check the clock configuration settings for the USB peripheral to make sure they are correct.

It's also good to check and make sure that both the Cortex-M4 and Cortex-M0+ cores are configured and enabled correctly, and that they are running at the correct clock speeds.

Another thing you could check is, if possible, try the same operation without enabling BLE. if the problem persists, it is most likely that problem is on the clock configuration, not on the BLE.

NB: For the USB CDC, it is important to configure the USB clock to the correct frequency, typically 48 MHz This clock is derived from the system clock, so it is also important to ensure that the system clock is configured to the correct frequency as well.

Thx

Ghofrane

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.
juvann
juvannAuthor
Associate III
January 10, 2023

Hello Ghofrane,

thank you for your reply. I already tried to disable BLE and when USB start cdc acm works very well.

When BLE call this function HAL_NVIC_EnableIRQ(IPCC_C1_RX_IRQn) usb stop to work.

juvann
juvannAuthorBest answer
Associate III
January 10, 2023

I solved following this thread where the user KMuel reccomend to call this function:

LL_HSEM_1StepLock( HSEM, 5 );

so CPU2 can't disable USB 48MHz.

I expected cubemx to generate this code.