STM32F4 Programming in C 4- DAC and ADC coding in Keil using STM32CubeMx

author KGP Talkie   2 год. назад
4,451 views

19 Like   1 Dislike

Tutorial Cube MX -9- DAC ADC USART on STM32F4Discovery

A waveform generator using DAC on STM32F4Discovery is build. Connecting the generator output to an ADC input, the waveform may be visualized via USART on the PC by a LabView virtual instrument using VISA. Both direct conversions and DMA conversions are presented. The USB to TTL adapter used is CH340, which worked well even at 921600 bps. Part of the ARM course at Hyperion University. www.hyperion.ro

STM32F4 Programming in C 3- ADC Coding in Keil using STM32CubeMx

ADC coding in Keil uvision on STM32F4 Discovery Board in C. The code was generated using ST Microelectronics STM32CubeMx software. The STM32F4DISCOVERY Discovery kit allows users to easily develop applications with the STM32F407 high-performance microcontrollers with ARM®Cortex®-M4 32-bit core. It includes everything required either for beginners or for experienced users to get quickly started. Based on the STM32F407VGT6, it includes an ST-LINK/V2 or ST-LINK/V2-A embedded debug tool, two ST MEMS digital accelerometers, a digital microphone, one audio DAC with an integrated class D speaker driver, LEDs and push buttons and a USB OTG micro-AB connector. Key Features: STM32F407VGT6 microcontroller featuring 32-bit ARM Cortex® -M4 with FPU core, 1-Mbyte Flash memory, 192-Kbyte RAM in an LQFP100 package On-board ST-LINK/V2 on STM32F4DISCOVERY or ST-LINK/V2-A on STM32F407G-DISC1 ARM® mbed™ -enabled (http://mbed.org) with ST-LINK/V2-A only USB ST-LINK with re-enumeration capability and three different interfaces: Virtual com port (with ST-LINK/V2-A only) Mass storage (with ST-LINK/V2-A only) Debug port Board power supply: through USB bus or from an external 5 V supply voltage External application power supply: 3 V and 5 V LIS302DL or LIS3DSH ST MEMS 3-axis accelerometer MP45DT02 ST MEMS audio sensor omnidirectional digital microphone CS43L22 audio DAC with integrated class D speaker driver Eight LEDs: LD1 (red/green) for USB communication LD2 (red) for 3.3 V power on Four user LEDs, LD3 (orange), LD4 (green), LD5 (red) and LD6 (blue) 2 USB OTG LEDs LD7 (green) VBUS and LD8 (red) over-current Two push buttons (user and reset) USB OTG FS with micro-AB connector Extension header for all LQFP100 I/Os for quick connection to prototyping board and easy probing Comprehensive free software including a variety of examples, part of STM32CubeF4 package or STSW-STM32068 for legacy standard libraries usage. For more embedded system tutorial visit http://www.kgptalkie.com and Subscribe this channel for more videos. Keywords: stm32f4, stm32f4 discovery, stm32f407, stm32f429, stm32f407vet6, stm32f4 adc, stm32f4 discovery board, stm32f407vgt6, stm32f4 lcd, stm32f469, stm32f401, stm32f4 discovery tutorial keil, stm32f4 dac, stm32f4 uart, stm32f4 can bus, stm32f4 projects, stm32f4 pwm, stm32f4 arduino, stm32f4 adc example, stm32f4 accelerometer, stm32f4 atollic, stm32f4 accelerometer tutorial, stm32f4 audio, stm32f4 adc dma example, stm32f4 adc multiple channels, stm32f4 audio dsp, stm32f4 bluetooth, stm32f4 bootloader, stm32f4 bluetooth example, stm32f4 boot0, stm32f4 bldc motor control, stm32f4 breadboard, stm32f4 blinking led, stm32f4 bootloader usb, stm32f4 boot0 boot1, stm32f4 buzzer, stm32f4 clock, stm32f4 cubemx, stm32f4 cnc, stm32f4 cubemx tutorial, stm32f4 can bus tutorial, stm32f4 coding, stm32f4 cs43l22, stm32f4 cubemx examples, stm32f4 cdc example, stm32f4 discovery board - keil 5 ide with cubemx tutorial, stm32f4 discovery board - keil 5 ide with cubemx tutorial 9, stm32f4 dma, stm32f4 discovery board - keil 5 ide with cubemx tutorial 18, stm32f4 dsp, stm32f4 discovery programming, stm32f4 eclipse, stm32f4 esp8266, stm32f4 ethernet, stm32f4 examples, stm32f4 ethernet phy, stm32f4 external interrupt, stm32f4 encoder, stm32f4 embedded linux, stm32f4 encoder mode, stm32f4 encoder example, stm32f4 freertos, stm32f4 fft, stm32f4 flash write example, stm32f4 flight controller, stm32f4 fsmc tutorial, stm32f4 freertos example, stm32f4 freertos tutorial, stm32f4 floating point performance, stm32f4 fpga, stm32f4 freertos keil, stm32f4 gui, stm32f4 gpio, stm32f4 gps, stm32f4 getting started, stm32f4 gpio tutorial, stm32f4 gyroscope example, stm32f4 graphics, stm32f4 gyroscope, stm32f4 gsm module, stm32f4 gpio read pin, stm32f4 hal i2c example, stm32f4 hal spi example, stm32f4 hdmi, stm32f4 hal timer interrupt, stm32f4 hal driver, stm32f4 hal ethernet example, stm32f4 hal adc dma, stm32f4 hal timer example, stm32f4 hal printf, stm32f4 hc-sr04,

Arduino audio sampling tutorial (part 1)

This is a detailed tutorial how to play an audio sample stored in the program memory of the ATMega micro controller used by the Arduino mega 2560. It is also applicable to other Arduino types and stand alone AVR MCUs. More Sophisticated solution will follow in the next part. Used software: Audacity - http://audacity.sourceforge.net/ bin2h alternative - http://bitluni.net/2016/12/19/no-more-bin2h-exe/ Arduino IDE - http://arduino.cc/en/Main/Software

STM32 ADC with multiple channel with internal temprature sensor using DMA

I used STM32F103C8T6 blue pill board for test ADC. Here I used 3 channel of ADC1 to read analogue value. *Target is to set ADC channel 0 and channel 1 frequency of conversion to 176k and 142k samples/second respectively. Fsrate1 = 176k Fsrate2 = 142k Ts = sampling time in cycles Fadc= 12Mhz as configured in clock settings(Max 14Mhz) Ttotalrate = total conversion time in ADC clock cycles Tconv = constant equal to 12.5 cycles channel 0 : Ts = (Fadc / Fsrate1) - 12 Ts = (12M / 176k) -12 = 55.68181818 nearest possible value = 55.5 channel 1: Ts = (Fadc / Fsrate2) - 12 Ts = (12M / 142k) -12 = 72.00704225 nearest possible value 71.5 As you want to use large sampling frequency go with less sampling cycles. example of Dual slow interleaved mode ADC is given as refere page no 12 http://www.st.com/content/ccc/resource/technical/document/application_note/c4/63/a9/f4/ae/f2/48/5d/CD00258017.pdf/files/CD00258017.pdf/jcr:content/translations/en.CD00258017.pdf

#1 STM32CubeMX Tutorial

STM32CubeMX full Introduction Video. How to start using the program, all its features and settings. You can download the STM23CubeMX software from the ST Product page: http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/PF259242?sc=microxplorer Or Directly from: http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/PF259242?sc=microxplorer# Please subscribe so you will get notifications when I will load more training videos on the STM32. Thanks for watching. Next Video: How the cube generates the code: http://www.youtube.com/ /watch?v=SZub9bFGXak STM32CubeMX Power Consumption Calculator: https://youtu.be/GZEX3HmzCfI

ADC and DAC programming in Keil on STM32F4 Discovery Board. The code was generated using ST Microelectronics STM32CubeMx software.

The STM32F4DISCOVERY Discovery kit allows users to easily develop applications with the STM32F407 high-performance microcontrollers with ARM®Cortex®-M4 32-bit core. It includes everything required either for beginners or for experienced users to get quickly started.

Based on the STM32F407VGT6, it includes an ST-LINK/V2 or ST-LINK/V2-A embedded debug tool, two ST MEMS digital accelerometers, a digital microphone, one audio DAC with an integrated class D speaker driver, LEDs and push buttons and a USB OTG micro-AB connector.

Key Features:
STM32F407VGT6 microcontroller featuring 32-bit ARM Cortex® -M4 with FPU core, 1-Mbyte Flash memory, 192-Kbyte RAM in an LQFP100 package
On-board ST-LINK/V2 on STM32F4DISCOVERY or ST-LINK/V2-A on STM32F407G-DISC1
ARM® mbed™ -enabled (http://mbed.org) with ST-LINK/V2-A only
USB ST-LINK with re-enumeration capability and three different interfaces:
Virtual com port (with ST-LINK/V2-A only)
Mass storage (with ST-LINK/V2-A only)
Debug port
Board power supply: through USB bus or from an external 5 V supply voltage
External application power supply: 3 V and 5 V
LIS302DL or LIS3DSH ST MEMS 3-axis accelerometer
MP45DT02 ST MEMS audio sensor omnidirectional digital microphone
CS43L22 audio DAC with integrated class D speaker driver
Eight LEDs:
LD1 (red/green) for USB communication
LD2 (red) for 3.3 V power on
Four user LEDs, LD3 (orange), LD4 (green), LD5 (red) and LD6 (blue)
2 USB OTG LEDs LD7 (green) VBUS and LD8 (red) over-current
Two push buttons (user and reset)
USB OTG FS with micro-AB connector
Extension header for all LQFP100 I/Os for quick connection to prototyping board and easy probing
Comprehensive free software including a variety of examples, part of STM32CubeF4 package or STSW-STM32068 for legacy standard libraries usage.

For more embedded system tutorial visit http://www.kgptalkie.com
and Subscribe this channel for more videos.

Keywords:
stm32f4,
stm32f4 discovery,
stm32f407,
stm32f429,
stm32f407vet6,
stm32f4 adc,
stm32f4 discovery board,
stm32f407vgt6,
stm32f4 lcd,
stm32f469,
stm32f401,
stm32f4 discovery tutorial keil,
stm32f4 dac,
stm32f4 uart,
stm32f4 can bus,
stm32f4 projects,
stm32f4 pwm,
stm32f4 arduino,
stm32f4 adc example,
stm32f4 accelerometer,
stm32f4 atollic,
stm32f4 accelerometer tutorial,
stm32f4 audio,
stm32f4 adc dma example,
stm32f4 adc multiple channels,
stm32f4 audio dsp,
stm32f4 bluetooth,
stm32f4 bootloader,
stm32f4 bluetooth example,
stm32f4 boot0,
stm32f4 bldc motor control,
stm32f4 breadboard,
stm32f4 blinking led,
stm32f4 bootloader usb,
stm32f4 boot0 boot1,
stm32f4 buzzer,
stm32f4 clock,
stm32f4 cubemx,
stm32f4 cnc,
stm32f4 cubemx tutorial,
stm32f4 can bus tutorial,
stm32f4 coding,
stm32f4 cs43l22,
stm32f4 cubemx examples,
stm32f4 cdc example,
stm32f4 discovery board - keil 5 ide with cubemx tutorial,
stm32f4 discovery board - keil 5 ide with cubemx tutorial 9,
stm32f4 dma,
stm32f4 discovery board - keil 5 ide with cubemx tutorial 18,
stm32f4 dsp,
stm32f4 discovery programming,
stm32f4 eclipse,
stm32f4 esp8266,
stm32f4 ethernet,
stm32f4 examples,
stm32f4 ethernet phy,
stm32f4 external interrupt,
stm32f4 encoder,
stm32f4 embedded linux,
stm32f4 encoder mode,
stm32f4 encoder example,
stm32f4 freertos,
stm32f4 fft,
stm32f4 flash write example,
stm32f4 flight controller,
stm32f4 fsmc tutorial,
stm32f4 freertos example,
stm32f4 freertos tutorial,
stm32f4 floating point performance,
stm32f4 fpga,
stm32f4 freertos keil,
stm32f4 gui,
stm32f4 gpio,
stm32f4 gps,
stm32f4 getting started,
stm32f4 gpio tutorial,
stm32f4 gyroscope example,
stm32f4 graphics,
stm32f4 gyroscope,
stm32f4 gsm module,
stm32f4 gpio read pin,
stm32f4 hal i2c example,
stm32f4 hal spi example,
stm32f4 hdmi,
stm32f4 hal timer interrupt,
stm32f4 hal driver,
stm32f4 hal ethernet example,
stm32f4 hal adc dma,
stm32f4 hal timer example,
stm32f4 hal printf,
stm32f4 hc-sr04,

Comments for video: