Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 7 months ago.
wait till HSE is ready using mbed SDK with STM32L151
Hello,
I am trying to use the mbed SDK on a board with the STM32L151 microcontroller, named iM880A board. I exported the mbed_blinky example for the NUCLEO-L152 board to the CooCox IDE. Then, I selected the STM32L151xC microcontroller and changed the linker script (memory organization) and startup files.
The project was built and flashed successfully in the microcontroller, however, when I debug the program it keeps in "wait till HSE is ready". What could be the reason for that?
According to the NUCLEO-L152 user manual, that board includes an 8MHz crystal (X3) for the HSE oscillator. In the iM880A board, a 16MHz crystal is connected to the HSE oscillator of the STM32L151Cx. Could this difference be the cause of being waiting till HSE is ready?
How could I solve this problem?
Regards
1 Answer
8 years, 7 months ago.
On the Nucleo board, the HSE clock comes from the STLink MCU MCO as the X3 crystal is usually not mounted. Try to change the configuration from bypass to crystall and it should solve your issue.
It seems that "HSEState == RCC_HSE_OFF", thus it is always waiting till HSE is ready /* Wait till HSE is ready */ while(HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
posted by Francisco Vázquez 15 Apr 2016