cancel
Showing results for 
Search instead for 
Did you mean: 

USB not working when MCO2 enabled and driven by PLLI2SCLK

C.East2
Associate III

The image shows my clock configuration for the STM32F469IIT. I want a 12MHz output from MCO2 and I found that I could theoretically achieve this using the PLLI2SCLK input. However, when I use this configuration, the device is not recognised by the PC via USB. I have also measured the signal using a scope and I seem to get a frequency of 6MHz. I can increase the clock speed on MCO2 to be "24MHz" and this will produce a 12MHz signal.

I won't post any code just yet as this issue may be more fundamental, but let me know if more information is needed. I hope someone can explain why this doesn't work.

I'm using an external 8MHz clock, USB FS but I am not using the I2S peripheral itself, only the clock divider and multiplexer.

0693W00000Hnmc4QAB.png

1 ACCEPTED SOLUTION

Accepted Solutions
Imen.D
ST Employee

Hi @C.East2​ ,

This issue is confirmed and an internal ticket (ID 119067) is submitted in order to fix this in the coming release of CubeMx.

(PS: Internal ticket ID 119067, this is an internal tracking number and is not accessible or usable by customers).

Thank you again for having reported the point.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

View solution in original post

7 REPLIES 7
Lubos KOUDELKA
ST Employee

Hello,

can you check your HSE crystal is really 8 MHz? Is USB working when you set your PLL parameters for 4 MHz HSE crystal?

From your description and verification using MCO this looks possible.

C.East2
Associate III

Hi @Lubos KOUDELKA​ ,

HSE crystal is definitely 8MHz.

When I select the MCO2 source to HSE, I get 8MHz. I can also use the division to achieve the correct values.

C.East2
Associate III

@Lubos KOUDELKA​ 

I've found that MX is wanting to enable the HSI in the SystemClock_Config (See image below). When I remove 'RCC_OSCILLATORTYPE_HSI' the device works. However, every time I regenerate code from MX, it appears. I can't (from the clock config diagram) where I am enabling/using the HSI. I am using the LSI for the RTC.0693W00000HnntaQAB.png

Lubos KOUDELKA
ST Employee

Yes, I just tried on my side and I can also see problem with RCC_OSCILLATORTYPE_HSI in init, I will report to our developers. Unfortunately now I don't have any easy solution for to skip RCC_OSCILLATORTYPE_HSI after STM32CubeMX re-generation, you will need to do it manually.

C.East2
Associate III

Thanks @Lubos KOUDELKA​ ,

For the time being I can assign HSI to the MCO1. This means it's being used and will not cause an error. It also means I don't have to keep deleting the code after generation. Hopefully a fix can be made.

Imen.D
ST Employee

Hello @C.East2​,

Thank you for having reported this issue.

Hi @Lubos KOUDELKA​ Thank you for bringing this post to my attention.

I added CubeMX team @Khouloud OTHMAN​ @Khouloud ZEMMELI​ in this post to review this issue.

Thanks

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Imen.D
ST Employee

Hi @C.East2​ ,

This issue is confirmed and an internal ticket (ID 119067) is submitted in order to fix this in the coming release of CubeMx.

(PS: Internal ticket ID 119067, this is an internal tracking number and is not accessible or usable by customers).

Thank you again for having reported the point.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen