int main() { // Initialize the platform platform_init(); printf("SysTick test program\n"); // Set initial values leds_on(LED_0); leds_off(LED_1); // Enable the SysTick, 100Hz nvic_enable_systick(100, alarm, 0); while (1) { int i; for (i = 0; i < 0x80000; i++) { __asm__("nop"); } leds_toggle(LED_1); } return 0; }
void platform_start_freertos_tick(uint16_t frequency, handler_t handler, handler_arg_t arg) { // For now, until the RTC works, start the systick. nvic_enable_systick(frequency, handler, arg); }
void clock_init(void) { // Enable the SysTick, CLOCK_SECOND Hz log_debug("Starting systick timer at %dHz", CLOCK_SECOND); nvic_enable_systick(CLOCK_SECOND, clock_alarm, 0); }