SDADC correct CORTEX_PRIORITY_MASK patch

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
tdwebste
Posts: 35
Joined: Mon Jan 14, 2013 2:01 pm

SDADC correct CORTEX_PRIORITY_MASK patch

Post by tdwebste »

I have changed CORTEX_PRIORITY_MASK to use the sdadc on the stm32f37x.

From 57b61efa1824544f1b41e2ead9c82c05d109652d Mon Sep 17 00:00:00 2001
From: Timothy Webster <[email protected]>
Date: Sun, 1 Dec 2013 23:36:29 -0500
Subject: [PATCH] correct SDADC mask constant

---
os/hal/platforms/STM32F37x/adc_lld.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/os/hal/platforms/STM32F37x/adc_lld.c b/os/hal/platforms/STM32F37x/adc_lld.c
index ff5ef60..04979eb 100644
--- a/os/hal/platforms/STM32F37x/adc_lld.c
+++ b/os/hal/platforms/STM32F37x/adc_lld.c
@@ -322,7 +322,7 @@ void adc_lld_init(void) {
STM32_DMA_CR_MSIZE_HWORD | STM32_DMA_CR_PSIZE_HWORD |
STM32_DMA_CR_MINC | STM32_DMA_CR_TCIE |
STM32_DMA_CR_DMEIE | STM32_DMA_CR_TEIE;
- nvicEnableVector(ADC1_IRQn, CORTEX_PRIORITY_MASK(STM32_ADC_IRQ_PRIORITY));
+ nvicEnableVector(ADC1_IRQn, CORTEX_PRIORITY_MASK(STM32_ADC_ADC1_IRQ_PRIORITY));
#endif

#if STM32_ADC_USE_SDADC1
--
1.8.1.2
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: SDADC correct CORTEX_PRIORITY_MASK patch

Post by Giovanni »

Thanks for finding, this will required changing also all the mcuconf.h files in 2.6.x, 3.0.x and trunk.

Using the mcuconf.h files as provided hides the problem.

Edit: opened a ticked about this https://sourceforge.net/p/chibios/bugs/444/

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: SDADC correct CORTEX_PRIORITY_MASK patch

Post by Giovanni »

Fixed in repository.

Giovanni
Post Reply