cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G0B1 and MCO pin

Peaga
Senior

Hello!

I'm working with STM32G0B1 MCU and using CubeMX, I've enabled RCC_MCO for PA9 pin (HSI 16 source, 128 as prescaler) and a simple Input for PA8 pin. The code was generated to CubeIDE and "SystemClock_Config" function calls this method at the end:

 

HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSI, RCC_MCODIV_128);

 

But I noticed that both PA9 and PA8 outputs 0.125 MHz, even "MX_GPIO_Init" function setting correctly the pins!

Searching on HAL files, I found that "RCC_MCO1" defines to "RCC_MCO_PA8", so CubeMX should config MCO as "RCC_MCO_PA9".

Can we confirm this as a bug?

1 ACCEPTED SOLUTION

Accepted Solutions
Amel NASRI
ST Employee

Hi @Peaga ,

Reported issue is fixed with STM32CubeMX 6.12.0, already available for use.

-Amel

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.

View solution in original post

4 REPLIES 4
Amel NASRI
ST Employee

Hi @Peaga,

Based on the description of HAL_RCC_MCOConfig, first parameter should have one of following values:

  • RCC_MCO_PA8 Clock source to output on MCO1 pin(PA8)
  • RCC_MCO_PA9 Clock source to output on MCO1 pin(PA9)
  • RCC_MCO_PD10 Clock source to output on MCO1 pin(PD10)
  • RCC_MCO_PF2 Clock source to output on MCO1 pin(PF2)
  • RCC_MCO_PA10 Clock source to output on MCO2 pin(PA10)
  • RCC_MCO_PA15 Clock source to output on MCO2 pin(PA15)
  • RCC_MCO_PB2 Clock source to output on MCO2 pin(PB2)
  • RCC_MCO_PD7 Clock source to output on MCO2 pin(PD7)

Could you please try replacing RCC_MCO1 by RCC_MCO_PA9?

I look forward for the result of this test on your side before making internal request for the fix.

-Amel

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.

Hello @Amel NASRI 

Yes, replacing RCC_MCO1 by RCC_MCO_PA9 solves the issue. Tested.

Thank you

Hi @Peaga ,

Thanks for your confirmation.

I reported this issue to development team.

Internal ticket number: 178119 (This is an internal tracking number and is not accessible or usable by customers).

-Amel

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.

Amel NASRI
ST Employee

Hi @Peaga ,

Reported issue is fixed with STM32CubeMX 6.12.0, already available for use.

-Amel

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.