DMA init

Report here problems in any of ChibiOS components. This forum is NOT for support.
Post Reply
neums
Posts: 137
Joined: Fri May 08, 2015 1:09 pm
Has thanked: 10 times
Been thanked: 5 times

DMA init

Post by neums »

Hi,
in the DMA init function in file stm32_dma.c is the following code snippet:

Code: Select all

void dmaInit(void) {
  unsigned i;

  dma_streams_mask = 0U;
  for (i = 0U; i < STM32_DMA_STREAMS; i++) {
    _stm32_dma_streams[i].stream->CR = 0U;
    dma_isr_redir[i].dma_func = NULL;
  }
  DMA1->LIFCR = 0xFFFFFFFFU;
  DMA1->HIFCR = 0xFFFFFFFFU;
  DMA2->LIFCR = 0xFFFFFFFFU;
  DMA2->HIFCR = 0xFFFFFFFFU;
}


Due to reference manual RM0090 (STM32F4) the bits 31..28, 23, 17, 15..12, 7, 1 of DMA_LIFCR and DMA_HIFCR registers are reserved and must be kept at the reset value 0.
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: DMA init

Post by Giovanni »

I think those bits are wired to zero, anyway, good suggestion.

Giovanni
Post Reply