cancel
Showing results for 
Search instead for 
Did you mean: 

How to use DMA on STM32L0 with FIFO threshold ?

Alexandre T
Associate II
Posted on October 10, 2017 at 11:31

Hello,

I saw on the STM32L0 User Manual that FIFO mode and its threshold can be configured thanks to HAL_DMA_Init().

For a given stream, HAL_DMA_Init() API allows programming the required configuration

through the following parameters:

- Transfer Direction

- Source and Destination data formats

- Circular, Normal or peripheral flow control mode

- Channels Priority level

- Source and Destination Increment mode

- FIFO mode and its Threshold (if needed)

- Burst mode for Source and/or Destination (if needed).

But I don't find where I can enable it and choose my threshold as I never used DMA before ?

1 ACCEPTED SOLUTION

Accepted Solutions
Posted on October 10, 2017 at 11:46

AFAIK the DMA in 'L0 (and 'F0/'L1/'L4) has no FIFO.

I guess this is some copy/paste artefact.

JW

View solution in original post

7 REPLIES 7
Posted on October 10, 2017 at 11:46

AFAIK the DMA in 'L0 (and 'F0/'L1/'L4) has no FIFO.

I guess this is some copy/paste artefact.

JW

Posted on October 10, 2017 at 12:11

That does not make it more real. Search for FIFO in the DMA chapter of the respective RM.

JW

Posted on October 10, 2017 at 13:52

Well, nothing about FIFO in the

http://www.st.com/content/ccc/resource/technical/document/reference_manual/21/bd/0f/bd/1c/88/40/f0/DM00108282.pdf/files/DM00108282.pdf/jcr:content/translations/en.DM00108282.pdf

 ...

What does it mean, I can't put my device in FIFO mode if I want to use DMA ?

Posted on October 10, 2017 at 14:45

What do you mean by 'putting device in FIFO mode'?

DMA does not have FIFO.

Some of the peripherals do have some sort of  FIFO built into that peripheral.

JW

Posted on October 10, 2017 at 14:53

I want to use DMA for my accelerometer to collect data without any loss (I discovered DMA yesterday).

On my accelerometer I can enable a 32 slots FIFO.

I wanted my DMA to collect the entire content of the FIFO at once thanks to the FIFO threshold, but it seems that I didn't undertand how to use DMA ?

Posted on October 10, 2017 at 15:16

A FIFO in an external device has nothing to do with FIFO in STM32 peripheral, nor in DMA.

JW