git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@16324 27425a3e-05d8-49a3-a47f-9c15f0e5edd8

This commit is contained in:
fxcoder 2023-07-09 13:14:01 +00:00
parent 047402a73f
commit 2ccdccc929
1 changed files with 2 additions and 4 deletions

View File

@ -431,12 +431,11 @@ void dac_lld_start(DACDriver *dacp) {
channel = 1; channel = 1;
} }
#endif #endif
uint32_t reg;
#if STM32_DAC_DUAL_MODE == FALSE #if STM32_DAC_DUAL_MODE == FALSE
/* Enabling DAC in SW triggering mode initially, initializing data to /* Enabling DAC in SW triggering mode initially, initializing data to
configuration default.*/ configuration default.*/
{ {
uint32_t reg;
/* Operating in SINGLE mode with one channel to set. Set registers for /* Operating in SINGLE mode with one channel to set. Set registers for
specified channel from configuration. Lower half word of specified channel from configuration. Lower half word of
@ -774,9 +773,8 @@ void dac_lld_start_conversion(DACDriver *dacp) {
STM32_DMA_CR_HTIE | STM32_DMA_CR_TCIE); STM32_DMA_CR_HTIE | STM32_DMA_CR_TCIE);
dmaStreamEnable(dacp->dma); dmaStreamEnable(dacp->dma);
/* DAC configuration. Mask out DMA enable*/ /* DAC configuration.*/
cr = dacp->params->dac->CR; cr = dacp->params->dac->CR;
cr &= ~(DAC_CR_DMAEN2);
#if STM32_DAC_DUAL_MODE == FALSE #if STM32_DAC_DUAL_MODE == FALSE
/* Start the DMA on the single channel.*/ /* Start the DMA on the single channel.*/
cr &= dacp->params->regmask; cr &= dacp->params->regmask;