From 5d4823022338b49e7336ca6076cf4aa2e5589064 Mon Sep 17 00:00:00 2001
From: Terraneo Federico <fede.tft@miosix.org>
Date: Sat, 21 Aug 2021 22:52:03 +0200
Subject: [PATCH] Updated all board_settings.h to remove TICK_FREQ and
 AUX_TIMER

---
 .../lpc2138_miosix_board/board_settings.h     | 22 ++-----------
 .../board_settings.h                          | 25 ++-------------
 .../efm32gg332f1024_wandstem/board_settings.h | 31 +++----------------
 .../stm32f100c8_microboard/board_settings.h   | 25 ++-------------
 .../stm32f100c8_vaisala_rs41/board_settings.h | 25 ++-------------
 .../stm32f100cb_tempsensor/board_settings.h   | 25 ++-------------
 .../stm32f100cx_generic/board_settings.h      | 23 ++------------
 .../board_settings.h                          | 28 ++---------------
 .../stm32f100rc_solertegiard/board_settings.h | 23 ++------------
 .../stm32f103c8_breakout/board_settings.h     | 23 ++------------
 .../board_settings.h                          | 25 ++-------------
 .../stm32f103cx_generic/board_settings.h      | 23 ++------------
 .../stm32f103ve_mp3v2/board_settings.h        | 25 ++-------------
 .../stm32f103ve_strive_mini/board_settings.h  | 25 ++-------------
 .../stm32f103ze_redbull_v2/board_settings.h   | 25 ++-------------
 .../board_settings.h                          | 25 ++-------------
 .../stm32f205_generic/board_settings.h        | 25 ++-------------
 .../board_settings.h                          | 23 ++------------
 .../stm32f205rg_sony-newman/board_settings.h  | 25 ++-------------
 .../board_settings.h                          | 28 ++---------------
 .../stm32f207ze_als_camboard/board_settings.h | 25 ++-------------
 .../stm32f207zg_EthBoardV2/board_settings.h   | 25 ++-------------
 .../board_settings.h                          | 25 ++-------------
 .../atsam4lc2aa_generic/board_settings.h      | 20 ++----------
 .../board_settings.h                          | 25 ++-------------
 .../stm32f401re_nucleo/board_settings.h       | 25 ++-------------
 .../board_settings.h                          | 25 ++-------------
 .../stm32f407vg_bitsboard/board_settings.h    | 25 ++-------------
 .../board_settings.h                          | 28 ++---------------
 .../board_settings.h                          | 25 ++-------------
 .../stm32f411ce_blackpill/board_settings.h    | 25 ++-------------
 .../stm32f411re_nucleo/board_settings.h       | 25 ++-------------
 .../stm32f429zi_oledboard2/board_settings.h   | 25 ++-------------
 .../board_settings.h                          | 25 ++-------------
 .../board_settings.h                          | 25 ++-------------
 .../board_settings.h                          | 25 ++-------------
 .../board_settings.h                          | 25 ++-------------
 .../stm32l476rg_nucleo/board_settings.h       | 25 ++-------------
 .../stm32f746zg_nucleo/board_settings.h       | 25 ++-------------
 .../stm32h753xi_eval/board_settings.h         | 25 ++-------------
 miosix/config/miosix_settings.h               |  4 +++
 .../scheduler/priority/priority_scheduler.cpp |  8 ++---
 miosix/util/version.cpp                       |  2 +-
 43 files changed, 126 insertions(+), 885 deletions(-)

diff --git a/miosix/config/arch/arm7_lpc2000/lpc2138_miosix_board/board_settings.h b/miosix/config/arch/arm7_lpc2000/lpc2138_miosix_board/board_settings.h
index 76ed0a17..d0f91544 100644
--- a/miosix/config/arch/arm7_lpc2000/lpc2138_miosix_board/board_settings.h
+++ b/miosix/config/arch/arm7_lpc2000/lpc2138_miosix_board/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2010, 2011, 2012, 2013, 2014 by Terraneo Federico       *
+ *   Copyright (C) 2010-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -58,20 +55,9 @@ const unsigned int AUX_SERIAL_SPEED=9600;
 /// LPC2138 has 32KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The LPC2138 timer in the Miosix board is
-/// clocked at 14745600Hz which cannot be divided by 1000. So we're using a
-/// 200Hz tick rate. This implies the minimun Thread::sleep value is 5ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=200;
-
 /// \internal Clock frequency of hardware timer, hardware specific data
 const unsigned int TIMER_CLOCK=14745600;
 
-const unsigned int AUX_TIMER_CLOCK=100000; ///\internal Aux timer run @ 100KHz
-///\internal Aux timer is 32 bits, but due to the fixed point scheduler and for
-///consistency with the stm32 we treat it as it was a 16bit timer
-const unsigned int AUX_TIMER_MAX=0xffff;
-
 /// \def WITH_RTC
 /// Uncomment to enable support for RTC. Time-related functions depend on it.
 /// By default it is defined (RTC is active)
