aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-03-24 14:12:49 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-03-24 14:12:49 +0000
commitca3e1fceff045907011d214b13e477b432e04381 (patch)
tree64d143a8495acace2728b32d8be7111b20e92469
parent727d7f2622132923e465443aca04693a5201682f (diff)
downloadChibiOS-ca3e1fceff045907011d214b13e477b432e04381.tar.gz
ChibiOS-ca3e1fceff045907011d214b13e477b432e04381.tar.bz2
ChibiOS-ca3e1fceff045907011d214b13e477b432e04381.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5499 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/hal/platforms/STM32F37x/adc_lld.c4
-rw-r--r--testhal/STM32F37x/SDADC/Makefile2
2 files changed, 3 insertions, 3 deletions
diff --git a/os/hal/platforms/STM32F37x/adc_lld.c b/os/hal/platforms/STM32F37x/adc_lld.c
index 7b4d34ae0..582f84d8f 100644
--- a/os/hal/platforms/STM32F37x/adc_lld.c
+++ b/os/hal/platforms/STM32F37x/adc_lld.c
@@ -45,7 +45,6 @@
#define SDADC_FORBIDDEN_CR2_FLAGS (SDADC_CR2_RSWSTART | \
SDADC_CR2_RCONT | \
SDADC_CR2_RCH | \
- SDADC_CR2_JSWSTART | \
SDADC_CR2_JCONT | \
SDADC_CR2_STARTCALIB | \
SDADC_CR2_CALIBCNT)
@@ -93,6 +92,7 @@ static const ADCConfig adc_lld_default_config = {0};
* @notapi
*/
static void adc_lld_serve_dma_interrupt(ADCDriver *adcp, uint32_t flags) {
+
/* DMA errors handling.*/
if ((flags & (STM32_DMA_ISR_TEIF | STM32_DMA_ISR_DMEIF)) != 0) {
/* DMA, this could help only if the DMA tries to access an unmapped
@@ -530,6 +530,7 @@ void adc_lld_start_conversion(ADCDriver *adcp) {
;
/* SDADC setup.*/
+ adcp->sdadc->JCHGR = grpp->u.sdadc.jchgr;
adcp->sdadc->CONF0R = grpp->u.sdadc.confxr[0];
adcp->sdadc->CONF1R = grpp->u.sdadc.confxr[1];
adcp->sdadc->CONF2R = grpp->u.sdadc.confxr[2];
@@ -542,7 +543,6 @@ void adc_lld_start_conversion(ADCDriver *adcp) {
/* SDADC conversion start, the start is performed using the method
specified in the CR2 configuration, usually SDADC_CR2_JSWSTART.*/
adcp->sdadc->CR2 = cr2;
-// adcp->sdadc->CR2 = adcp->sdadc->CR2; /* Triggers the conversion start.*/
}
#endif /* STM32_ADC_USE_SDADC */
#if STM32_ADC_USE_ADC && STM32_ADC_USE_SDADC
diff --git a/testhal/STM32F37x/SDADC/Makefile b/testhal/STM32F37x/SDADC/Makefile
index 782a3b3d7..0090b317a 100644
--- a/testhal/STM32F37x/SDADC/Makefile
+++ b/testhal/STM32F37x/SDADC/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).