cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407 MCO with HSE source no output

LLawr.1
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
LLawr.1
Associate II

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

View solution in original post

5 REPLIES 5

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

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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?

Actually no that is correct, I had assumed the clock setup worked the same as a different F7 target we have, where it will crash if the clock setup fails, but it is failing to start the HSE and then falling back on the HSI, I will look into that

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
Associate II

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