Systic setting initialization

This commit is contained in:
Uttam Bhavimani Bhavimani 2024-09-20 20:20:35 +05:30
parent 372b807bd1
commit 749fcb45ee
1 changed files with 6 additions and 0 deletions

6
main.c
View File

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