2022-10-17 02:47 PM
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?
Solved! Go to Solution.
2022-10-17 04:38 PM
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
2022-10-17 03:12 PM
Check the HSE ON, RDY, BYPASS bits in RCC peripheral
2022-10-17 04:05 PM
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?
2022-10-17 04:17 PM
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
2022-10-17 04:35 PM
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
2022-10-17 04:38 PM
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