diff options
author | fishsoupisgood <github@madingley.org> | 2019-05-08 23:17:01 +0100 |
---|---|---|
committer | fishsoupisgood <github@madingley.org> | 2019-05-08 23:17:01 +0100 |
commit | 0548136a4c886830414fb575d9d0daa7f1a7d170 (patch) | |
tree | 29380a80a6ecae73d54a5d42990539494b71b871 /app/project.h | |
parent | ea0ef10070c1070dc66cb0d8689410722c06758e (diff) | |
download | clock-0548136a4c886830414fb575d9d0daa7f1a7d170.tar.gz clock-0548136a4c886830414fb575d9d0daa7f1a7d170.tar.bz2 clock-0548136a4c886830414fb575d9d0daa7f1a7d170.zip |
sysclk back to 168MHz, 10Mhz -> TIM2old-master
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) |