From 749fcb45ee667a0408d26fed3d36b65f093f981f Mon Sep 17 00:00:00 2001 From: Uttam Ambappa Bhavimani Date: Fri, 20 Sep 2024 20:20:35 +0530 Subject: [PATCH] Systic setting initialization --- main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.c b/main.c index 1b5fc6d..02ec3b3 100644 --- a/main.c +++ b/main.c @@ -23,3 +23,9 @@ void GPIO_PORT_F_init(void) GPIO_PORTF_IEV_R = 0x00; // Falling edge event GPIO_PORTF_IM_R |= 0x11; // Unmask interrupts for PF0 and PF4 } +void systick_setting(void) // SYSTICK SETUP FUNCTION +{ + STRELOAD = SYSTICK_RELOAD_VALUE(1000); // RELOAD VALUE FOR 1ms + STCTRL |= (1 << 0) | (1 << 2); // Enable SysTick with system clock + STCURRENT = 0; // Clear current value +}