Skip to main content
VChou.1
Visitor II
February 17, 2020
Question

I am working with STM32F407VGt6-DISC1, I am facing a problem in getting LSE clock frequency out of MCO1 pin, and also other external source of clock whereas the same process for internal clock measurement through i worked fined.

  • February 17, 2020
  • 1 reply
  • 1012 views

Here i attached my main.c file.

and

When I run my debugger , i see that my program is stucked in error handler

//////////

if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)

{

_Error_Handler(__FILE__, __LINE__);

}

//////////

And for measuring internal clock sources such as HSI, HSE. it worked fine but whenever i include LSE source :it stuck in error_handler

///////////////

RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_HSE

|RCC_OSCILLATORTYPE_LSE;

//////

This topic has been closed for replies.

1 reply

waclawek.jan
Super User
February 17, 2020

The 32.768kHz crystal is not mounted on the F4-DISCO by default, did you get one? You need also to add the related capacitors and disconnect/connect some solder bridges according to the DISCO's User Manual.

JW