STM32 DMA MEM2MEM.

STM32 DMA MEM2MEM.
STM32

In one of my previous articles I already described what DMA is and gave an example of it working together with an ADC. In that example, the ADC conversion results were written to a buffer without involving the core. This time I needed to move a buffer from one memory area to another, and I knew for sure that this can be done with DMA using MEM2MEM mode...

STM32 Input Capture Mode.

STM32 Input Capture Mode.
STM32

Capture mode is a special timer mode that works like this: when the logic level on a certain microcontroller pin changes, the value of the counter register is written to another register, called the capture register. What is it for? This mode lets you measure the pulse width or period of a signal. The STM32 capture mode has some features:...

STM32: Storing ADC Data with DMA.

STM32: Storing ADC Data with DMA.
STM32

DMA (Direct Memory Access) lets you transfer data without involving the core. That is, if you use DMA, then when an ADC conversion completes, we don't need to fetch the conversion result and store it in memory; DMA will do it for us. To do this, when configuring DMA it's enough to specify the address to take data from and where to store it, plus a few more simple settings...