From a309260a54dfbeac35fdb4ed893e9a9addf3656b Mon Sep 17 00:00:00 2001 From: Vikram Rajput Date: Thu, 10 Oct 2024 19:17:24 +0530 Subject: [PATCH] systick initialization --- main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.c b/main.c index 621254a..15a7dde 100644 --- a/main.c +++ b/main.c @@ -1,3 +1,12 @@ #include #include #include"tm4c123gh6pm.h" + + +/* Systick memory mapped registers */ +#define STCTRL *((volatile long *) 0xE000E010) // control and status +#define STRELOAD *((volatile long *) 0xE000E014) // reload value +#define STCURRENT *((volatile long *) 0xE000E018) // current value +#define ENABLE (1 << 0) // bit 0 of CSR to enable the timer +#define CLKINT (1 << 2) // bit 2 of CSR to specify CPU clock +#define SYS_INTEN (1 << 1) // enable systick interrupt