Verified Commit 2b731698 authored by Rahix's avatar Rahix

fix(dual-core): Don't use a SysTick based delay

parent b4a2c87c
#include "board.h" #include "board.h"
#include "gpio.h" #include "gpio.h"
#include "mxc_delay.h" #include "tmr_utils.h"
static const gpio_cfg_t motor_pin = {PORT_0, PIN_8, GPIO_FUNC_OUT, GPIO_PAD_NONE}; static const gpio_cfg_t motor_pin = {PORT_0, PIN_8, GPIO_FUNC_OUT, GPIO_PAD_NONE};
...@@ -11,7 +11,7 @@ int main(void) ...@@ -11,7 +11,7 @@ int main(void)
for (int i = 0; 1; i++) { for (int i = 0; 1; i++) {
__asm volatile("wfe"); __asm volatile("wfe");
printf("core1: Hello! %d\n", i); printf("core1: Hello! %d\n", i);
mxc_delay(3000000); TMR_Delay(MXC_TMR1, SEC(1), 0);
printf("core1: Waking up core0\n"); printf("core1: Waking up core0\n");
__asm volatile("sev"); __asm volatile("sev");
__asm volatile("wfe"); __asm volatile("wfe");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment