From 286deccd1280b0d66ccc6d9b2617719582607f0d Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Thu, 12 Oct 2017 08:37:47 +0000 Subject: EXPERIMENTAL: Introduced sysinterval_t in RT, now system time and intervals are different types and could have different sizes. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/rt5_dev_point1@10812 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/STM32/RT-STM32F746G-DISCOVERY/Makefile | 2 +- demos/STM32/RT-STM32F746G-DISCOVERY/chconf.h | 12 +++ ...F746G-DISCOVERY (OpenOCD, Flash and Run).launch | 104 ++++++++++----------- demos/STM32/RT-STM32F746G-DISCOVERY/main.c | 6 +- 4 files changed, 68 insertions(+), 56 deletions(-) (limited to 'demos/STM32') diff --git a/demos/STM32/RT-STM32F746G-DISCOVERY/Makefile b/demos/STM32/RT-STM32F746G-DISCOVERY/Makefile index 0273b285d..40b040625 100644 --- a/demos/STM32/RT-STM32F746G-DISCOVERY/Makefile +++ b/demos/STM32/RT-STM32F746G-DISCOVERY/Makefile @@ -103,7 +103,7 @@ include $(CHIBIOS)/os/hal/osal/rt/osal.mk include $(CHIBIOS)/os/rt/rt.mk include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk # Other files (optional). -include $(CHIBIOS)/test/rt/test.mk +#include $(CHIBIOS)/test/rt/test.mk # Define linker script file here LDSCRIPT= $(STARTUPLD)/STM32F746xG.ld diff --git a/demos/STM32/RT-STM32F746G-DISCOVERY/chconf.h b/demos/STM32/RT-STM32F746G-DISCOVERY/chconf.h index 0c2c44ee3..1bda70597 100644 --- a/demos/STM32/RT-STM32F746G-DISCOVERY/chconf.h +++ b/demos/STM32/RT-STM32F746G-DISCOVERY/chconf.h @@ -51,6 +51,18 @@ */ #define CH_CFG_ST_FREQUENCY 10000 +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#define CH_CFG_INTERVALS_SIZE 32 + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_TIME_TYPES_SIZE 32 + /** * @brief Time delta constant for the tick-less mode. * @note If this value is zero then the system uses the classic diff --git a/demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Flash and Run).launch b/demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Flash and Run).launch index 4b21ba8fe..05650c142 100644 --- a/demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Flash and Run).launch +++ b/demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Flash and Run).launch @@ -1,52 +1,52 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demos/STM32/RT-STM32F746G-DISCOVERY/main.c b/demos/STM32/RT-STM32F746G-DISCOVERY/main.c index 6db5cde31..0e62e3604 100644 --- a/demos/STM32/RT-STM32F746G-DISCOVERY/main.c +++ b/demos/STM32/RT-STM32F746G-DISCOVERY/main.c @@ -16,7 +16,7 @@ #include "ch.h" #include "hal.h" -#include "ch_test.h" +//#include "ch_test.h" /* * This is a periodic thread that does absolutely nothing except flashing @@ -71,8 +71,8 @@ int main(void) { * sleeping in a loop and check the button state. */ while (true) { - if (palReadLine(LINE_BUTTON_USER)) - test_execute((BaseSequentialStream *)&SD1); +// if (palReadLine(LINE_BUTTON_USER)) +// test_execute((BaseSequentialStream *)&SD1); chThdSleepMilliseconds(500); } } -- cgit v1.2.3 From d8b32d7f63c8453135249734f8b542856947e83a Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Thu, 12 Oct 2017 12:25:48 +0000 Subject: Rework of virtual timers in RT5, preparation. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/rt5_dev_point1@10813 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/STM32/RT-STM32F746G-DISCOVERY/Makefile | 2 +- .../debug/RT-STM32F746G-DISCOVERY (OpenOCD, Flash and Run).launch | 2 +- .../debug/RT-STM32F746G-DISCOVERY (OpenOCD, Just Run).launch | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'demos/STM32') diff --git a/demos/STM32/RT-STM32F746G-DISCOVERY/Makefile b/demos/STM32/RT-STM32F746G-DISCOVERY/Makefile index 40b040625..94853d1b3 100644 --- a/demos/STM32/RT-STM32F746G-DISCOVERY/Makefile +++ b/demos/STM32/RT-STM32F746G-DISCOVERY/Makefile @@ -5,7 +5,7 @@ # Compiler options here. ifeq ($(USE_OPT),) - USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 + USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16 endif # C specific options here (added to USE_OPT). diff --git a/demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Flash and Run).launch b/demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Flash and Run).launch index 05650c142..92f436493 100644 --- a/demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Flash and Run).launch +++ b/demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Flash and Run).launch @@ -33,7 +33,7 @@ - + diff --git a/demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Just Run).launch b/demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Just Run).launch index 3e12199dc..c64a7eb53 100644 --- a/demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Just Run).launch +++ b/demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Just Run).launch @@ -33,7 +33,7 @@ - + -- cgit v1.2.3 From 4d0b8bdf6e8c27242b38f69c0831eb2a0ddb689f Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Thu, 12 Oct 2017 13:31:42 +0000 Subject: Added support for "large virtual timers", those allows for intervals greater than the system time capability. To be tested. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/rt5_dev_point1@10814 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/STM32/RT-STM32F746G-DISCOVERY/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'demos/STM32') diff --git a/demos/STM32/RT-STM32F746G-DISCOVERY/Makefile b/demos/STM32/RT-STM32F746G-DISCOVERY/Makefile index 94853d1b3..40b040625 100644 --- a/demos/STM32/RT-STM32F746G-DISCOVERY/Makefile +++ b/demos/STM32/RT-STM32F746G-DISCOVERY/Makefile @@ -5,7 +5,7 @@ # Compiler options here. ifeq ($(USE_OPT),) - USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16 + USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 endif # C specific options here (added to USE_OPT). -- cgit v1.2.3 From 750a8f14b696e51b8522cddcf0265775b610dfa1 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Thu, 12 Oct 2017 18:50:41 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/rt5_dev_point1@10815 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- ...F746G-DISCOVERY (OpenOCD, Flash and Run).launch | 104 ++++++++++----------- 1 file changed, 52 insertions(+), 52 deletions(-) (limited to 'demos/STM32') diff --git a/demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Flash and Run).launch b/demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Flash and Run).launch index 92f436493..620c606b2 100644 --- a/demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Flash and Run).launch +++ b/demos/STM32/RT-STM32F746G-DISCOVERY/debug/RT-STM32F746G-DISCOVERY (OpenOCD, Flash and Run).launch @@ -1,52 +1,52 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From 72d563b45f02270fc18bfa61c0c0e7f94325e091 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 13 Oct 2017 08:52:00 +0000 Subject: Experimental code. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/rt5_dev_point1@10816 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/STM32/RT-STM32F746G-DISCOVERY/Makefile | 2 +- demos/STM32/RT-STM32F746G-DISCOVERY/chconf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'demos/STM32') diff --git a/demos/STM32/RT-STM32F746G-DISCOVERY/Makefile b/demos/STM32/RT-STM32F746G-DISCOVERY/Makefile index 40b040625..94853d1b3 100644 --- a/demos/STM32/RT-STM32F746G-DISCOVERY/Makefile +++ b/demos/STM32/RT-STM32F746G-DISCOVERY/Makefile @@ -5,7 +5,7 @@ # Compiler options here. ifeq ($(USE_OPT),) - USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 + USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16 endif # C specific options here (added to USE_OPT). diff --git a/demos/STM32/RT-STM32F746G-DISCOVERY/chconf.h b/demos/STM32/RT-STM32F746G-DISCOVERY/chconf.h index 1bda70597..206f1d11d 100644 --- a/demos/STM32/RT-STM32F746G-DISCOVERY/chconf.h +++ b/demos/STM32/RT-STM32F746G-DISCOVERY/chconf.h @@ -49,7 +49,7 @@ * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ -#define CH_CFG_ST_FREQUENCY 10000 +#define CH_CFG_ST_FREQUENCY 100000 /** * @brief Time intervals data size. -- cgit v1.2.3 From 882e9afb959e5ecc8800a79bb3cf3dabf1a7ccc6 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 13 Oct 2017 09:25:38 +0000 Subject: Now it is APPARENTLY working for intervals larger than system time. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/rt5_dev_point1@10817 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/STM32/RT-STM32F746G-DISCOVERY/chconf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'demos/STM32') diff --git a/demos/STM32/RT-STM32F746G-DISCOVERY/chconf.h b/demos/STM32/RT-STM32F746G-DISCOVERY/chconf.h index 206f1d11d..bba658831 100644 --- a/demos/STM32/RT-STM32F746G-DISCOVERY/chconf.h +++ b/demos/STM32/RT-STM32F746G-DISCOVERY/chconf.h @@ -42,7 +42,7 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ -#define CH_CFG_ST_RESOLUTION 32 +#define CH_CFG_ST_RESOLUTION 16 /** * @brief System tick frequency. -- cgit v1.2.3 From cb725828056b9564ab5d723bd0738375a83c077c Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 13 Oct 2017 12:35:40 +0000 Subject: Fixed and optimizations, NOW it seems to work for intervals larger than system time. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/rt5_dev_point1@10818 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/STM32/RT-STM32F746G-DISCOVERY/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'demos/STM32') diff --git a/demos/STM32/RT-STM32F746G-DISCOVERY/main.c b/demos/STM32/RT-STM32F746G-DISCOVERY/main.c index 0e62e3604..5199ddf37 100644 --- a/demos/STM32/RT-STM32F746G-DISCOVERY/main.c +++ b/demos/STM32/RT-STM32F746G-DISCOVERY/main.c @@ -29,9 +29,9 @@ static THD_FUNCTION(Thread1, arg) { chRegSetThreadName("blinker"); while (true) { palSetLine(LINE_ARD_D13); - chThdSleepMilliseconds(500); + chThdSleepMilliseconds(1000); palClearLine(LINE_ARD_D13); - chThdSleepMilliseconds(500); + chThdSleepMilliseconds(1000); } } @@ -64,7 +64,7 @@ int main(void) { /* * Creates the example thread. */ - chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); + chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO+1, Thread1, NULL); /* * Normal main() thread activity, in this demo it does nothing except @@ -73,6 +73,6 @@ int main(void) { while (true) { // if (palReadLine(LINE_BUTTON_USER)) // test_execute((BaseSequentialStream *)&SD1); - chThdSleepMilliseconds(500); + chThdSleepMilliseconds(2000); } } -- cgit v1.2.3