Thank you to your past self for taking the time to put this into a video for your future self, and then share it with the rest of us.
@randomrickUK2 жыл бұрын
Future Self thanks you for your kind comment.
@kokoianer3 жыл бұрын
Great Video. I found a bug in the HAL. sometimes (not every time) the generated HAL is wrong. The MX_DMA_Init(); must be called before MX_ADC1_Init(); otherwise the ADC makes just one measurment. But this is not guaranteed always correct. (Cube IDE 1.7.0)
@gabrielfienco25313 жыл бұрын
Thank you man!!! almost 1 day debugging and trying to find out why!!!!.. your solution solve it in seconds hehe
@ThanwaSripramong3 жыл бұрын
Thank you so much, you saved my life on this...
@erichoward67663 жыл бұрын
Add another THANKS SO MUCH!!! - I was about to spend several thousand $USD to get someone to fix this because I was at the end of my wits after fighting this for 3+ weeks for a product of ours that we had to redesign to fit in the L433 (from the L476). kokoianer - you are truly apprecaited. I'm going to be reaching out to the local (Austin, TX) ST support team to tell them about this - and I'll give full credit to YOU!
@dancruz212 жыл бұрын
Thank you so much, this really saved me
@ycxv96612 жыл бұрын
This can be changed in the Project Manager under Advanced Settings (CubeMX 6.3, probably also in the cubeIDE)! So you don't have to change it manually in the code every time you change something in the cubeMX config. It is still weird why can be the other way round.
@glowfly2 жыл бұрын
The IDE has slightly changed since this video I think. I had to click the dropdown arrows next to each "Rank" and set them to Channel 1, 2 and 3 respectively. Then the DMA worked fine with the Blackpill F401 board. This is also a kind of note-to-self thing. Cheers, great vid!
@randomrickUK2 жыл бұрын
Hi Glowfly! I used a cheap and cheerful F030 in this video, and they don't have the ranking feature. I think the IDE "knows" this and therefore doesn't show the option.
@contomo5710 Жыл бұрын
how did you adjust the timers for the adc? on the F401 i cant find an ADC clock
@KanagachidambaresanGR2 жыл бұрын
How many samples per second can be achieved???., Please let me know., i am working on Audio signal
@ubaidullah62612 жыл бұрын
These are not multiple ADC's but these are multiple channels ADC. Did you make videos on using ADC1 and ADC2 at the same time
@yogaline8218 Жыл бұрын
I also would like to use ADC1 and ADC2 at the same time. Did you find any information how to do it? Thanks!
@robc38632 жыл бұрын
Nice overview thanks very much! A question if I may? If someone wants to use two ADCs at the highest speed, but synchronise the readings so that 2 memory buffers receive each sample at the same time, what's the best way in your view? If software start is used they might drift by a sample or two, so use a high speed timer to activate both, one timer drives both? Can a timer run a 1MHz, I guess it can? Or is there a better way?
@dajianghe Жыл бұрын
I got valid reading for only one channel; the other one is always 0. What could be the problem?
@williamrose3191 Жыл бұрын
awesome video. How can i do this with a timer?
@randomrickUK Жыл бұрын
Thanks! You can trigger ADC conversions with an "event", and set up the timer to issues those events. I've got a video about it: kzbin.info/www/bejne/h2WsaqBmoLONeKs
@mikeschem64412 жыл бұрын
It looks like this example does 1 reading for each of the 3 adc channels. How do you do multiple adc readings for each channel?
@yogaline8218 Жыл бұрын
I also would like to use ADC1 and ADC2 at the same time. Did you find any information how to do it? Thanks!
@robertsutherland3303 Жыл бұрын
@@yogaline8218 basically repeat the same settings in as the first ADC in whichever ADC you're going to use in cubemx then call the hal functions twice with the two adc pointers (&hadc1, &hadc2)
@veikkoimmonen73002 ай бұрын
Set up for continuous conversions and use a bigger buffer. Then for the DMA start function, tell the size of the buffer - you will get an interrupt once the buffer is filled.
@MyMcMichael2 жыл бұрын
The HAL_ADC_Start_DMA function is consuming a lot of time. Since I am using it in a 50kHz regulator, it is critical to me. Is there another way to start the conversion?
@veikkoimmonen73002 ай бұрын
You can set the conversion to run continuously in the background, so that you will only need to call start once. The interrupt will fire once every time the buffer is filled. You can even set it up to fire separate interrupts for "buffer half full" and "buffer full", which allows you to do double buffering (useful if you need to do heavy processing on the samples while new ones are being captured).
@luisnunes243 жыл бұрын
Awesome Video!! Could you post the code in the description?
@GreenGuyDIY8 ай бұрын
You use volatile to tell the compiler the variable is used (updated) outside of the routines that reference it; in this case, the DMA writes to it. You need to change the title of your presentation to Set up multiple channels of a ADC for scan using DMA. This is important because was looking for setting up multiple ADCs (ie. ADC 1, ADC2, ADC3) all using scanning. Since there is only one callback I need to know how to tell which ADC DMA was completed.
@briandecker45977 ай бұрын
Nice Video. Thanks for uploading
@lordozi31132 жыл бұрын
Did the same, works flawless for 3 out of 5 channels I used... Doesn't seem to be the wiring, "adcResultsDMA" is consistently wrong on index 2 and 3, even if I use different channels in board config
@ntal5859 Жыл бұрын
You probably got the RANK out of order then...
@RixtronixLAB2 жыл бұрын
Nice info, thank you for sharing it :)
@eduardodelarosaferrer22052 жыл бұрын
A flawless video
@randomrickUK2 жыл бұрын
Very kind of you.
@zeeshantahir18510 ай бұрын
You didn't setup multiple ADCs via DMA, rather multiple channels on single ADC. Caption is bit confusing