aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-12-05 11:17:28 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-12-05 11:17:28 +0000
commit9210ae4da0ebf07120028faf2473b1a11d84863c (patch)
tree5a5632aab890a9c802148ee64d8521b3c7061283
parent00edb39399bbd765f08bdc917aaa6624af1f7778 (diff)
downloadChibiOS-9210ae4da0ebf07120028faf2473b1a11d84863c.tar.gz
ChibiOS-9210ae4da0ebf07120028faf2473b1a11d84863c.tar.bz2
ChibiOS-9210ae4da0ebf07120028faf2473b1a11d84863c.zip
Fixed bug #677.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8568 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/hal/ports/STM32/LLD/DACv1/dac_lld.c3
-rw-r--r--readme.txt2
-rw-r--r--testhal/STM32/STM32F3xx/DAC/debug/STM32F3xx-DAC (OpenOCD, Flash and Run).launch2
3 files changed, 6 insertions, 1 deletions
diff --git a/os/hal/ports/STM32/LLD/DACv1/dac_lld.c b/os/hal/ports/STM32/LLD/DACv1/dac_lld.c
index faebcadc0..5ab25bae1 100644
--- a/os/hal/ports/STM32/LLD/DACv1/dac_lld.c
+++ b/os/hal/ports/STM32/LLD/DACv1/dac_lld.c
@@ -419,6 +419,7 @@ void dac_lld_start_conversion(DACDriver *dacp) {
dmaStreamSetPeripheral(dacp->params->dma, &dacp->params->dac->DHR12RD);
dmamode = dacp->params->dmamode |
STM32_DMA_CR_PSIZE_WORD | STM32_DMA_CR_MSIZE_WORD;
+ n /= 2;
break;
case DAC_DHRM_12BIT_LEFT_DUAL:
osalDbgAssert(dacp->grpp->num_channels == 2, "invalid number of channels");
@@ -426,6 +427,7 @@ void dac_lld_start_conversion(DACDriver *dacp) {
dmaStreamSetPeripheral(dacp->params->dma, &dacp->params->dac->DHR12LD);
dmamode = dacp->params->dmamode |
STM32_DMA_CR_PSIZE_WORD | STM32_DMA_CR_MSIZE_WORD;
+ n /= 2;
break;
case DAC_DHRM_8BIT_RIGHT_DUAL:
osalDbgAssert(dacp->grpp->num_channels == 1, "invalid number of channels");
@@ -433,6 +435,7 @@ void dac_lld_start_conversion(DACDriver *dacp) {
dmaStreamSetPeripheral(dacp->params->dma, &dacp->params->dac->DHR8RD);
dmamode = dacp->params->dmamode |
STM32_DMA_CR_PSIZE_HWORD | STM32_DMA_CR_MSIZE_HWORD;
+ n /= 2;
break;
#endif
default:
diff --git a/readme.txt b/readme.txt
index 8fefe6b4a..0460478d1 100644
--- a/readme.txt
+++ b/readme.txt
@@ -137,6 +137,8 @@
- HAL: Updated STM32F0xx headers to STM32CubeF0 version 1.3.0. Added support
for STM32F030xC, STM32F070x6, STM32F070xB, STM32F091xC,
STM32F098xx devices.
+- HAL: Fixed invalid DMA settings in STM32 DACv1 driver in dual mode
+ (bug #677)(backported to 3.0.4).
- HAL: Fixed usbStop() hangs in STM32 OTGv1 driver (bug #674)(backported
to 3.0.4 and 2.6.10).
- HAL: Fixed STM32 I2Cv2 driver fails on transfers greater than 255 bytes
diff --git a/testhal/STM32/STM32F3xx/DAC/debug/STM32F3xx-DAC (OpenOCD, Flash and Run).launch b/testhal/STM32/STM32F3xx/DAC/debug/STM32F3xx-DAC (OpenOCD, Flash and Run).launch
index 1672e88e6..847724394 100644
--- a/testhal/STM32/STM32F3xx/DAC/debug/STM32F3xx-DAC (OpenOCD, Flash and Run).launch
+++ b/testhal/STM32/STM32F3xx/DAC/debug/STM32F3xx-DAC (OpenOCD, Flash and Run).launch
@@ -33,7 +33,7 @@
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
-<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content id=&quot;CR2-adc-adcp-adc_lld_start_conversion-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;CR2-adc-null-port_wait_for_interrupt-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;cr2-adc_lld_start_conversion-(format)&quot; val=&quot;4&quot;/&gt;&lt;/contentList&gt;"/>
+<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content id=&quot;cr2-adc_lld_start_conversion-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;CR2-adc-null-port_wait_for_interrupt-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;CR2-adc-adcp-adc_lld_start_conversion-(format)&quot; val=&quot;4&quot;/&gt;&lt;/contentList&gt;"/>
<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;globalVariableList/&gt;&#13;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList/&gt;&#13;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="./build/ch.elf"/>