Is it possible to change the DMA clock frequency ?
If so, how to do that ?
No idea ?
To what, from what? The DMA clock comes from the AHB/APB.
You can use a TIM to trigger DMA transfers, and set that to whatever rates the TIM affords.
Yep I know that it comes from the AHB/APB.
I'm using the DMA to collect accelerometer datas.
The problem is that the DMA speed is faster than my accelerometer refresh rate and I want to avoid memory waste.So, the goal is changing the DMA clock frequency is to adapt it to my accelerometer frequency.
It is generally undesirable to throttle the bus clocks as this will slow the entire system down and increase bus contention and delays.
Pace the acquisition of data from the accelerometer with a TIM
Yep but using a TIM will generate a lot of interrupts and AFAIK it is undesirable ? (I want to record datas at 400Hz -> an interrupt every 2.5ms ?)
Depends, I can use TIM+DMA+ADC to generate arbitrary sample rates, with minimal interrupts (DMA HT/TC controlled by buffer size)
400 Hz is relatively low, 400 KHz yes would be an issue.
Sorry but I don't get it (first time I'm using DMA). For me, using a timer in parallel will allow me to read a part of the RxBuffer but it won't change the frequency.
I also saw that HAL timer embed a DMA but AFAIK it will return all the registers values whereas I just want the x,y,z values of my accelerometer ?
If it is possible to read specific registers from a peripheral address at a choosen frequency, it could be really interesting for me !
Retrieving data ...