Systic setting initialization
This commit is contained in:
		
							parent
							
								
									372b807bd1
								
							
						
					
					
						commit
						749fcb45ee
					
				
							
								
								
									
										6
									
								
								main.c
								
								
								
								
							
							
						
						
									
										6
									
								
								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
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue