Ejemplo n.º 1
0
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;
}
Ejemplo n.º 2
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);
}
Ejemplo n.º 3
0
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);
}