aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/ports/STM32/LLD/TIMv1/gpt_lld.c4
-rw-r--r--os/hal/ports/STM32/LLD/TIMv1/gpt_lld.h5
-rw-r--r--testhal/STM32F0xx/IRQ_STORM/chconf.h2
-rw-r--r--testhal/STM32F0xx/IRQ_STORM/main.c2
-rw-r--r--testhal/STM32F1xx/IRQ_STORM/main.c2
-rw-r--r--testhal/STM32F30x/IRQ_STORM/main.c2
-rw-r--r--testhal/STM32F37x/IRQ_STORM/.cproject1
-rw-r--r--testhal/STM32F37x/IRQ_STORM/main.c2
-rw-r--r--testhal/STM32F4xx/GPT/main.c2
-rw-r--r--testhal/STM32F4xx/IRQ_STORM/main.c2
-rw-r--r--testhal/STM32F4xx/IRQ_STORM_FPU/main.c2
-rw-r--r--testhal/STM32L1xx/IRQ_STORM/main.c2
12 files changed, 25 insertions, 3 deletions
diff --git a/os/hal/ports/STM32/LLD/TIMv1/gpt_lld.c b/os/hal/ports/STM32/LLD/TIMv1/gpt_lld.c
index b817c5d26..2852f383a 100644
--- a/os/hal/ports/STM32/LLD/TIMv1/gpt_lld.c
+++ b/os/hal/ports/STM32/LLD/TIMv1/gpt_lld.c
@@ -602,10 +602,10 @@ void gpt_lld_start(GPTDriver *gptp) {
/* Timer configuration.*/
gptp->tim->CR1 = 0; /* Initially stopped. */
- gptp->tim->CR2 = STM32_TIM_CR2_CCDS; /* DMA on UE (if any). */
+ gptp->tim->CR2 = gptp->config->cr2;
gptp->tim->PSC = psc; /* Prescaler value. */
gptp->tim->DIER = gptp->config->dier & /* DMA-related DIER bits. */
- STM32_TIM_DIER_IRQ_MASK;
+ ~STM32_TIM_DIER_IRQ_MASK;
gptp->tim->SR = 0; /* Clear pending IRQs. */
}
diff --git a/os/hal/ports/STM32/LLD/TIMv1/gpt_lld.h b/os/hal/ports/STM32/LLD/TIMv1/gpt_lld.h
index 56dc04f6b..4a914133e 100644
--- a/os/hal/ports/STM32/LLD/TIMv1/gpt_lld.h
+++ b/os/hal/ports/STM32/LLD/TIMv1/gpt_lld.h
@@ -387,6 +387,11 @@ typedef struct {
gptcallback_t callback;
/* End of the mandatory fields.*/
/**
+ * @brief TIM CR2 register initialization data.
+ * @note The value of this field should normally be equal to zero.
+ */
+ uint32_t cr2;
+ /**
* @brief TIM DIER register initialization data.
* @note The value of this field should normally be equal to zero.
* @note Only the DMA-related bits can be specified in this field.
diff --git a/testhal/STM32F0xx/IRQ_STORM/chconf.h b/testhal/STM32F0xx/IRQ_STORM/chconf.h
index 7ff9a1440..1b81d6805 100644
--- a/testhal/STM32F0xx/IRQ_STORM/chconf.h
+++ b/testhal/STM32F0xx/IRQ_STORM/chconf.h
@@ -137,7 +137,7 @@
*
* @note The default is @p TRUE.
*/
-#define CH_CFG_USE_TM TRUE
+#define CH_CFG_USE_TM FALSE
/**
* @brief Threads registry APIs.
diff --git a/testhal/STM32F0xx/IRQ_STORM/main.c b/testhal/STM32F0xx/IRQ_STORM/main.c
index 5c520ca6b..22baf6e62 100644
--- a/testhal/STM32F0xx/IRQ_STORM/main.c
+++ b/testhal/STM32F0xx/IRQ_STORM/main.c
@@ -148,6 +148,7 @@ static void gpt3cb(GPTDriver *gptp) {
static const GPTConfig gpt2cfg = {
1000000, /* 1MHz timer clock.*/
gpt2cb, /* Timer callback.*/
+ 0,
0
};
@@ -157,6 +158,7 @@ static const GPTConfig gpt2cfg = {
static const GPTConfig gpt3cfg = {
1000000, /* 1MHz timer clock.*/
gpt3cb, /* Timer callback.*/
+ 0,
0
};
diff --git a/testhal/STM32F1xx/IRQ_STORM/main.c b/testhal/STM32F1xx/IRQ_STORM/main.c
index 20a6a02fb..51806a45b 100644
--- a/testhal/STM32F1xx/IRQ_STORM/main.c
+++ b/testhal/STM32F1xx/IRQ_STORM/main.c
@@ -148,6 +148,7 @@ static void gpt3cb(GPTDriver *gptp) {
static const GPTConfig gpt4cfg = {
1000000, /* 1MHz timer clock.*/
gpt4cb, /* Timer callback.*/
+ 0,
0
};
@@ -157,6 +158,7 @@ static const GPTConfig gpt4cfg = {
static const GPTConfig gpt3cfg = {
1000000, /* 1MHz timer clock.*/
gpt3cb, /* Timer callback.*/
+ 0,
0
};
diff --git a/testhal/STM32F30x/IRQ_STORM/main.c b/testhal/STM32F30x/IRQ_STORM/main.c
index b88f13912..89d688016 100644
--- a/testhal/STM32F30x/IRQ_STORM/main.c
+++ b/testhal/STM32F30x/IRQ_STORM/main.c
@@ -148,6 +148,7 @@ static void gpt3cb(GPTDriver *gptp) {
static const GPTConfig gpt4cfg = {
1000000, /* 1MHz timer clock.*/
gpt4cb, /* Timer callback.*/
+ 0,
0
};
@@ -157,6 +158,7 @@ static const GPTConfig gpt4cfg = {
static const GPTConfig gpt3cfg = {
1000000, /* 1MHz timer clock.*/
gpt3cb, /* Timer callback.*/
+ 0,
0
};
diff --git a/testhal/STM32F37x/IRQ_STORM/.cproject b/testhal/STM32F37x/IRQ_STORM/.cproject
index bf0ac2f78..77982a8a0 100644
--- a/testhal/STM32F37x/IRQ_STORM/.cproject
+++ b/testhal/STM32F37x/IRQ_STORM/.cproject
@@ -48,4 +48,5 @@
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="refreshScope"/>
</cproject>
diff --git a/testhal/STM32F37x/IRQ_STORM/main.c b/testhal/STM32F37x/IRQ_STORM/main.c
index dd4098a3e..5d42eb65e 100644
--- a/testhal/STM32F37x/IRQ_STORM/main.c
+++ b/testhal/STM32F37x/IRQ_STORM/main.c
@@ -148,6 +148,7 @@ static void gpt3cb(GPTDriver *gptp) {
static const GPTConfig gpt2cfg = {
1000000, /* 1MHz timer clock.*/
gpt2cb, /* Timer callback.*/
+ 0,
0
};
@@ -157,6 +158,7 @@ static const GPTConfig gpt2cfg = {
static const GPTConfig gpt3cfg = {
1000000, /* 1MHz timer clock.*/
gpt3cb, /* Timer callback.*/
+ 0,
0
};
diff --git a/testhal/STM32F4xx/GPT/main.c b/testhal/STM32F4xx/GPT/main.c
index 2d01d31ff..88fb58e7d 100644
--- a/testhal/STM32F4xx/GPT/main.c
+++ b/testhal/STM32F4xx/GPT/main.c
@@ -44,6 +44,7 @@ static void gpt3cb(GPTDriver *gptp) {
static const GPTConfig gpt4cfg = {
10000, /* 10kHz timer clock.*/
gpt4cb, /* Timer callback.*/
+ 0,
0
};
@@ -53,6 +54,7 @@ static const GPTConfig gpt4cfg = {
static const GPTConfig gpt3cfg = {
10000, /* 10kHz timer clock.*/
gpt3cb, /* Timer callback.*/
+ 0,
0
};
diff --git a/testhal/STM32F4xx/IRQ_STORM/main.c b/testhal/STM32F4xx/IRQ_STORM/main.c
index 4994e77e3..861a6e033 100644
--- a/testhal/STM32F4xx/IRQ_STORM/main.c
+++ b/testhal/STM32F4xx/IRQ_STORM/main.c
@@ -148,6 +148,7 @@ static void gpt3cb(GPTDriver *gptp) {
static const GPTConfig gpt4cfg = {
1000000, /* 1MHz timer clock.*/
gpt4cb, /* Timer callback.*/
+ 0,
0
};
@@ -157,6 +158,7 @@ static const GPTConfig gpt4cfg = {
static const GPTConfig gpt3cfg = {
1000000, /* 1MHz timer clock.*/
gpt3cb, /* Timer callback.*/
+ 0,
0
};
diff --git a/testhal/STM32F4xx/IRQ_STORM_FPU/main.c b/testhal/STM32F4xx/IRQ_STORM_FPU/main.c
index 4b925d600..7ec769a9c 100644
--- a/testhal/STM32F4xx/IRQ_STORM_FPU/main.c
+++ b/testhal/STM32F4xx/IRQ_STORM_FPU/main.c
@@ -128,6 +128,7 @@ static void gpt3cb(GPTDriver *gptp) {
static const GPTConfig gpt4cfg = {
1000000, /* 1MHz timer clock.*/
gpt4cb, /* Timer callback.*/
+ 0,
0
};
@@ -137,6 +138,7 @@ static const GPTConfig gpt4cfg = {
static const GPTConfig gpt3cfg = {
1000000, /* 1MHz timer clock.*/
gpt3cb, /* Timer callback.*/
+ 0,
0
};
diff --git a/testhal/STM32L1xx/IRQ_STORM/main.c b/testhal/STM32L1xx/IRQ_STORM/main.c
index 71b5128e2..c66bd7e13 100644
--- a/testhal/STM32L1xx/IRQ_STORM/main.c
+++ b/testhal/STM32L1xx/IRQ_STORM/main.c
@@ -148,6 +148,7 @@ static void gpt3cb(GPTDriver *gptp) {
static const GPTConfig gpt4cfg = {
1000000, /* 1MHz timer clock.*/
gpt4cb, /* Timer callback.*/
+ 0,
0
};
@@ -157,6 +158,7 @@ static const GPTConfig gpt4cfg = {
static const GPTConfig gpt3cfg = {
1000000, /* 1MHz timer clock.*/
gpt3cb, /* Timer callback.*/
+ 0,
0
};