Page 1 of 1

SDADC correct CORTEX_PRIORITY_MASK patch

Posted: Mon Dec 02, 2013 4:40 pm
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

Re: SDADC correct CORTEX_PRIORITY_MASK patch

Posted: Mon Dec 02, 2013 5:08 pm
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

Re: SDADC correct CORTEX_PRIORITY_MASK patch

Posted: Tue Dec 03, 2013 12:29 pm
by Giovanni
Fixed in repository.

Giovanni