Skip to main content
john doe
Senior III
July 13, 2017
Solved

Bypass config for L476RGNucleo crashes

  • July 13, 2017
  • 2 replies
  • 737 views
Posted on July 13, 2017 at 02:31

Cannot get HSE Bypass to work for L476 Nucleo board, when 446RE Nucleo and F103RB Nucleo work fine.

this stm32cubemx generated code spins in the _Error_Handler. Im thinking a bug in stm32l4xx_hal_rcc.c so far.

  RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE|RCC_OSCILLATORTYPE_LSE;

  RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS;

  RCC_OscInitStruct.LSEState = RCC_LSE_ON;

  RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;

  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;

  RCC_OscInitStruct.PLL.PLLM = 1;

  RCC_OscInitStruct.PLL.PLLN = 20;

  RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV7;

  RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2;

  RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2;

  if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)

  {

    _Error_Handler(__FILE__, __LINE__);

  }
    This topic has been closed for replies.
    Best answer by Kraal
    Posted on July 13, 2017 at 11:29

    Hi,

    Have you verified that the MCO from the ST-Link is coming to the L476 ? Depending on the board the bridges are not always the same default. So the L476 might be spinning in the error handler because it cannot 'see' the clock at all on its pin.

    2 replies

    john doe
    john doeAuthor
    Senior III
    July 13, 2017
    Posted on July 13, 2017 at 02:32

    l4_cube 1.8.1 and cubemx4.2.2

    KraalBest answer
    Senior III
    July 13, 2017
    Posted on July 13, 2017 at 11:29

    Hi,

    Have you verified that the MCO from the ST-Link is coming to the L476 ? Depending on the board the bridges are not always the same default. So the L476 might be spinning in the error handler because it cannot 'see' the clock at all on its pin.

    john doe
    john doeAuthor
    Senior III
    July 13, 2017
    Posted on July 13, 2017 at 19:38

    0690X00000607ajQAA.png