cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_SYSTICK_Callback is not called in STM32F746 Discovery

LMI2
Lead
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.
4 REPLIES 4
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);

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

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.

Posted on October 18, 2017 at 23:26

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6tS&d=%2Fa%2F0X0000000bxV%2FUjHTqL.3pZ8PZ6ZSRsvdWioj90Dn0yxGyMRGeLPUrBM&asPdf=false