From a19e1f780efd5365dc2210da49dd7d60362dc335 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Sat, 9 Apr 2022 18:56:12 -0400 Subject: [PATCH] reduce HRT_INTERVAL_MIN to 10 us --- platforms/nuttx/src/px4/nxp/imxrt/hrt/hrt.c | 2 +- platforms/nuttx/src/px4/nxp/kinetis/hrt/hrt.c | 2 +- platforms/nuttx/src/px4/nxp/s32k1xx/hrt/hrt.c | 2 +- platforms/nuttx/src/px4/rpi/rpi_common/hrt/hrt.c | 2 +- platforms/nuttx/src/px4/stm/stm32_common/hrt/hrt.c | 2 +- platforms/posix/src/px4/common/drv_hrt.cpp | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/platforms/nuttx/src/px4/nxp/imxrt/hrt/hrt.c b/platforms/nuttx/src/px4/nxp/imxrt/hrt/hrt.c index 7106a1814c..fac44fc51e 100644 --- a/platforms/nuttx/src/px4/nxp/imxrt/hrt/hrt.c +++ b/platforms/nuttx/src/px4/nxp/imxrt/hrt/hrt.c @@ -124,7 +124,7 @@ * reading a time and writing a deadline to the timer cannot * result in missing the deadline. */ -#define HRT_INTERVAL_MIN 50 +#define HRT_INTERVAL_MIN 10 #define HRT_INTERVAL_MAX 4294951760LL /* diff --git a/platforms/nuttx/src/px4/nxp/kinetis/hrt/hrt.c b/platforms/nuttx/src/px4/nxp/kinetis/hrt/hrt.c index 8956ddf15a..ad88317210 100644 --- a/platforms/nuttx/src/px4/nxp/kinetis/hrt/hrt.c +++ b/platforms/nuttx/src/px4/nxp/kinetis/hrt/hrt.c @@ -119,7 +119,7 @@ * reading a time and writing a deadline to the timer cannot * result in missing the deadline. */ -#define HRT_INTERVAL_MIN 50 +#define HRT_INTERVAL_MIN 10 #define HRT_INTERVAL_MAX 50000 /* diff --git a/platforms/nuttx/src/px4/nxp/s32k1xx/hrt/hrt.c b/platforms/nuttx/src/px4/nxp/s32k1xx/hrt/hrt.c index 71a97c9d81..5b318f0d4a 100644 --- a/platforms/nuttx/src/px4/nxp/s32k1xx/hrt/hrt.c +++ b/platforms/nuttx/src/px4/nxp/s32k1xx/hrt/hrt.c @@ -147,7 +147,7 @@ * reading a time and writing a deadline to the timer cannot * result in missing the deadline. */ -#define HRT_INTERVAL_MIN 50 +#define HRT_INTERVAL_MIN 10 #define HRT_INTERVAL_MAX 50000 /* diff --git a/platforms/nuttx/src/px4/rpi/rpi_common/hrt/hrt.c b/platforms/nuttx/src/px4/rpi/rpi_common/hrt/hrt.c index 12050a247d..2685323555 100644 --- a/platforms/nuttx/src/px4/rpi/rpi_common/hrt/hrt.c +++ b/platforms/nuttx/src/px4/rpi/rpi_common/hrt/hrt.c @@ -100,7 +100,7 @@ * reading a time and writing a deadline to the timer cannot * result in missing the deadline. */ -#define HRT_INTERVAL_MIN 50 +#define HRT_INTERVAL_MIN 10 #define HRT_INTERVAL_MAX 4000000000 /* diff --git a/platforms/nuttx/src/px4/stm/stm32_common/hrt/hrt.c b/platforms/nuttx/src/px4/stm/stm32_common/hrt/hrt.c index 025e31a003..cfd7e88cf7 100644 --- a/platforms/nuttx/src/px4/stm/stm32_common/hrt/hrt.c +++ b/platforms/nuttx/src/px4/stm/stm32_common/hrt/hrt.c @@ -209,7 +209,7 @@ void hrt_usr_call(void *arg) * reading a time and writing a deadline to the timer cannot * result in missing the deadline. */ -#define HRT_INTERVAL_MIN 50 +#define HRT_INTERVAL_MIN 10 #define HRT_INTERVAL_MAX 50000 /* diff --git a/platforms/posix/src/px4/common/drv_hrt.cpp b/platforms/posix/src/px4/common/drv_hrt.cpp index a75c953f85..b8a6245aa3 100644 --- a/platforms/posix/src/px4/common/drv_hrt.cpp +++ b/platforms/posix/src/px4/common/drv_hrt.cpp @@ -55,8 +55,8 @@ #endif // Intervals in usec -static constexpr unsigned HRT_INTERVAL_MIN = 50; -static constexpr unsigned HRT_INTERVAL_MAX = 50000000; +static constexpr unsigned HRT_INTERVAL_MIN = 10; +static constexpr unsigned HRT_INTERVAL_MAX = 50000; /* * Queue of callout entries.