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 +}