DMA init

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

DMA init

Postby neums » Wed May 24, 2017 3:29 pm

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: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: DMA init

Postby Giovanni » Wed May 24, 2017 3:31 pm

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

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 11 guests