@@ -88,5 +74,3 @@ const unsigned int AUX_TIMER_MAX=0xffff;
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM0_stm32/stm32f072rb_stm32f0discovery/board_settings.h b/miosix/config/arch/cortexM0_stm32/stm32f072rb_stm32f0discovery/board_settings.h
index 2c07b265..1e28f948 100644
--- a/miosix/config/arch/cortexM0_stm32/stm32f072rb_stm32f0discovery/board_settings.h
+++ b/miosix/config/arch/cortexM0_stm32/stm32f072rb_stm32f0discovery/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2017 by Terraneo Federico                               *
+ *   Copyright (C) 2017-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F100C8 only has 8KB of RAM so the stack is only 1.5KB.
 const unsigned int MAIN_STACK_SIZE=1024+512;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F100CB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -75,5 +58,3 @@ const bool defaultSerialFlowctrl=false;
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/board_settings.h b/miosix/config/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/board_settings.h
index 49fd279b..8924c1f1 100644
--- a/miosix/config/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/board_settings.h
+++ b/miosix/config/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2015 by Terraneo Federico                               *
+ *   Copyright (C) 2015-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 /**
  * Select hardware revision (10=1.0, 11=1.1, ...).
@@ -60,25 +57,7 @@ namespace miosix {
 /// Size of stack for main().
 const unsigned int MAIN_STACK_SIZE=4096;
 
-const unsigned int preemptionPeriodNs=1000000;
-
-
-/// Frequency of tick (in Hz). The frequency of the efm32gg332f1024 timer in
-/// the board can be divided by 1000. This allows to use a 1KHz tick and
-/// the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-//FIXME: this is here only to make it compile, there's no AUX_TIMER yet in portability.cpp
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
-// /// Serial port
+/// Serial port
 const unsigned int defaultSerial=0;
 const unsigned int defaultSerialSpeed=115200;
 
@@ -87,5 +66,3 @@ const unsigned int defaultSerialSpeed=115200;
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_stm32/stm32f100c8_microboard/board_settings.h b/miosix/config/arch/cortexM3_stm32/stm32f100c8_microboard/board_settings.h
index 0a6cefc8..d822ce9d 100644
--- a/miosix/config/arch/cortexM3_stm32/stm32f100c8_microboard/board_settings.h
+++ b/miosix/config/arch/cortexM3_stm32/stm32f100c8_microboard/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2017 by Terraneo Federico                               *
+ *   Copyright (C) 2017-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F100C8 only has 8KB of RAM so the stack is only 1.5KB.
 const unsigned int MAIN_STACK_SIZE=1024+512;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F100CB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -75,5 +58,3 @@ const bool defaultSerialFlowctrl=false;
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_stm32/stm32f100c8_vaisala_rs41/board_settings.h b/miosix/config/arch/cortexM3_stm32/stm32f100c8_vaisala_rs41/board_settings.h
index 8380f633..3f5d171f 100644
--- a/miosix/config/arch/cortexM3_stm32/stm32f100c8_vaisala_rs41/board_settings.h
+++ b/miosix/config/arch/cortexM3_stm32/stm32f100c8_vaisala_rs41/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2017 by Terraneo Federico                               *
+ *   Copyright (C) 2017-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F100C8 only has 8KB of RAM so the stack is only 1.5KB.
 const unsigned int MAIN_STACK_SIZE=1024+512;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F100CB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=3;
 const unsigned int defaultSerialSpeed=19200;
@@ -75,5 +58,3 @@ const bool defaultSerialFlowctrl=false;
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_stm32/stm32f100cb_tempsensor/board_settings.h b/miosix/config/arch/cortexM3_stm32/stm32f100cb_tempsensor/board_settings.h
index 209a44d0..d5b9e8ff 100644
--- a/miosix/config/arch/cortexM3_stm32/stm32f100cb_tempsensor/board_settings.h
+++ b/miosix/config/arch/cortexM3_stm32/stm32f100cb_tempsensor/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2011, 2012, 2013, 2014, 2015 by Terraneo Federico       *
+ *   Copyright (C) 2011-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F100CB only has 8KB of RAM so the stack is only 1.5KB.
 const unsigned int MAIN_STACK_SIZE=1024+512;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F100CB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -75,5 +58,3 @@ const bool defaultSerialFlowctrl=false;
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_stm32/stm32f100cx_generic/board_settings.h b/miosix/config/arch/cortexM3_stm32/stm32f100cx_generic/board_settings.h
index 9b018517..1a7bb97f 100644
--- a/miosix/config/arch/cortexM3_stm32/stm32f100cx_generic/board_settings.h
+++ b/miosix/config/arch/cortexM3_stm32/stm32f100cx_generic/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2018 by Terraneo Federico                               *
+ *   Copyright (C) 2018-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -47,18 +44,6 @@ namespace miosix {
 /// The C standard library is stack-heavy (iprintf requires 1KB)
 const unsigned int MAIN_STACK_SIZE=2048;
 
-/// Frequency of tick (in Hz)
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -72,5 +57,3 @@ const bool defaultSerialFlowctrl=false;
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_stm32/stm32f100rb_stm32vldiscovery/board_settings.h b/miosix/config/arch/cortexM3_stm32/stm32f100rb_stm32vldiscovery/board_settings.h
index e56af271..e45f7a7d 100644
--- a/miosix/config/arch/cortexM3_stm32/stm32f100rb_stm32vldiscovery/board_settings.h
+++ b/miosix/config/arch/cortexM3_stm32/stm32f100rb_stm32vldiscovery/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2011, 2012, 2013, 2014 by Terraneo Federico             *
+ *   Copyright (C) 2011-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,23 +45,6 @@ namespace miosix {
 /// STM32F100RB only has 8KB of RAM so the stack is only 1.5KB.
 const unsigned int MAIN_STACK_SIZE=1024+512;
 
-/// Context Switch Quantum Size (measured in nanoseconds)
-const unsigned int preemptionPeriodNs=1000000;
-
-/// Frequency of tick (in Hz). The frequency of the STM32F100RB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -84,5 +64,3 @@ const bool defaultSerialFlowctrl=false;
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_stm32/stm32f100rc_solertegiard/board_settings.h b/miosix/config/arch/cortexM3_stm32/stm32f100rc_solertegiard/board_settings.h
index 4e4c68e6..4d1724fa 100644
--- a/miosix/config/arch/cortexM3_stm32/stm32f100rc_solertegiard/board_settings.h
+++ b/miosix/config/arch/cortexM3_stm32/stm32f100rc_solertegiard/board_settings.h
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F100RB only has 8KB of RAM so the stack is only 1.5KB.
 const unsigned int MAIN_STACK_SIZE=1024+512;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F100RB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -81,5 +64,3 @@ const bool defaultSerialFlowctrl=false;
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_stm32/stm32f103c8_breakout/board_settings.h b/miosix/config/arch/cortexM3_stm32/stm32f103c8_breakout/board_settings.h
index 4f97600b..e09967f0 100644
--- a/miosix/config/arch/cortexM3_stm32/stm32f103c8_breakout/board_settings.h
+++ b/miosix/config/arch/cortexM3_stm32/stm32f103c8_breakout/board_settings.h
@@ -26,16 +26,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -49,20 +46,6 @@ namespace miosix {
 /// STM32F103C8 has 20KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F100RB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -82,5 +65,3 @@ const bool defaultSerialFlowctrl=false;
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_stm32/stm32f103cb_als_mainboard_rev2/board_settings.h b/miosix/config/arch/cortexM3_stm32/stm32f103cb_als_mainboard_rev2/board_settings.h
index 1f9e24ea..13e673bf 100644
--- a/miosix/config/arch/cortexM3_stm32/stm32f103cb_als_mainboard_rev2/board_settings.h
+++ b/miosix/config/arch/cortexM3_stm32/stm32f103cb_als_mainboard_rev2/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2012, 2013, 2014, 2015 by Terraneo Federico             *
+ *   Copyright (C) 2012-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F103CB has 20KB of RAM so use a small 1.5K stack.
 const unsigned int MAIN_STACK_SIZE=1024+512;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F103CB timer in the
-/// Miosix board can be divided by 1000. This allows to use a 1KHz tick and
-/// the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -81,5 +64,3 @@ const bool defaultSerialFlowctrl=false;
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_stm32/stm32f103cx_generic/board_settings.h b/miosix/config/arch/cortexM3_stm32/stm32f103cx_generic/board_settings.h
index 9b018517..1a7bb97f 100644
--- a/miosix/config/arch/cortexM3_stm32/stm32f103cx_generic/board_settings.h
+++ b/miosix/config/arch/cortexM3_stm32/stm32f103cx_generic/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2018 by Terraneo Federico                               *
+ *   Copyright (C) 2018-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -47,18 +44,6 @@ namespace miosix {
 /// The C standard library is stack-heavy (iprintf requires 1KB)
 const unsigned int MAIN_STACK_SIZE=2048;
 
-/// Frequency of tick (in Hz)
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -72,5 +57,3 @@ const bool defaultSerialFlowctrl=false;
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_stm32/stm32f103ve_mp3v2/board_settings.h b/miosix/config/arch/cortexM3_stm32/stm32f103ve_mp3v2/board_settings.h
index d779c641..5d7a3eec 100644
--- a/miosix/config/arch/cortexM3_stm32/stm32f103ve_mp3v2/board_settings.h
+++ b/miosix/config/arch/cortexM3_stm32/stm32f103ve_mp3v2/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2011, 2012, 2013, 2014 by Terraneo Federico             *
+ *   Copyright (C) 2011-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F103VE has 64KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F103VE timer in the
-/// mp3v2 board can be divided by 1000. This allows to use a 1KHz tick and
-/// the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -78,5 +61,3 @@ static const unsigned char sdVoltage=33; //Board powered @ 3.3V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_stm32/stm32f103ve_strive_mini/board_settings.h b/miosix/config/arch/cortexM3_stm32/stm32f103ve_strive_mini/board_settings.h
index d779c641..5d7a3eec 100644
--- a/miosix/config/arch/cortexM3_stm32/stm32f103ve_strive_mini/board_settings.h
+++ b/miosix/config/arch/cortexM3_stm32/stm32f103ve_strive_mini/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2011, 2012, 2013, 2014 by Terraneo Federico             *
+ *   Copyright (C) 2011-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F103VE has 64KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F103VE timer in the
-/// mp3v2 board can be divided by 1000. This allows to use a 1KHz tick and
-/// the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -78,5 +61,3 @@ static const unsigned char sdVoltage=33; //Board powered @ 3.3V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_stm32/stm32f103ze_redbull_v2/board_settings.h b/miosix/config/arch/cortexM3_stm32/stm32f103ze_redbull_v2/board_settings.h
index 15f00741..5af5bc1e 100644
--- a/miosix/config/arch/cortexM3_stm32/stm32f103ze_redbull_v2/board_settings.h
+++ b/miosix/config/arch/cortexM3_stm32/stm32f103ze_redbull_v2/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2011, 2012, 2013, 2014 by Terraneo Federico             *
+ *   Copyright (C) 2011-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F103VE has 64KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F103VE timer in the
-/// mp3v2 board can be divided by 1000. This allows to use a 1KHz tick and
-/// the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -78,5 +61,3 @@ static const unsigned char sdVoltage=33; //Board powered @ 3.3V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_stm32/stm32f103ze_stm3210e-eval/board_settings.h b/miosix/config/arch/cortexM3_stm32/stm32f103ze_stm3210e-eval/board_settings.h
index 325df63a..a9a6ac2e 100644
--- a/miosix/config/arch/cortexM3_stm32/stm32f103ze_stm3210e-eval/board_settings.h
+++ b/miosix/config/arch/cortexM3_stm32/stm32f103ze_stm3210e-eval/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2010, 2011, 2012, 2013, 2014 by Terraneo Federico       *
+ *   Copyright (C) 2010-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F103ZE has 64KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F103ZE timer in the
-/// Miosix board can be divided by 1000. This allows to use a 1KHz tick and
-/// the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -78,5 +61,3 @@ static const unsigned char sdVoltage=33; //Board powered @ 3.3V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_stm32f2/stm32f205_generic/board_settings.h b/miosix/config/arch/cortexM3_stm32f2/stm32f205_generic/board_settings.h
index 0f77b8c5..f3ecda29 100644
--- a/miosix/config/arch/cortexM3_stm32f2/stm32f205_generic/board_settings.h
+++ b/miosix/config/arch/cortexM3_stm32f2/stm32f205_generic/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2018 by Terraneo Federico                               *
+ *   Copyright (C) 2018-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F205 has 128KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F205RC timer in the
-/// Miosix board can be divided by 1000. This allows to use a 1KHz tick and
-/// the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -85,5 +68,3 @@ static const unsigned char sdVoltage=33; //Board powered @ 3.3V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_stm32f2/stm32f205rc_skyward_stormtrooper/board_settings.h b/miosix/config/arch/cortexM3_stm32f2/stm32f205rc_skyward_stormtrooper/board_settings.h
index 8419cf56..16ce0454 100644
--- a/miosix/config/arch/cortexM3_stm32f2/stm32f205rc_skyward_stormtrooper/board_settings.h
+++ b/miosix/config/arch/cortexM3_stm32f2/stm32f205rc_skyward_stormtrooper/board_settings.h
@@ -26,16 +26,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -49,20 +46,6 @@ namespace miosix {
 /// STM32F205RC has 128KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F205RC timer in the
-/// Miosix board can be divided by 1000. This allows to use a 1KHz tick and
-/// the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -80,5 +63,3 @@ const bool defaultSerialFlowctrl=false;
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_stm32f2/stm32f205rg_sony-newman/board_settings.h b/miosix/config/arch/cortexM3_stm32f2/stm32f205rg_sony-newman/board_settings.h
index 4716c0ac..b859f369 100644
--- a/miosix/config/arch/cortexM3_stm32f2/stm32f205rg_sony-newman/board_settings.h
+++ b/miosix/config/arch/cortexM3_stm32f2/stm32f205rg_sony-newman/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2013, 2014 by Terraneo Federico                         *
+ *   Copyright (C) 2013-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F207ZG has 128KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F207ZG timer in the
-/// Miosix board can be divided by 1000. This allows to use a 1KHz tick and
-/// the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 #define I2C_WITH_DMA
 
 /**
@@ -69,5 +52,3 @@ const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_stm32f2/stm32f207ig_stm3220g-eval/board_settings.h b/miosix/config/arch/cortexM3_stm32f2/stm32f207ig_stm3220g-eval/board_settings.h
index ea8f4d74..1528ebd9 100644
--- a/miosix/config/arch/cortexM3_stm32f2/stm32f207ig_stm3220g-eval/board_settings.h
+++ b/miosix/config/arch/cortexM3_stm32f2/stm32f207ig_stm3220g-eval/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2012, 2013, 2014 by Terraneo Federico                   *
+ *   Copyright (C) 2012-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,23 +45,6 @@ namespace miosix {
 /// STM32F207IG has 128KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Context Switch Quantum Size (measured in nanoseconds)
-const unsigned int preemptionPeriodNs=1000000;
-
-/// Frequency of tick (in Hz). The frequency of the STM32F207IG timer in the
-/// Miosix board can be divided by 1000. This allows to use a 1KHz tick and
-/// the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 //This board only exposes USART3, without flow control
 const unsigned int defaultSerialSpeed=19200;
@@ -87,5 +67,3 @@ static const unsigned char sdVoltage=33; //Board powered @ 3.3V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_stm32f2/stm32f207ze_als_camboard/board_settings.h b/miosix/config/arch/cortexM3_stm32f2/stm32f207ze_als_camboard/board_settings.h
index 60b4e72d..ff5d2046 100644
--- a/miosix/config/arch/cortexM3_stm32f2/stm32f207ze_als_camboard/board_settings.h
+++ b/miosix/config/arch/cortexM3_stm32f2/stm32f207ze_als_camboard/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2012, 2013, 2014 by Terraneo Federico                   *
+ *   Copyright (C) 2012-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F207ZG has 128KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F207ZG timer in the
-/// Miosix board can be divided by 1000. This allows to use a 1KHz tick and
-/// the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -81,5 +64,3 @@ const bool defaultSerialFlowctrl=false;
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_stm32f2/stm32f207zg_EthBoardV2/board_settings.h b/miosix/config/arch/cortexM3_stm32f2/stm32f207zg_EthBoardV2/board_settings.h
index 06ba71d4..0d444bc6 100644
--- a/miosix/config/arch/cortexM3_stm32f2/stm32f207zg_EthBoardV2/board_settings.h
+++ b/miosix/config/arch/cortexM3_stm32f2/stm32f207zg_EthBoardV2/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2012, 2013, 2014 by Terraneo Federico                   *
+ *   Copyright (C) 2012-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F207IG has 128KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F207ZG timer in the
-/// Miosix board can be divided by 1000. This allows to use a 1KHz tick and
-/// the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -85,5 +68,3 @@ static const unsigned char sdVoltage=33; //Board powered @ 3.3V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM3_stm32l1/stm32l151c8_als_mainboard/board_settings.h b/miosix/config/arch/cortexM3_stm32l1/stm32l151c8_als_mainboard/board_settings.h
index b25dbef6..b932ae56 100644
--- a/miosix/config/arch/cortexM3_stm32l1/stm32l151c8_als_mainboard/board_settings.h
+++ b/miosix/config/arch/cortexM3_stm32l1/stm32l151c8_als_mainboard/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2012, 2013, 2014 by Terraneo Federico                   *
+ *   Copyright (C) 2012-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F151C8 has 10KB of RAM so use a small 1.5K stack.
 const unsigned int MAIN_STACK_SIZE=1536;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F151C8 timer in the
-/// Miosix board can be divided by 1000. This allows to use a 1KHz tick and
-/// the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -81,5 +64,3 @@ const bool defaultSerialFlowctrl=false;
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM4_atsam4l/atsam4lc2aa_generic/board_settings.h b/miosix/config/arch/cortexM4_atsam4l/atsam4lc2aa_generic/board_settings.h
index c5ba7110..4d8e0af2 100644
--- a/miosix/config/arch/cortexM4_atsam4l/atsam4lc2aa_generic/board_settings.h
+++ b/miosix/config/arch/cortexM4_atsam4l/atsam4lc2aa_generic/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2015-2020 by Terraneo Federico                          *
+ *   Copyright (C) 2015-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -27,13 +27,11 @@
 
 #pragma once
 
-#include "util/version.h"
-
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -47,20 +45,6 @@ namespace miosix {
 /// atsam4lc2aa only has 32KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the atsam4lc2aa timer can be
-/// divided by 1000. This allows to use a 1KHz tick and the minimun
-/// Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=2;
 const unsigned int defaultSerialSpeed=115200;
diff --git a/miosix/config/arch/cortexM4_stm32f3/stm32f303vc_stm32f3discovery/board_settings.h b/miosix/config/arch/cortexM4_stm32f3/stm32f303vc_stm32f3discovery/board_settings.h
index 97533417..da362a45 100644
--- a/miosix/config/arch/cortexM4_stm32f3/stm32f303vc_stm32f3discovery/board_settings.h
+++ b/miosix/config/arch/cortexM4_stm32f3/stm32f303vc_stm32f3discovery/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2012, 2013, 2014 by Terraneo Federico                   *
+ *   Copyright (C) 2012-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -46,20 +43,6 @@ namespace miosix {
 /// Size of stack for main().
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F100RB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -79,5 +62,3 @@ static const unsigned char sdVoltage=30; //Board powered @ 3.0V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM4_stm32f4/stm32f401re_nucleo/board_settings.h b/miosix/config/arch/cortexM4_stm32f4/stm32f401re_nucleo/board_settings.h
index ac731b44..c0829b7b 100644
--- a/miosix/config/arch/cortexM4_stm32f4/stm32f401re_nucleo/board_settings.h
+++ b/miosix/config/arch/cortexM4_stm32f4/stm32f401re_nucleo/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2015 by Terraneo Federico                               *
+ *   Copyright (C) 2015-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F407VG only has 192KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F100RB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=2;
 const unsigned int defaultSerialSpeed=19200;
@@ -78,5 +61,3 @@ static const unsigned char sdVoltage=33; //Board powered @ 3.3V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM4_stm32f4/stm32f401vc_stm32f4discovery/board_settings.h b/miosix/config/arch/cortexM4_stm32f4/stm32f401vc_stm32f4discovery/board_settings.h
index efccfafa..bbc92a47 100644
--- a/miosix/config/arch/cortexM4_stm32f4/stm32f401vc_stm32f4discovery/board_settings.h
+++ b/miosix/config/arch/cortexM4_stm32f4/stm32f401vc_stm32f4discovery/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2012, 2013, 2014 by Terraneo Federico                   *
+ *   Copyright (C) 2012-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F401VC only has 192KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F401VC timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=2;
 const unsigned int defaultSerialSpeed=19200;
@@ -81,5 +64,3 @@ static const unsigned char sdVoltage=30; //Board powered @ 3.0V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_bitsboard/board_settings.h b/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_bitsboard/board_settings.h
index 1867dfb3..d24ee9a9 100644
--- a/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_bitsboard/board_settings.h
+++ b/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_bitsboard/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2012, 2013, 2014 by Terraneo Federico                   *
+ *   Copyright (C) 2012-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F407VG only has 192KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F100RB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=3;
 const unsigned int defaultSerialSpeed=19200;
@@ -79,5 +62,3 @@ static const unsigned char sdVoltage=30; //Board powered @ 3.0V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_stm32f4discovery/board_settings.h b/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_stm32f4discovery/board_settings.h
index 27b69de5..3379b7a0 100644
--- a/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_stm32f4discovery/board_settings.h
+++ b/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_stm32f4discovery/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2012, 2013, 2014 by Terraneo Federico                   *
+ *   Copyright (C) 2012-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,23 +45,6 @@ namespace miosix {
 /// STM32F407VG only has 192KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Context Switch Quantum Size (measured in nanoseconds)
-const unsigned int preemptionPeriodNs=1000000;
-
-/// Frequency of tick (in Hz). The frequency of the STM32F100RB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000; //FIX ME: Should be removed
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000; //FIX ME: Should be removed
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port (USART3 PB10=TX, PB11=RX)
 const unsigned int defaultSerial=3;
 const unsigned int defaultSerialSpeed=19200;
@@ -89,5 +69,3 @@ static const unsigned char sdVoltage=30; //Board powered @ 3.0V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_thermal_test_chip/board_settings.h b/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_thermal_test_chip/board_settings.h
index 651df53a..2c3505a1 100644
--- a/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_thermal_test_chip/board_settings.h
+++ b/miosix/config/arch/cortexM4_stm32f4/stm32f407vg_thermal_test_chip/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2012, 2013, 2014 by Terraneo Federico                   *
+ *   Copyright (C) 2012-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// Application requires more than the usual 4KB stack, increasing to 5KB.
 const unsigned int MAIN_STACK_SIZE=5*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F100RB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=115200;
 const bool defaultSerialFlowctrl=false;
@@ -85,5 +68,3 @@ static const unsigned char sdVoltage=33; //Board powered @ 3.3V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM4_stm32f4/stm32f411ce_blackpill/board_settings.h b/miosix/config/arch/cortexM4_stm32f4/stm32f411ce_blackpill/board_settings.h
index f3d66bed..db12fe62 100644
--- a/miosix/config/arch/cortexM4_stm32f4/stm32f411ce_blackpill/board_settings.h
+++ b/miosix/config/arch/cortexM4_stm32f4/stm32f411ce_blackpill/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2015 by Terraneo Federico                               *
+ *   Copyright (C) 2015-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F407VG only has 192KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F100RB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -78,5 +61,3 @@ static const unsigned char sdVoltage=33; //Board powered @ 3.3V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM4_stm32f4/stm32f411re_nucleo/board_settings.h b/miosix/config/arch/cortexM4_stm32f4/stm32f411re_nucleo/board_settings.h
index ac731b44..c0829b7b 100644
--- a/miosix/config/arch/cortexM4_stm32f4/stm32f411re_nucleo/board_settings.h
+++ b/miosix/config/arch/cortexM4_stm32f4/stm32f411re_nucleo/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2015 by Terraneo Federico                               *
+ *   Copyright (C) 2015-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F407VG only has 192KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F100RB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=2;
 const unsigned int defaultSerialSpeed=19200;
@@ -78,5 +61,3 @@ static const unsigned char sdVoltage=33; //Board powered @ 3.3V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM4_stm32f4/stm32f429zi_oledboard2/board_settings.h b/miosix/config/arch/cortexM4_stm32f4/stm32f429zi_oledboard2/board_settings.h
index 91b090d5..ed860a90 100644
--- a/miosix/config/arch/cortexM4_stm32f4/stm32f429zi_oledboard2/board_settings.h
+++ b/miosix/config/arch/cortexM4_stm32f4/stm32f429zi_oledboard2/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2015 by Terraneo Federico                               *
+ *   Copyright (C) 2015-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F407VG only has 192KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F100RB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -79,5 +62,3 @@ static const unsigned char sdVoltage=33; //Board powered @ 3.3V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM4_stm32f4/stm32f429zi_skyward_anakin/board_settings.h b/miosix/config/arch/cortexM4_stm32f4/stm32f429zi_skyward_anakin/board_settings.h
index 1e8abed4..9135aa12 100644
--- a/miosix/config/arch/cortexM4_stm32f4/stm32f429zi_skyward_anakin/board_settings.h
+++ b/miosix/config/arch/cortexM4_stm32f4/stm32f429zi_skyward_anakin/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2016 by Terraneo Federico                               *
+ *   Copyright (C) 2016-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F429ZI only has 256KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F429ZI timer in the
-/// anakin board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -85,5 +68,3 @@ static const unsigned char sdVoltage=33; //Board powered @ 3.3V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM4_stm32f4/stm32f429zi_skyward_homeone/board_settings.h b/miosix/config/arch/cortexM4_stm32f4/stm32f429zi_skyward_homeone/board_settings.h
index 8bc4129f..1f8aa559 100644
--- a/miosix/config/arch/cortexM4_stm32f4/stm32f429zi_skyward_homeone/board_settings.h
+++ b/miosix/config/arch/cortexM4_stm32f4/stm32f429zi_skyward_homeone/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2014 by Terraneo Federico                               *
+ *   Copyright (C) 2014-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F407VG only has 192KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F100RB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -85,5 +68,3 @@ static const unsigned char sdVoltage=30; //Board powered @ 3.0V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM4_stm32f4/stm32f429zi_stm32f4discovery/board_settings.h b/miosix/config/arch/cortexM4_stm32f4/stm32f429zi_stm32f4discovery/board_settings.h
index e92c9e20..5776efb4 100644
--- a/miosix/config/arch/cortexM4_stm32f4/stm32f429zi_stm32f4discovery/board_settings.h
+++ b/miosix/config/arch/cortexM4_stm32f4/stm32f429zi_stm32f4discovery/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2014 by Terraneo Federico                               *
+ *   Copyright (C) 2014-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F407VG only has 192KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F100RB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=1;
 const unsigned int defaultSerialSpeed=19200;
@@ -81,5 +64,3 @@ static const unsigned char sdVoltage=30; //Board powered @ 3.0V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM4_stm32f4/stm32f469ni_stm32f469i-disco/board_settings.h b/miosix/config/arch/cortexM4_stm32f4/stm32f469ni_stm32f469i-disco/board_settings.h
index 4b1ac0c2..8eed4c2f 100644
--- a/miosix/config/arch/cortexM4_stm32f4/stm32f469ni_stm32f469i-disco/board_settings.h
+++ b/miosix/config/arch/cortexM4_stm32f4/stm32f469ni_stm32f469i-disco/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2014 by Terraneo Federico                               *
+ *   Copyright (C) 2014-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F407VG only has 192KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F100RB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 /// Using the Serial port 3 because it is the virtual serial port available 
 /// through ST-LINK on the stm32f469i-disco board  
@@ -83,5 +66,3 @@ static const unsigned char sdVoltage=30; //Board powered @ 3.0V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM4_stm32l4/stm32l476rg_nucleo/board_settings.h b/miosix/config/arch/cortexM4_stm32l4/stm32l476rg_nucleo/board_settings.h
index cd357763..4d87755d 100644
--- a/miosix/config/arch/cortexM4_stm32l4/stm32l476rg_nucleo/board_settings.h
+++ b/miosix/config/arch/cortexM4_stm32l4/stm32l476rg_nucleo/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2015 by Terraneo Federico                               *
+ *   Copyright (C) 2015-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -48,20 +45,6 @@ namespace miosix {
 /// STM32F407VG only has 192KB of RAM so there is room for a big 4K stack.
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F100RB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 const unsigned int defaultSerial=2;
 const unsigned int defaultSerialSpeed=19200;
@@ -79,5 +62,3 @@ static const unsigned char sdVoltage=33; //Board powered @ 3.3V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM7_stm32f7/stm32f746zg_nucleo/board_settings.h b/miosix/config/arch/cortexM7_stm32f7/stm32f746zg_nucleo/board_settings.h
index 5a70bc39..f6149c75 100644
--- a/miosix/config/arch/cortexM7_stm32f7/stm32f746zg_nucleo/board_settings.h
+++ b/miosix/config/arch/cortexM7_stm32f7/stm32f746zg_nucleo/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2018 by Terraneo Federico                               *
+ *   Copyright (C) 2018-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -47,20 +44,6 @@ namespace miosix {
 /// The C standard library is stack-heavy (iprintf requires 1KB) 
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F100RB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 //This board only exposes USART3, without flow control, connected to an UART/USB
 const unsigned int defaultSerialSpeed=115200;
@@ -77,5 +60,3 @@ static const unsigned char sdVoltage=33; //Board powered @ 3.3V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/arch/cortexM7_stm32h7/stm32h753xi_eval/board_settings.h b/miosix/config/arch/cortexM7_stm32h7/stm32h753xi_eval/board_settings.h
index 7466ebaf..f0d38692 100644
--- a/miosix/config/arch/cortexM7_stm32h7/stm32h753xi_eval/board_settings.h
+++ b/miosix/config/arch/cortexM7_stm32h7/stm32h753xi_eval/board_settings.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2018 by Terraneo Federico                               *
+ *   Copyright (C) 2018-2021 by Terraneo Federico                          *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -25,16 +25,13 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#ifndef BOARD_SETTINGS_H
-#define	BOARD_SETTINGS_H
-
-#include "util/version.h"
+#pragma once
 
 /**
  * \internal
  * Versioning for board_settings.h for out of git tree projects
  */
