Working CPU-Timer

As long as sleep time in wallclock-example is short enough, we're
scheduled by the etimer -- since etimer callback is missing (no timer
interrupt yet) this doesn't work when time gets longer.
This commit is contained in:
Ralf Schlatterbeck 2016-04-15 20:06:28 +02:00
parent 08fb461f43
commit c043a00bb4
5 changed files with 37 additions and 88 deletions

View file

@ -7,7 +7,7 @@ CONTIKI_TARGET_SOURCEFILES += contiki-main.c params.c
CONTIKIPICORV32=$(CONTIKI)/cpu/pico-rv32
CONTIKIBOARD=.
CONTIKI_PLAT_DEFS = -DF_CPU=8000000UL -DAUTO_CRC_PADDING=2
CONTIKI_PLAT_DEFS = -DAUTO_CRC_PADDING=2
MCU=pico-rv32

View file

@ -47,9 +47,12 @@
#define PLATFORM_NAME "PicoRV32-icoboard"
#define PLATFORM_TYPE PICORV32
#ifndef F_CPU
#define F_CPU 8000000UL
#define F_CPU 2000000ULL
#endif
/* Clock ticks per second, our timer runs with cpu freq */
#define CLOCK_CONF_SECOND F_CPU
typedef uint64_t clock_time_t;
#define CLOCK_LT(a,b) ((a)<(b))