diff --git a/Group21_Lab06_Task2/main.c b/Group21_Lab06_Task2/main.c index c20d4ce..0c6c861 100644 --- a/Group21_Lab06_Task2/main.c +++ b/Group21_Lab06_Task2/main.c @@ -31,3 +31,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) { + STRELOAD = SYSTICK_RELOAD_VALUE(PWM_PERIOD/100); // Set reload value for 10 µs intervals (100 kHz) + STCTRL |= (CLKINT | ENABLE | INTEN); // Set internal clock, enable the timer + STCURRENT = 0; // Clear STCURRENT value +} \ No newline at end of file