diff --git a/main.c b/main.c index cb2ec01..ee03b59 100644 --- a/main.c +++ b/main.c @@ -4,4 +4,6 @@ // SysTick memory-mapped registers #define STCTRL *((volatile uint32_t *) 0xE000E010) // CONTROL AND STATUS #define STRELOAD *((volatile uint32_t *) 0xE000E014) // RELOAD VALUE -#define STCURRENT *((volatile uint32_t *) 0xE000E018) // CURRENT VALUE \ No newline at end of file +#define STCURRENT *((volatile uint32_t *) 0xE000E018) // CURRENT VALUE +#define CLOCK_HZ 16000000 // CLOCK FREQUENCY OF EK-TM4C123GXL +#define SYSTICK_RELOAD_VALUE(us) ((CLOCK_HZ / 1000000) * (us) - 1) // SYSTICK RELOAD VALUE \ No newline at end of file