STM32H7 ADC + DMA + Timer Firmware Tutorial - Phil's Lab #138

20,103
0
2024-05-31に共有
ADC set-up with DMA streams and sampling timer for STM32 microcontrollers. Tips on working with H7's D-cache and memory protection unit (MPU). PCBs by PCBWay www.pcbway.com/

[SUPPORT]
Hardware design courses: phils-lab-shop.fedevel.education/
Course content: www.phils-lab.net/courses
Patreon: www.patreon.com/phils94

Free trial of Altium Designer: www.altium.com/yt/philslab
Altium 365: www.altium.com/altium-365

[GIT]
www.github.com/pms67

[SOCIAL]
www.instagram.com/philslabyt

[LINKS]
AN2834: www.st.com/resource/en/application_note/an2834-how…
Getting Started with ADCs: wiki.stmicroelectronics.cn/stm32mcu/wiki/Getting_s…
STM32CubeIDE: www.st.com/en/development-tools/stm32cubeide.html
DSP Overdrive Algorithm:    • DSP Overdrive Algorithm in Software (...  

[TIMESTAMPS]
00:00 Introduction

02:34 PCBWay

03:05 Hardware Overview
05:36 ADC Considerations

07:54 ADC Config
14:06 DMA Config
15:28 Timer & Clock Config

19:35 Firmware Implementation
22:41 ADC Callback

25:19 Demo

27:07 H7 Caches, MPU, Linker Script

32:34 U5 DMA, Power Domains

34:53 Outro

コメント (21)
  • @derivativ3
    I've been looking for a tutorial on H7 ADCs for a while now, perfect timing with a new project!! your content is a literal goldmine and is getting so many of my friends into the embedded world
  • @pantelisEVs
    Loved the MPU wenthrough. Really nice and clear explanation. Tweaks in mpu really handy when you play around with dma and peripherals! Thanks!
  • @ericmin832
    Funny, I was ripping my hair apart the past week trying to figure this out for a school project. Just when I thought all hope was lost, our lord and savior Phil descends from the heavens. I truly can't thank you enough Phil, your videos make my life so much easier!!!
  • @gosdeCarrer
    I have just done the same things but a with an STM32F4; ADC + timer + DMA to sample ultrasonic sounds from bats, up to 115Khz, so a sample rate of about 240KHz. Then in real time do the FFT to identify the peak frequencies, draw an spectrogram, etc. I was just fighting with each and every of those settings in the cubeide 🙂, but it works very well.
  • @duke_of_oz
    As is often the case with stm32 materials, one must read hundreds of pages of datasheets and application notes to understand what yo have covered in 14:21 mins. Brilliant tutorial, thank you!
  • This video was the best stm32 tutorial for a stm32 beginner like me. I followed your instruction with my stm32f103 and it worked like a charm and for the first time with stm32, I didn't face any issues while programming. huge thanks for making such a content.
  • @DrTimmay
    Good stuff! The H7x5/H7x3 series of this chip is a monster at 520MHz (550Mhz if you're willing to disable ECC). Though with that comes some nutty power domain complexity... Much more involved than the G4 series.
  • @madrigo
    Can't thank you enough for your content Phil! With your series of videos, one like myself can work on a complete DSP design based on a H7 core. Appreciate your work mate!!
  • @andy-bandy
    Hahah I was already trying to design a stm32h7 board, and you upload this, perfect timing <3
  • Great example, I've been following your videos for some time. So far I've been able to set up and program my custom board to interact with an I2C sensor and send data through USB com port!
  • Amazing video as usual, also looked at your previous DSP videos to learn more about dsp algos and DMA, as I recently got an project related to DSP so started to get more involved into it. Keep uploading videos like these really help full.
  • 24:00 I always like to reinforce the idea of using the slope intercept formula to convert the ADC to pretty much any value you need. I haven't done any graphing whether the output is exactly linear, but I feel it is a good approximation. Your explanation is perfect and thoroughly enjoyed the video.
  • Man, I reallt could've used this in some previous projects. Thanks a million as always.
  • @wodddj
    I have been working on the ADC of the F7 F4 and L4 series, the performance of these things are absolutely beasts. Sometimes I just keep several necleo boards around and use them as daq.🤣
  • Thx for another great video. I am working with AVR stuff(SAM) but i want to use DMA in the future. This gave me a better understanding on how the concept of DMA basically works. Have a nice weekend! <3
  • That cap in the potentiometer circuit is more than just a low pass filter. These converters are capacitive ladder and draw a spike of current / charge when they sample. The cap is a cheap easy way to provide this charge and eliminate a strange error you will see otherwise, as long as you can live with your chosen cutoff frequency.
  • THANKS Philip you're the best ! look for more creative projects
  • @Pyrografpl
    Thank you! Waiting for mentioned future video. Im working with H7 for some time and caching in topic Id like to introduce in HMI project