File tree Expand file tree Collapse file tree 12 files changed +14
-13
lines changed
generic_stm32f103r8/board
STM32F3/variants/discovery_f3/board Expand file tree Collapse file tree 12 files changed +14
-13
lines changed Original file line number Diff line number Diff line change 3838
3939
4040
41- #define CYCLES_PER_MICROSECOND 24
41+ //#define CYCLES_PER_MICROSECOND 24
42+ #define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
4243//#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
4344#define SYSTICK_RELOAD_VAL 23999 /* takes a cycle to reload */
4445
Original file line number Diff line number Diff line change 3636#ifndef _BOARD_GENERIC_STM32F103C_H_
3737#define _BOARD_GENERIC_STM32F103C_H_
3838
39- #define CYCLES_PER_MICROSECOND 72
39+ #define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
4040#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
4141
4242#define BOARD_NR_USARTS 3
Original file line number Diff line number Diff line change 3636#ifndef _BOARD_GENERIC_STM32F103C_H_
3737#define _BOARD_GENERIC_STM32F103C_H_
3838
39- #define CYCLES_PER_MICROSECOND 72
39+ #define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
4040#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
4141
4242#define BOARD_NR_USARTS 3
Original file line number Diff line number Diff line change 3636#ifndef _BOARD_GENERIC_STM32F103R8_H_
3737#define _BOARD_GENERIC_STM32F103R8_H_
3838
39- #define CYCLES_PER_MICROSECOND 72
39+ #define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
4040#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
4141
4242#define BOARD_NR_USARTS 3
Original file line number Diff line number Diff line change 3636#ifndef _BOARD_GENERIC_STM32F103T_H_
3737#define _BOARD_GENERIC_STM32F103T_H_
3838
39- #define CYCLES_PER_MICROSECOND 72
39+ #define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
4040#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
4141
4242#define BOARD_NR_USARTS 2
Original file line number Diff line number Diff line change 3838/* A few of these values will seem strange given that it's a
3939 * high-density board. */
4040
41- #define CYCLES_PER_MICROSECOND 72
41+ #define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
4242#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
4343
4444#define BOARD_BUTTON_PIN PC0
Original file line number Diff line number Diff line change 3636#ifndef _BOARD_GENERIC_STM32F103C_H_
3737#define _BOARD_GENERIC_STM32F103C_H_
3838
39- #define CYCLES_PER_MICROSECOND 72
39+ #define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
4040#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
4141
4242#define BOARD_NR_USARTS 2
Original file line number Diff line number Diff line change 3434#define _BOARD_MAPLE_H_
3535
3636/* 72 MHz -> 72 cycles per microsecond. */
37- #define CYCLES_PER_MICROSECOND 72
37+ #define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
3838
3939/* Roger clark
4040
Original file line number Diff line number Diff line change 3636#ifndef _BOARD_MAPLE_MINI_H_
3737#define _BOARD_MAPLE_MINI_H_
3838
39- #define CYCLES_PER_MICROSECOND 72
39+ #define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
4040#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
4141
4242#define BOARD_NR_USARTS 3
Original file line number Diff line number Diff line change 3737#ifndef _BOARD_MICRODUINO_STM32_H_
3838#define _BOARD_MICRODUINO_STM32_H_
3939
40- #define CYCLES_PER_MICROSECOND 72
40+ #define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
4141#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
4242
4343/* Roger Clark.
You can’t perform that action at this time.
0 commit comments