# Timer Interrupt Setup in ThreadX

We're trying to set up ThreadX for the first time and we're trying to understand all the timer settings that. Although there are basically two constants that we need to set, they are not really clear to us...

Our MCU is the STM32H7, and we're using CubeMX to generate the initial code. We've set the core clock to 400MHz, and the Timebase Source was set to Timer6 - Timer6 Interrupt Period = 1ms

ThreadX timer setup is defined in tx_initialize_low_level.s, and there are two settings:

• SYSTEM_CLOCK: Should be the same as the core clock
• SYSTICK_CYCLES: ???

In the manual there is no clear information on what this setting should be, only that by default it is 10ms.

Should we set the SYSTICK_CYCLES to 1ms like the timer interrupt? What is the purpose of the setting? Is there a difference between this setting and the hardware timer interrupt? Are there any 'best practices' for ThreadX timing settings?

This means that basically, when using the function HAL_Delay() it will count the interrupts created with the Timebase Source. When calling tx_thread_sleep(n) the CPU will sleep for n SYSTICK_CYCLES cycles.
So short answer, there is no immediate connection between SYSTICK_CYCLES and the CPU SysTick. But if you want to use the HAL_Delay() function, make sure that it's set correctly.