diff options
Diffstat (limited to 'app/project.h')
-rw-r--r-- | app/project.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/app/project.h b/app/project.h index 47eecb3..d060a81 100644 --- a/app/project.h +++ b/app/project.h @@ -15,6 +15,7 @@ #include <libopencm3/stm32/adc.h> #include <libopencm3/stm32/exti.h> #include <libopencm3/stm32/pwr.h> +#include <libopencm3/stm32/timer.h> #include <libopencm3/ethernet/mac_stm32fxx7.h> #include <libopencm3/ethernet/phy.h> #include <libopencm3/stm32/syscfg.h> @@ -45,12 +46,26 @@ #include "prototypes.h" -#define HZ 10000000 +//#define HZ 10000000 +#define HZ 10000000 + //#define HZ 167999973 //#define HZ 168000000 //#define HZ 167968615 //#define HZ 165925490 //#define HZ 167996682 +// + +#if 0 +#define HW_CLOCK_REG SCS_DWT_CYCCNT +#define HW_CLOCK_LEN 32 +#elif 0 +#define HW_CLOCK_REG ETH_PTPTSLR +#define HW_CLOCK_LEN 31 +#else +#define HW_CLOCK_REG TIM2_CNT +#define HW_CLOCK_LEN 32 +#endif #define TRACE do { stdio_drain(); printf("%s:%d\r\n",__FUNCTION__,__LINE__); } while (0) |