Thank you so much for this video! I was using low power modes and was looking for a way to trigger DMA to get ADC values but only once per sec, not in the continuous mode. Just for the sake of lower energy consumption. Couldnt get this on my own, had to enable DMA Continuous requests for it to trigger, such a small detail :/
@DavidBinette12 жыл бұрын
Thank you so much for the clear and concise explanation.
@randomrickUK2 жыл бұрын
You're welcome. I hope it was helpful.
@joshprice73497 ай бұрын
Wow...I spent most yesterday trying to figure this one out with no luck...It worked first try after watching this! Thanks man!
@randomrickUK7 ай бұрын
You're very welcome!
@ahmetyldz5674 Жыл бұрын
This is very very helpful. Thank you.
@techmakerandhacker786711 ай бұрын
thank you soo much this was super helpful
@sohrabmesbah2 жыл бұрын
Dear Rick, Thanks a lot, your video is a clean and pro one, Thanks.
@sohrabmesbah2 жыл бұрын
On stm32f103 there is no DMA continious concersion, but circular is enough, but it will not work. The solution is so easy: swap adc_init and dma_init. DMA must be initialized first in the code.
@MrSlackrick2 жыл бұрын
Thanks, Sohrab! This problem has been seen before. It happened to me too - and took me hours to find the problem! I wish I had known this fix sooner.
@tamhoang39712 жыл бұрын
can you help me? I use KeilC, DMA is the first, but it dont run continous
@robc3863 Жыл бұрын
Fab overview, one question though, for continuous automatic timer driven ADC DMA transfers of say 32 words a go, using 2 independent ADCs, when the last ADC word is transferred the timer will be generating another DMA request to both ADCs. If the ADC DMA isn't quite finished when the timer event occurs, could there be a problem? I'll test this I guess, only way to find out right? PS I need both ADCs to transfer to the same slot in each buffer at the same time, hence the need for a timer to synchronise the transfers rather than letting the ADCs just run continuously.
@MohamadSayadiFars6 ай бұрын
Thank you for this tutorial. But I am still wondering about this code HAL_ADC_Start_DMA(&hadc, (uint32_t*)AdcResults, sizeof(AdcResults)/sizeof(AdcResults[0])); I have used DMA but I did not quite understand the sizeof(...)/Sizeof(...) meaning. i would be grateful help me out.
@lookatravieso50364 ай бұрын
Hi, I will try to answer you, it is about what is HAL_ADC_Start_DMA is waiting for and what are you telling with sizeof(). - sizeof(AdcResults): returns size of the array in bytes. If AdcResults is an array of 3 elements of type uint16_t, the size will be 3* sizeof(uint16_t), which is usually 3* 2 = 6 bytes. - sizeof(AdcResults) / sizeof(AdcResults[0]): This returns the number of elements in the array. In this case, it will be 6 / 2 = 3 elements. (Adcresults[0] has 2 bytes as it is type uint16_t) HAL_ADC_Start_DMA is waiting for the number of elements of the array. So if you give it with the first way it may cause malfuctions in your code. I hope it helped you to figure it out.
@MohamadSayadiFars4 ай бұрын
@@lookatravieso5036 thank you very much. It is very helpful.