From 958ec4424b5e94e9c91aa258ffcc29cbec9d57a3 Mon Sep 17 00:00:00 2001 From: Aapo Torkkeli <aamato@utu.fi> Date: Thu, 19 Sep 2019 15:21:32 +0300 Subject: [PATCH] Ex3 change and cleanup. --- ex_3/main.c | 10 ++++------ ex_3/pca10040/blank/config/sdk_config.h | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ex_3/main.c b/ex_3/main.c index 2ce49e5..9c153c1 100644 --- a/ex_3/main.c +++ b/ex_3/main.c @@ -94,12 +94,10 @@ uint32_t init_timers() { int main(void) { /* Configure board. */ bsp_board_init(BSP_INIT_LEDS); - //init_timers(); + init_timers(); while(true) { - bsp_board_led_invert(0); // blink led1 - nrf_delay_ms(500); // do a busy wait - //__WFE(); // sleep until an event wakes us up - //__SEV(); // sleep until an event wakes us up - //__WFE(); // sleep until an event wakes us up + __WFE(); // sleep until an event wakes us up + __SEV(); // sleep until an event wakes us up + __WFE(); // sleep until an event wakes us up } } diff --git a/ex_3/pca10040/blank/config/sdk_config.h b/ex_3/pca10040/blank/config/sdk_config.h index cfab48f..313db34 100644 --- a/ex_3/pca10040/blank/config/sdk_config.h +++ b/ex_3/pca10040/blank/config/sdk_config.h @@ -3326,7 +3326,7 @@ // <3=> 32 bit #ifndef NRFX_TIMER_DEFAULT_CONFIG_BIT_WIDTH -#define NRFX_TIMER_DEFAULT_CONFIG_BIT_WIDTH 0 +#define NRFX_TIMER_DEFAULT_CONFIG_BIT_WIDTH 3 #endif // <o> NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority -- GitLab