STM32G0B1RE output clock
Hello everyone and thank you for taking the time to read my post.
The problem I'm encountering is regarding the configuration of MCO.
I configured MCOSEL and MCOPRE to use PLLRCLK with a 1 prescaler value. The PLLR clock is configured with a frequency of 64 MHz.
I also activated GPIOAEN in RCC registers and configured PA8 for alternate function 0, push&pull, no push, no pull, low speed and i dont get the clock at all. If i connect an oscilloscope to a pin direclty touching SB17 on the board, i can see the rectangular signal and its generated well, but when I try using PA8 it doesn't work. I have connected a GND referencec to the oscilloscope as well.
For reference, I will leave here the snippet of code:
static void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
/* USER CODE BEGIN MX_GPIO_Init_1 */
/* USER CODE END MX_GPIO_Init_1 */
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOA_CLK_ENABLE();
/*Configure GPIO pin : PA8 */
GPIO_InitStruct.Pin = GPIO_PIN_8;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF0_MCO;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/* USER CODE BEGIN MX_GPIO_Init_2 */
/* USER CODE END MX_GPIO_Init_2 */
}
