diff --git a/ex_3/main.c b/ex_3/main.c index 2ce49e56beb161fe6b7725dd0e557fe5591b0aae..9c153c1470a6e3c9e443b724c91af2ea10ce6347 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 cfab48fda2ca2c4ef0b3d84ad81a09b7f73a054d..313db343809184131398709fca0324d3e0022a9f 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