STM32 ADC MULTI CHANNEL without DMA || HAL || Poll

  Рет қаралды 47,777

ControllersTech

ControllersTech

Күн бұрын

Пікірлер: 56
@OKOK-em4gb
@OKOK-em4gb 4 жыл бұрын
First of all, thank you. There are a lot of STM32 related KZbin broadcasts, but it was hard to see normal movements. So I think this KZbin broadcast is the best.
@eduardojreis
@eduardojreis Жыл бұрын
3:30 why to remove the automatic configuration that STM32 does in the being of the program execution? That kind gets undone as soon as I regenerate the code.
@noweare1
@noweare1 4 жыл бұрын
I was also having problems using dma and doing things in my while loop. DMA will just take over. I could not even end the dma or the adc or the adc in my while loop. So, yes, it was not even getting to the while loop. For polling with multiple channels I start the conversion once and the software converts the 3 channels in a sequence. I only have to poll the EOC bit then save the data for each of the 3 conversions.. I only do the setup of the channels once. I am using a nucleo32 board with STM32L412KB chip. It is the size of an arduino nano footprint but runs at 80MHz and has 40Kbytes of ram, and I think 128Kbytes of ROM, crazy specs compared to AVR 328p. Thank you for your videos. I think this is the best channel on the stm32 on youtube.
@edvinass3804
@edvinass3804 Жыл бұрын
Yeah! It's alive, thanks brother!
@Timkaasjager
@Timkaasjager 3 жыл бұрын
Thank you so much for this! I have a question, how can you call the HAL functions in drop down menu like in @6:13 when you're halfway through typing the name? Would be a great help!
@ControllersTech
@ControllersTech 3 жыл бұрын
Cntrl + space
@mortezamaghrebi9560
@mortezamaghrebi9560 7 ай бұрын
Note that the maximum ADC clock is 36 MHz, refer to the datasheet of your microcontroller.
@coolchriss
@coolchriss 8 ай бұрын
I am using stm32f030k6t6, the adc configuration mode is different, whatever i done to read a joystick module to control 2 servos it ends with failure, I hope you make a video to explain how to configure it 😢
@guumballl
@guumballl 2 жыл бұрын
hi, thanks for the video. I got it working on my blackpill but getting big fluctuations in the live expressions. I am trying to run three voltage meters on a single adc channel w a touch gfx display and the progress bars keep flikering. how to keep the input steady?
@ControllersTech
@ControllersTech 2 жыл бұрын
It mostly happens because of the unstable power supply. I think you can use some capacitors to reduce it. Google it, you will find information about the same.
@AvalancheGameArt
@AvalancheGameArt 9 ай бұрын
On Texas instrument is way easier.. i mean, you just set the adc steps and then it does what you want.. instead of relying on dma that adds additional overhead time..
@tienleminh8129
@tienleminh8129 3 жыл бұрын
why have you set the different Sampling Time for each channel, could I possible choose the same sampling time
@ControllersTech
@ControllersTech 3 жыл бұрын
Yes you can. Basically it sets the sampling frequency.
@imam8646
@imam8646 4 жыл бұрын
thank you, greetings from Indonesia
@2400MHz
@2400MHz 4 жыл бұрын
Saya dari jogja bro, heheh
@disanaadamatahari
@disanaadamatahari 4 жыл бұрын
Nyimak
@francescoc6808
@francescoc6808 3 жыл бұрын
Is it possible to do this with interrupts?
@ControllersTech
@ControllersTech 3 жыл бұрын
Yes ofcourse.. check other videos in the playlist
@finnyphilipbiju4520
@finnyphilipbiju4520 4 жыл бұрын
Hey, which Nucleo board is the best among, F446, L476, L496 And, which is the best cortex m7 board under a budget of $50. Can you also suggest some discovery board
@anshbhatnagar557
@anshbhatnagar557 3 жыл бұрын
Hi, I try your concept with stm32 bluepill fir adc continuous conversion without dma it run well but i am not getting the stability for adc as i am using pot for pins but it showning a variation and that is very wide i.e 3204 to 4095 so suggest what could be done here
@prakashpunj421shukla4
@prakashpunj421shukla4 2 жыл бұрын
how it runs well can you please share the code
@kriskb3
@kriskb3 Жыл бұрын
Thanks for your tutorial. I managed to get it working in my application, but... Why do you modify the MX generated code so drastically (requiring to reedit the MX_ADC1_Init() function everytime you run another MX session. Does the generated MX code not work? Why can't one rely on letting the ADC1 do the sequencing by itself properly?
@ControllersTech
@ControllersTech Жыл бұрын
Of course you can. Let the dma handle the conversion.. there is no issue with that. It's just an alternative in case you want to control what to get the data from and when to get the data.
@kriskb3
@kriskb3 Жыл бұрын
@@ControllersTech Maybe I didn't express myself clearly: I ressorted to your tutorial since I had problems getting DMA working. And my question was , why you end up with modifying the MX generated code . Why is the distinct ADC_Select_Channelxx() necessary at all. I meant letting the ADC doing the sequencing from channel to channel. That's what I think is Scan Conversion Mode for.
@vikasbodake5524
@vikasbodake5524 Жыл бұрын
Make video on ADC oversampling
@tariqjameel6862
@tariqjameel6862 3 ай бұрын
hi , iam facing issue with this , kindly review it, in the debugging ,i have seen that initially the LD2 led is on but after the function MX_USB_HOST_Init() ,it goes off , i also tried to manually make the pc0 to reset and now the led becomes on again after off , but my breakpoint at application ready is not hitting as i plug the usb seem like it donot recognize it
@joshuachettiar86
@joshuachettiar86 2 жыл бұрын
What should I do if i have 1 ADC but I need to sample 1 channel at very high speed using DMA and i only need to poll the other channels at fixed intervals I'm stuck
@ControllersTech
@ControllersTech 2 жыл бұрын
You can still use DMA and control sampling rate for each channel in the cubemx. Look in the rank section while setting up the ADC parameters. To understand the sampling rate and time, watch my another video on it. It's in the ADC playlist If that doesn't suit your requirements, you can use 2 ADCs.
@joshuachettiar86
@joshuachettiar86 2 жыл бұрын
@@ControllersTech i will look at the playlist
@Abdullahcnbzx
@Abdullahcnbzx 4 жыл бұрын
use LM35 ?
@natanjimenez
@natanjimenez 3 жыл бұрын
gracias exactamente lo que buscaba!
@carissalee5748
@carissalee5748 3 жыл бұрын
Hi! I'm new to STM32. Can you do a tutorial on how to use IR sensor on STM32F1 without any ST-LINK etc? Thank you very much!
@ControllersTech
@ControllersTech 3 жыл бұрын
use stm32duino
@joshuachettiar86
@joshuachettiar86 2 жыл бұрын
Hey can i change the wait time from millisecond to microsecond in HAL_ADC_P....
@prakashpunj421shukla4
@prakashpunj421shukla4 2 жыл бұрын
yes you can
@prakashpunj421shukla4
@prakashpunj421shukla4 2 жыл бұрын
SysTick->LOAD = 400-1; // one MICRO second delay relaod value SysTick->CTRL = 7; ; // enable counter, interrupt and select system bus clock SysTick->VAL = 0; //initialize current value register /* USER CODE END SysInit */ simply put this code your systick changed to 10 micro second as my clock frequency is 40 mhz
@shettymalnad1978
@shettymalnad1978 11 ай бұрын
how to trigger multiple channels by using timer without DMA
@qamarhassa
@qamarhassa Жыл бұрын
Hi I'm using stm32h743vit6 MCU. I selected ADC CH 3 and CH 7 but there is only disable option in scan conversion mode. Kindly guide me how to use ADC multi channel in stm32h743vit6 MCU
@imrekoncz7702
@imrekoncz7702 Жыл бұрын
I was facing the same problem on STM32U5. What worked for me is that first u should enable regular conversion (scroll a little bit down) and then set the conversion number (>1). Then the Scan mode will be enabled automatically.
@zeroanueve-reparaciones5189
@zeroanueve-reparaciones5189 11 ай бұрын
@@imrekoncz7702 thank you !!
@vishaalvishaal2118
@vishaalvishaal2118 3 жыл бұрын
Hello hi I am working on adc multiple channels and what if am using freertos and let's say I have 2 tasks in task 1 I hav 2 channels set that is ch1 ,ch2 and in task 2 ch3,ch4 so for this can I configure each time one channel and get the value ?? Here task switching happens so can I set each time a different channel with out sequence like ch3 then ch4 and then ch2 and ch1.
@ControllersTech
@ControllersTech 3 жыл бұрын
That's exactly what's shown in the video. Converting channels individually... Without sequence
@vishaalvishaal2118
@vishaalvishaal2118 3 жыл бұрын
@@ControllersTech then scanconvmode should be disabled and continuousconvmode also need to be disabled right??
@m.nauman7801
@m.nauman7801 4 жыл бұрын
Thank you. 👍
@mustafakemalsagcan2621
@mustafakemalsagcan2621 4 жыл бұрын
Thank u for every videos
@mat_kowalczyk
@mat_kowalczyk 4 ай бұрын
Thank you for help!
@toshibamaster2210
@toshibamaster2210 2 жыл бұрын
need MULTI CHANNEL without DMA but with interrupt from timer 3 event!
@eneshaliduzulmez3586
@eneshaliduzulmez3586 4 жыл бұрын
ABİMMM ÖZ ABİMM...
@sakugava
@sakugava 4 жыл бұрын
Thank you
@Gratiman
@Gratiman Жыл бұрын
Eres el mejor, I love u
@ismailkulaber4578
@ismailkulaber4578 4 жыл бұрын
Thank you :)
@OKOK-em4gb
@OKOK-em4gb 4 жыл бұрын
Good morning.
@prakashpunj421shukla4
@prakashpunj421shukla4 2 жыл бұрын
hey actually i am facing the issue the my function of channel is not running initially adc_channel3(); // like this is the function which you made to run the different channel HAL_ADC_Start(&hadc); HAL_ADC_PollForConversion(&hadc ,1); adc_result_DMA[0] = HAL_ADC_GetValue(&hadc); // rawvoltage = (float)read_value*3.3/4096; // current = (rawvoltage-2.5)/0.1; HAL_ADC_Stop(&hadc); delay_us(1);
@rizkymaulana6154
@rizkymaulana6154 Ай бұрын
thx dude, but i found simple code than you, i try 1 hours lol :(
@piotrwu5285
@piotrwu5285 Жыл бұрын
I love you
@k.t.d.chathumisamaraweera9477
@k.t.d.chathumisamaraweera9477 2 жыл бұрын
Thank you very much for sharing knowledge with us. code worked nicely...
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
STM32 ADC multiple channels || DMA || True studio || CubeMx
15:47
ControllersTech
Рет қаралды 71 М.
HAL #13: ADC with DMA
10:15
Web learning
Рет қаралды 42 М.
32. STM32CubeIDE RGB LED. Multi channel ADC with STM32F103C8T6
6:31
MicroPeta by Nizar Mohideen
Рет қаралды 9 М.
STM32 ADC Conversion Time/Frequency Calculation || Internal Temp Sensor
19:28
stm32 timed multichannel ADC DMA conversions on STM32F030k6
12:06
ADC Multiple Channel using STM32(Interrupt Method)
15:40
Vidura Embedded
Рет қаралды 10 М.
STM32 ADC Complete Guidance: Polling, Interrupt, and DMA Modes.
17:55
Steppe School
Рет қаралды 4,5 М.
SMT32 ADC Interrupts with STM32CubeIDE
9:49
Random Rick
Рет қаралды 13 М.
Joystick module with STM32 || ADC || Multi Channel || HAL
8:36
ControllersTech
Рет қаралды 24 М.
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН