Hello everyone,
I want to be able to set a timer in my project. With this timer i want to be able to make my current comsumption evaluation easier.
I am using the nrf9160 DK.
I proceeded the following way:
#include <zephyr.h>
#include <stdio.h>
#include <nrf9160.h>
#include <device.h>
#define TIMER_INTERVAL_SEC 1
struct k_timer my_timer;
void my_expiry_function(struct k_timer *timer_id){};
void main(void){
k_timer_init(&my_timer, my_expiry_function, NULL);
k_timer_start(&my_timer, K_SECONDS(TIMER_INTERVAL_SEC), K_SECONDS(TIMER_INTERVAL_SEC));
}
unfortunately it is not working, can someone please help me resolve this issue?
Best regards,
Cedric