-#define BOARD_SETTINGS_VERSION 100
+#define BOARD_SETTINGS_VERSION 300
 
 namespace miosix {
 
@@ -47,20 +44,6 @@ namespace miosix {
 /// The C standard library is stack-heavy (iprintf requires 1KB)
 const unsigned int MAIN_STACK_SIZE=4*1024;
 
-/// Frequency of tick (in Hz). The frequency of the STM32F100RB timer in the
-/// stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz
-/// tick and the minimun Thread::sleep value is 1ms
-/// For the priority scheduler this is also the context switch frequency
-const unsigned int TICK_FREQ=1000;
-
-///\internal Aux timer run @ 100KHz
-///Note that since the timer is only 16 bits this imposes a limit on the
-///burst measurement of 655ms. If due to a pause_kernel() or
-///disable_interrupts() section a thread runs for more than that time, a wrong
-///burst value will be measured
-const unsigned int AUX_TIMER_CLOCK=100000;
-const unsigned int AUX_TIMER_MAX=0xffff; ///<\internal Aux timer is 16 bits
-
 /// Serial port
 //This board only exposes USART1, without flow control
 const unsigned int defaultSerialSpeed=115200;
@@ -77,5 +60,3 @@ static const unsigned char sdVoltage=33; //Board powered @ 3.3V
  */
 
 } //namespace miosix
-
-#endif	/* BOARD_SETTINGS_H */
diff --git a/miosix/config/miosix_settings.h b/miosix/config/miosix_settings.h
index 710ad06c..a5a3d675 100644
--- a/miosix/config/miosix_settings.h
+++ b/miosix/config/miosix_settings.h
@@ -203,6 +203,10 @@ const short int PRIORITY_MAX=64;
 /// The meaning of a thread's priority depends on the chosen scheduler.
 const unsigned char MAIN_PRIORITY=1;
 
+#ifdef SCHED_TYPE_PRIORITY
+/// Maximum thread time slice in nanoseconds, after which preemption occurs
+const unsigned int MAX_TIME_SLICE=1000000;
+#endif //SCHED_TYPE_PRIORITY
 
 
 //
diff --git a/miosix/kernel/scheduler/priority/priority_scheduler.cpp b/miosix/kernel/scheduler/priority/priority_scheduler.cpp
index a85cf39e..62060002 100644
--- a/miosix/kernel/scheduler/priority/priority_scheduler.cpp
+++ b/miosix/kernel/scheduler/priority/priority_scheduler.cpp
@@ -219,14 +219,14 @@ static void IRQsetNextPreemption(bool curIsIdleThread){
     if (curIsIdleThread)
         nextPeriodicPreemption = firstWakeupInList;
     else
-        nextPeriodicPreemption = std::min(firstWakeupInList, timer->IRQgetCurrentTime() + preemptionPeriodNs);
+        nextPeriodicPreemption = std::min(firstWakeupInList, timer->IRQgetCurrentTime() + MAX_TIME_SLICE);
     
     timer->IRQsetNextInterrupt(nextPeriodicPreemption);
 }
 
 unsigned int PriorityScheduler::IRQfindNextThread()
 {
-    if(kernel_running!=0) return preemptionPeriodNs;//If kernel is paused, do nothing
+    if(kernel_running!=0) return MAX_TIME_SLICE;//If kernel is paused, do nothing
     for(int i=PRIORITY_MAX-1;i>=0;i--)
     {
         if(thread_list[i]==NULL) continue;
@@ -254,7 +254,7 @@ unsigned int PriorityScheduler::IRQfindNextThread()
                 //a different thread, if available, will be chosen first
                 thread_list[i]=temp;
                 IRQsetNextPreemption(false);
-                return preemptionPeriodNs;
+                return MAX_TIME_SLICE;
             } else temp=temp->schedData.next;
             if(temp==thread_list[i]->schedData.next) break;
         }
@@ -266,7 +266,7 @@ unsigned int PriorityScheduler::IRQfindNextThread()
     MPUConfiguration::IRQdisable();
     #endif //WITH_PROCESSES
     IRQsetNextPreemption(true);
-    return preemptionPeriodNs;
+    return MAX_TIME_SLICE;
 }
 
 Thread *PriorityScheduler::thread_list[PRIORITY_MAX]={0};
diff --git a/miosix/util/version.cpp b/miosix/util/version.cpp
index ba684058..80fdbaa9 100644
--- a/miosix/util/version.cpp
+++ b/miosix/util/version.cpp
@@ -34,7 +34,7 @@
 #error You need to update miosix_settings.h to match the version in the kernel.
 #endif
 
-#if BOARD_SETTINGS_VERSION != 100
+#if BOARD_SETTINGS_VERSION != 300
 #error You need to update board_settings.h to match the version in the kernel.
 #endif
 
-- 
GitLab