Skip to main content
LMI2
Senior III
October 18, 2017
Question

HAL_SYSTICK_Callback is not called in STM32F746 Discovery

  • October 18, 2017
  • 1 reply
  • 1478 views
Posted on October 18, 2017 at 02:02

 

 

The original post was too long to process during our migration. Please click on the attachment to read the original post.
    This topic has been closed for replies.

    1 reply

    Vangelis Fortounas
    Associate II
    October 18, 2017
    Posted on October 18, 2017 at 14:49

    Hello!

    systick initialized inside HAL_Init function with HSI as clock source.

    Your code stops HSI , so Systick stops.

    You need to reinitialize Systick , after SystemClock_Config again.

    HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/1000); HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK);

    LMI2
    LMI2Author
    Senior III
    October 18, 2017
    Posted on October 18, 2017 at 17:49

    Yes, there is

     RCC_OscInitStruct.HSEState = RCC_HSE_ON;
     RCC_OscInitStruct.HSIState = RCC_HSI_OFF;�?�?

    In my code, but isn't HSE, the external clock, running. Why doesn't timer tick work with external, high precision, crystal clock.

    I went backwards fromHAL_Init function, but did not find anything about HSI or HSE. What did I miss?

    I made these changes, but it did not help. I have also tried HSE_ON/OFF and HSI_ON/OFF

    HAL_Init();
     /* Configure the System clock to have a frequency of 216 MHz */
    SystemClock_Config();
    HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/1000); 
    HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK);
    HAL_StatusTypeDef HAL_DeInit();
    HAL_ResumeTick();
    MX_ADC1_Init();
    �?�?�?�?�?�?�?�?

    With thanks

    Leif M

    Vangelis Fortounas
    Associate II
    October 18, 2017
    Posted on October 18, 2017 at 21:19

    hello!

    I went backwards from HAL_Init function, but did not find anything about HSI or HSE.

    After Reset the default clock source for Systick is HSI.

    HAL_StatusTypeDef HAL_DeInit(); 

    This function call, resets all peripherals and stops  HAL's time base.