This is such a superb video. Great work. I'm making a guitar pedal that requires this exact same setup, and you, my friend have made my work so much easier and have learnt so much in one hour!
Yes you are right. In the new version of CubeMX, you first need to go enable DMA from the DAM tab and then it allows you to select DMA Enable option in the ADC window. I don't quite know why they did that -- maybe too many people were saying continuous DMA on the first window and forgetting to set DMA maybe?
Is it possible to have multiple channels do the ADCs conversion as fast as possible, without using a timer? The way it's shown, TIM6 seems to trigger the ADC to do a conversion and DMA2S0 the result to memory.. but the same TIM6 will *ALSO* trigger the DMA1S5 to transfer data to the DAC peripheral? Since the reference manual (Table 8) shows the FDCAN/USART2 to also be on the same APB1(D2) bus as TIM6/DAC/ADC/DMA1,2.. is it possible to automatically DMA the raw ADC results to the UART or CANBUS peripherals directly?
Very nicely explained. Is this configuration and coding work work for STM32H743? I followed the steps as such but it is not functioning? will you help me to sort out this.
Yes. The libraries will change but the idea of CubeMX based coding is to be able to move easily from one Cortex device to another with minimal change in code.
@@ENGRTUTOR Thanks! I coded. I have one doubt what is the maximum and minimum values of voltage that can be given to ADC pin. I m using a function generator to provide the sine wave
@@jollymishra8558, Check the datasheet for the particular MCU used on the board, but it's probably 0V-Vdd (3V). If you look up some of the schematics for Mutable Instruments designs, you'll see a good way to handle the inputs. Basically, use a single rail / single supply op amp, preferably capable of rail to rail operation, like the MCP6002 (dual) or MCP6004 (quad). Make a simple inverting buffer or fixed gain amp stage, probably with a gain of less than one - then invert the signal in software, if you need to. The output of the op amp can only be 0V-Vdd, if it's powered from Vdd. At worst, you might damage the op amp, but never the MCU - and you almost certainly won't damage either.
Dude, congrats from an Engineer moving from FPGA to MCUs, you are made for explaining things.
This is such a superb video. Great work. I'm making a guitar pedal that requires this exact same setup, and you, my friend have made my work so much easier and have learnt so much in one hour!
The nucleo has an external crystal located on the st-link to enable it you can go in RCC and HSE BYPASS Clock source
Video was perfect. Very clear. Thank you for your effort. I subbed to your channel :)
Why do you need Timer6? Is it for triggering DMA for ADC?
DOUBLE CHECK THAT YOUR ADC SETTINGS HAS DMA CONTINOUS REQUEST ENABLED.
Mine did not at default settings unlike ENGRTUTOR's! :)
Yes you are right. In the new version of CubeMX, you first need to go enable DMA from the DAM tab and then it allows you to select DMA Enable option in the ADC window. I don't quite know why they did that -- maybe too many people were saying continuous DMA on the first window and forgetting to set DMA maybe?
can you do it for multimode ADC
like dual or triple mode ADC
hello ,, which audio codec or op-amp are you using ?
Is it possible to have multiple channels do the ADCs conversion as fast as possible, without using a timer?
The way it's shown, TIM6 seems to trigger the ADC to do a conversion and DMA2S0 the result to memory.. but the same TIM6 will *ALSO* trigger the DMA1S5 to transfer data to the DAC peripheral? Since the reference manual (Table 8) shows the FDCAN/USART2 to also be on the same APB1(D2) bus as TIM6/DAC/ADC/DMA1,2.. is it possible to automatically DMA the raw ADC results to the UART or CANBUS peripherals directly?
In the Output 1 of 128 value is not correct. (Its always the first value). Do you know the reason and the solution?
Very nicely explained. Is this configuration and coding work work for STM32H743? I followed the steps as such but it is not functioning? will you help me to sort out this.
did you ever get this to start functioning? I am working on STM32H7 and the callbacks are not being properly triggered
community.st.com/s/question/0D50X00009XkXEHSA3/stm32h7stm32h743-adc-with-dma
Here was a fix I found to trigger callbacks
Awesome video
@ENGRTUTOR can we have the code please ?
Can this code work for stm32f4 discovery board?
Yes. The libraries will change but the idea of CubeMX based coding is to be able to move easily from one Cortex device to another with minimal change in code.
@@ENGRTUTOR Thanks! I coded. I have one doubt what is the maximum and minimum values of voltage that can be given to ADC pin. I m using a function generator to provide the sine wave
@@jollymishra8558, Check the datasheet for the particular MCU used on the board, but it's probably 0V-Vdd (3V).
If you look up some of the schematics for Mutable Instruments designs, you'll see a good way to handle the inputs.
Basically, use a single rail / single supply op amp, preferably capable of rail to rail operation, like the MCP6002 (dual) or MCP6004 (quad). Make a simple inverting buffer or fixed gain amp stage, probably with a gain of less than one - then invert the signal in software, if you need to.
The output of the op amp can only be 0V-Vdd, if it's powered from Vdd. At worst, you might damage the op amp, but never the MCU - and you almost certainly won't damage either.
Hello, I am using the same board as well. What would be the appropriate value for HCLK (Clock Configuration)? I cannot input 216
@@KenDedes94 use 168.