Skip to content
Snippets Groups Projects
Select Git revision
  • 2b73169897bf3607cd70ceab921d3e30b1809351
  • master default protected
  • notification_characteristic
  • ble_pairing_confirmation
  • rahix/simple_menu
  • genofire/leds_rgb_get_state
  • genofire/rockets-state
  • genofire/ble-follow-py
  • hauke/ble-cleanups
  • plaetzchen/ios-workaround
  • blinkisync-as-preload
  • genofire/haule-ble-fs-deactive
  • schneider/max30001-pycardium
  • schneider/max30001-epicaridum
  • schneider/max30001
  • schneider/stream-locks
  • ios-workarounds
  • schneider/fundamental-test
  • schneider/ble-buffers
  • schneider/maxim-sdk-update
  • ch3/splashscreen
  • v1.8
  • v1.7
  • v1.6
  • v1.5
  • v1.4
  • v1.3
  • v1.2
  • v1.1
  • v1.0
  • release-1
  • bootloader-v1
  • v0.0
33 results

core1.c

Blame
  • Forked from card10 / firmware
    Source project has a limited visibility.
    core1.c 514 B
    #include "board.h"
    #include "gpio.h"
    #include "tmr_utils.h"
    
    static const gpio_cfg_t motor_pin = {PORT_0, PIN_8, GPIO_FUNC_OUT, GPIO_PAD_NONE};
    
    int main(void)
    {
    	// Enable rxev on core1
    	MXC_GCR->evten |= 0x20;
    	for (int i = 0; 1; i++) {
    		__asm volatile("wfe");
    		printf("core1: Hello! %d\n", i);
    		TMR_Delay(MXC_TMR1, SEC(1), 0);
    		printf("core1: Waking up core0\n");
    		__asm volatile("sev");
    		__asm volatile("wfe");
    
    #if 0
    		GPIO_OutSet(&motor_pin);
    		mxc_delay(30000);
    		GPIO_OutClr(&motor_pin);
    #endif
    	}
    }