Тёмный

STM32 Multi ADC DMA method 

PR TechTalk
Подписаться 2 тыс.
Просмотров 7 тыс.
50% 1

STM32 Multi ADC DMA method timer triggered.
Learn how to use the STM32 microcontroller's multi ADC and DMA features with our G071_ADC_Multi_DMA tutorial. We'll also show you a macro for converting voltage readings to temperature in degrees Celsius. I will also show how you use a timer to trigger conversations.
Master the STM32 microcontroller with our easy-to-follow guide.
Link to my STM32 Playlist
• STM32

Опубликовано:

 

5 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 22   
@deo-max9229
@deo-max9229 8 месяцев назад
This is fantastic! I've been working on ADC but didn't know how to implement multi-ADC DMA method. Thank you so much!! 👏
@prtechtalk416
@prtechtalk416 8 месяцев назад
Thank you for your kind words! I'm glad I could assist you in implementing the multi-ADC DMA method. If you have any more questions, feel free to ask!
@mortenlund1418
@mortenlund1418 3 месяца назад
Really great video. I hope you continue. This is very educational. Thank you. Best wishes from Denmark!
@prtechtalk416
@prtechtalk416 3 месяца назад
Davs Morten, Thanks for your kind words. Pls hit the Subscribe button also :-) /PR TechTalk
@r_be
@r_be 7 месяцев назад
Is it just me or STM32G0 series microcontroller ADC peripheral is noisier than the previous gen (STM32F0). Even in your video vref converted data readings are bouncing by few counts, but that voltage should be very stable in my opinion? In addition, I recently swapped STM32F051K4 for STM32G071K8 MCU. While using exact same ADC timing configuration I noticed that most of the sampled channel values are bouncing by +/-3. I performed a good few tests (different sequencer modes, longer sample times from 1.5 ADC clocks to 3.5 ADC clocks), but no success really. Another interesting observation is that by using 0.1% resistors (43K || 43K) to provide an offset in the differential amplifier circuit the measured offset is 2036 - 2038 counts which is 6 - 8 counts off from 2048. This is a repetitive result in at least 5 more boards that I tested, but it was NEVER a problem with F0 based MCU while using exact same components and very similar layout. I know that in F0 series MCUs had a dedicated VDDA that was decoupled, do you think that is the main different regarding the measurement accuracy consistency or is there something else at play?
@prtechtalk416
@prtechtalk416 7 месяцев назад
Decoupling VDDA is for a reason to stabilise the analog circuits. But the downside is loosing pins that could be used for alternative funtions. You can also try to over sample and make an average to gain stability and more ENOB. /PR TechTalk
@viniciuspassini1803
@viniciuspassini1803 8 месяцев назад
Excellent tutorial, what kind of change do I need to make to set the DMA to Circular mode?
@prtechtalk416
@prtechtalk416 8 месяцев назад
Thanks for your reply, You select regular or Circular buffer in a dropdown menu when enabling DMA for your peripheral. If you dont find it let me know. You acan also ofcourse enable it yourself in code if you dont prefer CubeMX do do the work for you. /PR TechTalk
@andax2007
@andax2007 5 месяцев назад
Why do you enable MSM bit? It is not related to what you want to achieve.
@AndreaBasilico-eo4pl
@AndreaBasilico-eo4pl 4 месяца назад
hello! this tutorial is awesome! an interesting aspect regarding the reading of the Vbat would be to be able to include the reading of the Vbat only every now to preserve its charge (usually I read it once every hour), it is possible to programmatically disconnect the reading leaving the number of conversions (rank) unchanged so that I don't have to worry about restructuring the length of the DMA buffer? (i am assuming to use the 20+ buffer to check and managed the value only after a couple of compleate reading). best reguards!
@prtechtalk416
@prtechtalk416 4 месяца назад
If i understand your application correct you have a set of ADC channels you regulary sample and only the Vbat you would like to sample less often. If this is the case the i would set a separate timer to trigger only the Vbat channel. /PR TechTalk
@AndreaBasilico-eo4pl
@AndreaBasilico-eo4pl 4 месяца назад
@@prtechtalk416 yes you understanded very well my application! i want to not discharge the battery with to much readings , so it is possible to have a dma based readings for all the channel except the vbat and a single channel software activated polling for the Vbat? how can be possible to select this method with the cube ? if i select scan mode isnt for ALL the channel? thank you!
@belarbinaouel7670
@belarbinaouel7670 8 месяцев назад
Thank for this great tutorial, Can you do it with the LL library please ?
@prtechtalk416
@prtechtalk416 7 месяцев назад
Thank you for your comment! I'm glad you found the tutorial helpful. Unfortunately, I don't have any plans to cover the LL library at the moment, but you never know so stay tuned :-)
@jahangeerdar3834
@jahangeerdar3834 Месяц назад
Can you show how to sense ac voltage
@prtechtalk416
@prtechtalk416 Месяц назад
To sence AC voltage you need to know what you are looking to measure. PeakVoltage, RMS Voltage, Frequenzy. All have their way to be measured but all have in common you need to get several readings and then let your software do it´s magic to calculate the answer you are looking for. /PR TechTalk
@jahangeerdar3834
@jahangeerdar3834 Месяц назад
I need to calculate rms​@@prtechtalk416
@prtechtalk416
@prtechtalk416 29 дней назад
The normal way to measure RMS AC voltage is to sample at a fixed rate (e.g., 1000 Hz for 50 Hz AC), capture enough samples to cover several periods, and then calculate the RMS directly from the data without worrying about the exact frequency. This assumes the frequency is stable enough for accurate results. If the frequenzy is not known or vary then you need to establish the frequenzy first. /PR TechTalk
@randomforests9489
@randomforests9489 13 дней назад
what is the advantage of using word instead of half word for 12 bit adc reading?
@prtechtalk416
@prtechtalk416 13 дней назад
Their is no advantage of that. Using 32bit variable to store a 12 bit value then remaining bits are wasted. So to conserve memory its better to declare halfword instead. /PR Tech talk
@LucaSpezzani-gz7no
@LucaSpezzani-gz7no 3 месяца назад
how did you set the NVIC ?
@prtechtalk416
@prtechtalk416 3 месяца назад
You can enable the NVIC using CubeMX. /PR TechTalk
Далее
Tutorial On ADC MultiChannel Interrupt method.
28:15
Просмотров 2,2 тыс.
PERFECT PITCH FILTER.. (CR7 EDITION) 🙈😅
00:21
Просмотров 4,5 млн
Nix explained from the ground up
23:39
Просмотров 37 тыс.
Using PHYSICS to play Fur Elise on my 3D printer
33:24
Просмотров 2,7 тыс.
I coded one project EVERY WEEK for a YEAR
13:13
Просмотров 648 тыс.