2015-01-27 12:48 AM
I see there is a option to increment a peripheral address after after a DMA peripheral-to-memory transfer. I'm curious to know what the purpose of this is. I can see the usefulness of incrementing the memory pointer after a transfer, but I'm failing to see why you'd ever need to increment the peripheral address.
2015-01-27 02:40 AM
There are many use cases, for example writing to an LCD screen using FSMC. Or for transfering data from flash to RAM. There are examples in both SPL and HAL distributions.
2015-01-27 08:13 AM
Okay, but it looks like devices on the FSMC bus are memory mapped directly into the micro's address range and so don't have a peripheral interface in the usual sense (i.e. I2C, SPI, UART, ADC, etc.). Plus the device I'm using (STM32F401) doesnt have an FSMC bus. So I'm still left wondering what the use case is for DMA peripheral address increment.
HAL has some example code for memory-to-memory DMA transfers, but I'm not finding any for memory-to-peripheral with peripheral address increment2015-01-27 09:10 AM
And you're worrying about this because?
The DMA unit is general purpose in nature, the peripherals are also mapped into the same address space, the same increment/don't increment configuration bits impact memory-to-memory targets. A lot of silicon design is about placing the same circuit (cell) over and over, the optimization and sameness often overrides the fact that some gates might not be used in anger in 99.999% of customer use cases. So say I want to use DMA to write into a TIM's CCR1,CCR2,CCR3, and CCR4, in a circular fashion, triggered by the Update? Write to the USB FIFO?2015-01-27 09:41 AM
I'm not worrying about it, just asking. I'm new to the STM32 and I've been reading up on it's function. From time to time questions come up and this is one of them.
So far qwer.asdf has stated there are many use cases, and you have stated there are 0.0001% customer use cases. I'm as confused as ever2015-01-27 10:19 AM
No I'm saying that some gates in the design aren't used by practically anyone, and in fact you'd be hard pressed to use all the peripherals in the STM32 designs, and get that functionality out the pins.
The fact I might be able to use this feature to generate some high speed and exotic signalling, with very little software interaction allows me to works outside the box of ''why's this here''. There are undoubtedly a number of other clever applications of this feature, I'm not sure of the value of enumerating them.2023-06-22 02:10 AM
This reply has been moved to a new thread.
2023-06-22 12:29 PM
It is off topic, and instead of hijacking a historical thread, you should start your own.
JW
2023-06-22 01:59 PM
In memory-to-memory transfers the peripheral acts as the destination.
2023-06-23 12:46 AM
You are right. It didn't occur to me as I'm new to this platform and this is my first ever message to any public forum. I will keep your suggestion in mind :)
I will check out the replies from MHank.1 and Tesla DeLorean below and will open a separate thread if I have further queries.
Thanks.