Changed board variants to use calculate value from F_CPU for CYCLES_PER_MICROSECOND
This commit is contained in:
parent
66579ef8ef
commit
f2c2323afd
|
@ -38,7 +38,8 @@
|
|||
|
||||
|
||||
|
||||
#define CYCLES_PER_MICROSECOND 24
|
||||
//#define CYCLES_PER_MICROSECOND 24
|
||||
#define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
|
||||
//#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
|
||||
#define SYSTICK_RELOAD_VAL 23999 /* takes a cycle to reload */
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#ifndef _BOARD_GENERIC_STM32F103C_H_
|
||||
#define _BOARD_GENERIC_STM32F103C_H_
|
||||
|
||||
#define CYCLES_PER_MICROSECOND 72
|
||||
#define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
|
||||
#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
|
||||
|
||||
#define BOARD_NR_USARTS 3
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#ifndef _BOARD_GENERIC_STM32F103C_H_
|
||||
#define _BOARD_GENERIC_STM32F103C_H_
|
||||
|
||||
#define CYCLES_PER_MICROSECOND 72
|
||||
#define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
|
||||
#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
|
||||
|
||||
#define BOARD_NR_USARTS 3
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#ifndef _BOARD_GENERIC_STM32F103R8_H_
|
||||
#define _BOARD_GENERIC_STM32F103R8_H_
|
||||
|
||||
#define CYCLES_PER_MICROSECOND 72
|
||||
#define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
|
||||
#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
|
||||
|
||||
#define BOARD_NR_USARTS 3
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#ifndef _BOARD_GENERIC_STM32F103T_H_
|
||||
#define _BOARD_GENERIC_STM32F103T_H_
|
||||
|
||||
#define CYCLES_PER_MICROSECOND 72
|
||||
#define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
|
||||
#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
|
||||
|
||||
#define BOARD_NR_USARTS 2
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
/* A few of these values will seem strange given that it's a
|
||||
* high-density board. */
|
||||
|
||||
#define CYCLES_PER_MICROSECOND 72
|
||||
#define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
|
||||
#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
|
||||
|
||||
#define BOARD_BUTTON_PIN PC0
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#ifndef _BOARD_GENERIC_STM32F103C_H_
|
||||
#define _BOARD_GENERIC_STM32F103C_H_
|
||||
|
||||
#define CYCLES_PER_MICROSECOND 72
|
||||
#define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
|
||||
#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
|
||||
|
||||
#define BOARD_NR_USARTS 2
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#define _BOARD_MAPLE_H_
|
||||
|
||||
/* 72 MHz -> 72 cycles per microsecond. */
|
||||
#define CYCLES_PER_MICROSECOND 72
|
||||
#define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
|
||||
|
||||
/* Roger clark
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#ifndef _BOARD_MAPLE_MINI_H_
|
||||
#define _BOARD_MAPLE_MINI_H_
|
||||
|
||||
#define CYCLES_PER_MICROSECOND 72
|
||||
#define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
|
||||
#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
|
||||
|
||||
#define BOARD_NR_USARTS 3
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#ifndef _BOARD_MICRODUINO_STM32_H_
|
||||
#define _BOARD_MICRODUINO_STM32_H_
|
||||
|
||||
#define CYCLES_PER_MICROSECOND 72
|
||||
#define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
|
||||
#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
|
||||
|
||||
/* Roger Clark.
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#ifndef _BOARD_MAPLE_H_
|
||||
#define _BOARD_MAPLE_H_
|
||||
#define _BOARD_NUCLEOF103RB_ 1 // hack for HardwareSerial.cpp for a new order of serials
|
||||
#define CYCLES_PER_MICROSECOND 72
|
||||
#define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
|
||||
#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
|
||||
|
||||
/* Roger clark. Removed defines for LED pin and Button pin as they are not Arduino API defines */
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
|
||||
#include <libmaple/stm32.h>
|
||||
|
||||
#define CYCLES_PER_MICROSECOND 72
|
||||
#define SYSTICK_RELOAD_VAL 71999 /* takes a cycle to reload */
|
||||
#define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
|
||||
#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
|
||||
|
||||
enum {
|
||||
PC13, PC14, PC15,
|
||||
|
|
Loading…
Reference in New Issue