Skip to main content
LLawr.1
Associate II
October 17, 2022
Solved

STM32F407 MCO with HSE source no output

I am using an 8MHz crystal HSE, and the application (MBED) is able to use CAN, USB, UART, etc properly, so the timing for the HSE is setup correctly. When I try to use the HSE as a source for MCO1 or MCO2 however, it does not work, I get no output. If I use the HSI on MCO1 or the PLLCLK on MCO2, I get the expected frequencies, but nothing on HSE. I am using an ABM3B-8.000MHZ-10-1-U-T (10pF) crystal with 15pF load caps, is that relevant at all?

This topic has been closed for replies.
LLawr.1
LLawr.1Best answer
Associate II
October 17, 2022

HSE was in fact not starting and falling back to HSI without a crash as I was accustomed to with other STM targets using MBED. Changed the load capacitors to 10pF from 15pF and it started. Not sure why that would be an issue now as I have other products using F7 MCUs with the same crystal and 15pF caps. MCO works correctly now

5 replies

Tesla DeLorean
Guru
October 17, 2022

Check the HSE ON, RDY, BYPASS bits in RCC peripheral

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
LLawr.1
LLawr.1Author
Associate II
October 17, 2022

int main()

{

    RCC_OscInitTypeDef config;

    HAL_RCC_GetOscConfig(&config);

    printf("$INFO: %d\r\n", config.HSEState);

}

That code gives me a result of 0, which makes no sense because the rest of the program works fine, and it would not work at all if that was true. Am I checking that correctly?

waclawek.jan
Super User
October 17, 2022

Have you set the MCO pin to AF in its respective GPIOx_MODER?

Read out and check/post content of RCC and relevant GPIO registers.

JW

LLawr.1
LLawr.1AuthorBest answer
Associate II
October 17, 2022

HSE was in fact not starting and falling back to HSI without a crash as I was accustomed to with other STM targets using MBED. Changed the load capacitors to 10pF from 15pF and it started. Not sure why that would be an issue now as I have other products using F7 MCUs with the same crystal and 15pF caps. MCO works correctly now