Skip to main content
Visitor II
April 13, 2014
Question

CubeMX: Cannot disable Systick INT

  • April 13, 2014
  • 5 replies
  • 5197 views
Posted on April 13, 2014 at 13:46

Hello!

When using CubeMX and going to Configuration and System --> NVIC ''System tick timer'' Interrupt is enabled. When I disable it, click apply and ok and then open NVIC dialog again it's enabled instead of disabled. With other interrupts this behaviour takes not place. I don't need the Systick and therefore my question is: How can I manage to disable it with the CubeMX software?

Thanks for answers!

Florian
    This topic has been closed for replies.

    5 replies

    Visitor II
    April 15, 2014
    Posted on April 15, 2014 at 09:50

    Hi,

    You are lucky, my ''systick timer it'' is ON but never occured ...

    Visitor II
    April 15, 2014
    Posted on April 15, 2014 at 14:50

    Hello Florian

    The systick handler is mandatory for the use of HAL. MX is made to use HAL and so the systick interrupt is always enabled. Without this, you cannot use HAL even for a simple toggle on a port for a LED. 

    Also, I agree with Thierry, have a systick interrupt running is a good point to start your application. 

    Rémi

    Visitor II
    October 7, 2015
    Posted on October 08, 2015 at 00:15

    I'm not sure this is true; GPIO (and almost anything else) doesn't depend on systick.

    I also need it disabled; I have a time-sensitive application and don't need interrupts all the time.

    Sure I can make it low priority but why if I don't need it?

    Cat

    Visitor II
    October 7, 2015
    Posted on October 08, 2015 at 00:35

    I was able to easily disable the systick by calling

    SysTick->CTRL = 0;    //Disable Systick

    in the first ''user code'' section after ''

    HAL_Init()

    ;''

    Everything else still works; I don't know if it will keep doing so but I don't know why anything (no RTOS) would depend on the systick if I don't make it so.
    Visitor II
    October 8, 2015
    Posted on October 08, 2015 at 02:35

    Hello,

    Many hal drivers' funtions used systick, such as for timeout, HAL_Delay() used it  too.

    Visitor II
    July 7, 2024

    I did a trick that for me worked: I disabled the SysTick interrupt because my system was too time critical; I couldn't allow Interrupts I was not generating. But I called the SysTick handler from the main loop, an vaguely same frequency. Delays, etc. relying on systick were out of wack but still happening eventually. And I got full control of the system timing.