| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #include "systick.h"
- #include "includes.h"
- void SysTick_init(void)
- {
- /* setup systick timer for 1000Hz interrupts */
- if (SysTick_Config(SystemCoreClock / 1000U)){
- /* capture error */
- while(1){
- }
- }
- /* configure the systick handler priority */
- NVIC_SetPriority(SysTick_IRQn, 0x00U);
- }
- /**
- * @brief This function handles SysTick Handler.
- * @param None
- * @retval None
- */
- volatile uint32_t TickCounter;
- volatile uint64_t TickCounter_u64;
- uint32_t systick_count=0;
- void SysTick_Handler(void)
- {
- systick_count++;
- if((systick_count%499)==0)
- {
- LED_RUN_OFF();
- LED_STATE_OFF();
- }
- else if((systick_count%999)==0)
- {
- LED_RUN_ON();
- LED_STATE_ON();
- }
- TickCounter++;
- TickCounter_u64++;
-
- // USART_ReceiveOvertimeProcess();
- }
|