Author Topic: STM32F4Discovery stucks in SysTick_Handler  (Read 708 times)

0 Members and 1 Guest are viewing this topic.

Offline syntax333Topic starter

  • Regular Contributor
  • *
  • Posts: 158
  • Country: 00
STM32F4Discovery stucks in SysTick_Handler
« on: January 20, 2020, 04:54:19 am »
Hi, I got a STM32F4Discovery(stm32f407vgt6) kit which I use to compute some matrix multiplication. It computes matrices perfectly (took approx. 80us) but after computing 12 times it stucks in that function. When I stop debugging I see that it stucks in:

"startup_stm32f407xx.s" line

      SysTick_Handler PROC
                     EXPORT  SysTick_Handler            [WEAK]
This line  >>  B       .
                     ENDP

I tried a program which switches LED on/off. However, after some time stm32 stucks at same place no matter the code. Has anyone encountered this type of problem?

I am using Keil uvision to create my projects template etc. 
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2034
  • Country: au
Re: STM32F4Discovery stucks in SysTick_Handler
« Reply #1 on: January 20, 2020, 05:16:43 am »
Do you have a SysTick_Handler function in C or asm?

else maybe a watchdog?

 

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: STM32F4Discovery stucks in SysTick_Handler
« Reply #2 on: January 20, 2020, 09:13:05 am »
.
« Last Edit: August 19, 2022, 02:44:24 pm by emece67 »
 

Offline syntax333Topic starter

  • Regular Contributor
  • *
  • Posts: 158
  • Country: 00
Re: STM32F4Discovery stucks in SysTick_Handler
« Reply #3 on: January 20, 2020, 04:46:25 pm »
I was able to disable it with "SysTick->CTRL = 0; ". However, I got a question is SysTick counter or interrupt important to clock/stm32 functions or project? is it essential? What do I lose disabling it?
« Last Edit: January 20, 2020, 04:51:29 pm by syntax333 »
 

Offline djacobow

  • Super Contributor
  • ***
  • Posts: 1164
  • Country: us
  • takin' it apart since the 70's
Re: STM32F4Discovery stucks in SysTick_Handler
« Reply #4 on: January 20, 2020, 05:35:40 pm »
This is highly Googleable. Systick is a cpu register that decrements every cycle. When it gets to zero, it can cause an interrupt, which you can use to effectively increase the size of the counter to whatever you need.

It is useful for timing things relative to the cpu clock. For example, you can read it before and after a function to see how long it took.

Interestingly, this is part of the arm core, not a proprietary peripheral. Any arm chip will have it.
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4751
  • Country: dk
Re: STM32F4Discovery stucks in SysTick_Handler
« Reply #5 on: January 20, 2020, 05:44:33 pm »
This is highly Googleable. Systick is a cpu register that decrements every cycle. When it gets to zero, it can cause an interrupt, which you can use to effectively increase the size of the counter to whatever you need.

It is useful for timing things relative to the cpu clock. For example, you can read it before and after a function to see how long it took.

Interestingly, this is part of the arm core, not a proprietary peripheral. Any arm chip will have it.

That is because it is commonly  used for scheduling an OS


 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf