0% found this document useful (0 votes)
63 views

Week5 STM32 Nucleo

stm ide

Uploaded by

proglsi05
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views

Week5 STM32 Nucleo

stm ide

Uploaded by

proglsi05
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

STM32F4xx

Introduction

IE 5995: IoT and Edge AI Programming


Dr. Yanchao Liu
Industrial & Systems Engineering
Wayne State University
Agenda
• Learn the STM32F4xx NUCLEO board layout and features
• Install the development toolchain
• Create STM32 projects, configure, build, and download
• Understand the code organization
• Use GPIO for digital input and output
• Learn basic debugging functions
• Use Interrupts
• Use Timers and Timer-triggered Interrupts
• Use UART to transmit and receive data (poll, interrupt and DMA)
• Use ADC, PWM, DAC, DMA

Winter 2022 IE5995: IoT & Edge AI Programming 2


NUCLEO board codification STM32 Nucleo-64 boards
Common features
• STM32 microcontroller in LQFP64 or
LQFP48 package
• 1 user LED shared with ARDUINO®
• 1 user and 1 reset push-buttons
• 32.768 kHz crystal oscillator
• Board connectors:
• ARDUINO® Uno V3 expansion connector
• ST morpho extension pin headers for full
access to all STM32 I/Os
• Flexible power-supply options: ST-LINK
USB VBUS or external sources
• On-board ST-LINK debugger/programmer
with USB re-enumeration
• Capability: mass storage, Virtual COM port,
and debug port
• Comprehensive free software libraries and
examples available with the
• STM32Cube MCU Package
• Support of a wide choice of Integrated
Development Environments (IDEs)
• Including IAR Embedded Workbench®, MDK-
ARM, and STM32CubeIDE

Winter 2022 IE5995: IoT & Edge AI Programming 3


STM32 Nucleo product line

Development toolchains
• IAR Systems® - IAR Embedded Workbench®
• Keil® - MDK-ARM
• STMicroelectronics - STM32CubeIDE
The first two are Windows only. We will use STM32CubeIDE.

Winter 2022 IE5995: IoT & Edge AI Programming 4


STM32F446RE NUCLEO
• Find these elements on the board
• B1 (User button), B2 (Reset button)
• LD1 (three-color led), LD2 (green led), LD3
(red led)

Winter 2022 IE5995: IoT & Edge AI Programming 5


Understand the Pin labels

• PA10 means
• GPIO Port A (GPIOA)
• GPIO_PIN_10
• So, to write HIGH to PA10, call this
function:
• HAL_GPIO_WritePin(GPIOA,
GPIO_PIN_10, GPIO_PIN_SET);
• More on the functions later

Winter 2022 IE5995: IoT & Edge AI Programming 6


Arduino connectors on NUCLEO-F446RE
CN5, CN6, CN8, and CN9 are female connectors compatible with ARDUINO® standard. Most shields
designed for ARDUINO® can fit the STM32 Nucleo boards.

Winter 2022 IE5995: IoT & Edge AI Programming 7


ST morpho connector on NUCLEO-F446RE
1. The default state of BOOT0 is LOW. It can
be set to HIGH when a jumper is on pin5-
7 of CN7. Two unused jumpers are
available on CN11 and CN12 (bottom side
of the board).
2. U5V is 5 V power from ST-LINK/V2-1 USB
connector and it rises before +5V.
3. PA13 and PA14 share with SWD signals
connected to ST-LINK/V2-1, it is not
recommended to use them as IO pins if
the ST-LINK part is not cut.

Spare jumpers

Winter 2022 IE5995: IoT & Edge AI Programming 8


LEDs on the NUCLEO board

Winter 2022 IE5995: IoT & Edge AI Programming 9


Toolchain installation
• We need to install the following software on the PC
• STM32CubeProgrammer
• https://www.st.com/en/development-tools/stm32cubeprog.html
• STM32CubeIDE
• https://www.st.com/en/development-tools/stm32cubeide.html

Winter 2022 IE5995: IoT & Edge AI Programming 10


STM32CubeIDE

• Click “Start new STM32


project”
• Some additional downloads
will happen

Winter 2022 IE5995: IoT & Edge AI Programming 11


Create a project using STM32CubeIDE
• Click the “Board Selector”
tab
• Select the board NUCLEO-
F446RE from the dropdown
menu
• Before clicking “Next”,
download the manuals from
Docs & Resources
• The docs will be saved to
{HOME}/STM32Cube/Repository
• Take a quick scan of the docs
to see what info is in there, for
future reference
• Click “Next”
Winter 2022 IE5995: IoT & Edge AI Programming 12
Some important points from the documents

• The STM32 Nucleo board and its shield can consume a maximum of 300 mA current, not more.
• The USART2 interface available on PA2 and PA3 of the STM32 microcontroller can be connected to ST-
LINK MCU, ST morpho connector, or to ARDUINO® connector. The choice can be changed by setting the
related solder bridges. By default, the USART2 communication between the target STM32 and ST-LINK
MCU is enabled, in order to support virtual COM port for Mbed™ (SB13 and SB14 ON, SB62 and SB63
OFF).
• If the communication between the target STM32 PA2 (D1) or PA3 (D0) and shield or extension board is
required, SB62 and SB63 must be ON, while SB13 and SB14 must be OFF.

Winter 2022 IE5995: IoT & Edge AI Programming 13


HelloWorld project
• Type in the project name,
e.g., HelloWorld
• Click “Finish”
• Click “Yes” to initialize
peripherals with their default
mode.
• Click “Yes” to open the
Device Configuration Tool
perspective.
• Before the perspective is
loaded, some additional
downloads (~700MB) will occur

Winter 2022 IE5995: IoT & Edge AI Programming 14


Configure and generate code
• Feel free to navigate the
four tabs:
• Pintout & Configuration
• Clock Configuration
• Project Manager
• Tools
• Next slide show the four
tabs
• Don’t change anything
• In menu, click Project ->
Generate Code
• Click “Yes” to open the
code perspective

Winter 2022 IE5995: IoT & Edge AI Programming 15


Winter 2022 IE5995: IoT & Edge AI Programming 16
Code perspective
• Always write user code within
the
/* USER CODE BEGIN .. */

/* USER CODE END .. */
blocks.
• User code written outside such
blocks will be wiped next time
“Generate Code” is run after
some configuration change.

Winter 2022 IE5995: IoT & Edge AI Programming 17


Build the project
• For now, don’t make any change to the code
• In the menu, click “Project -> Build Project”
• The build should finish quickly with no error or warning.
• In File Explore, go to the project folder
• E.g., C:\Users\gn0061\STM32CubeIDE\workspace_1.8.0\HelloWorld\
• HelloWorld.bin is the file to send to the board, through the STM32CubeProgrammer

Winter 2022 IE5995: IoT & Edge AI Programming 18


Download the program to the board
• Open the Programmer
• Connect to board (ST-LINK)
• Go to “Erasing &
Programming”
• Browse and select the
HelloWorld.bin file.
• Click “Start Programming”
Note: whatever content that was previously
on the board will be erased.
After the programming, the board is reset
and the new program will run automatically.
In this case, the program does nothing.

We’ve successfully created our first program on the board.


Whenever the board is powered, the program will run automatically.
Winter 2022 IE5995: IoT & Edge AI Programming 19
main.c
• We can see that B1 (the user button) and LD2 (the green led) are
enabled, and the LD2 is reset

Note how the GPIO_InitStruct is configured.


We will see details of this later.
GPIO_PIN_RESET means 0
GPIO_PIN_SET means 1

Winter 2022 IE5995: IoT & Edge AI Programming 20


main.c
• The USART2 is enabled (connected to PA2 and PA3)

Winter 2022 IE5995: IoT & Edge AI Programming 21


main.c
• Check out the main function
• Add some functionality
• Add the following two lines in the
while loop

The names such as “LD2_GPIO_Port” and “LD2_Pin”


are defined in main.h file (which was generated
automatically)

Save, Build Project, then download the HelloWorld.bin file to the board. The green led should blink (toggle
on/off every 500 ms). If the program does not run automatically, press the Reset button on the board.
Winter 2022 IE5995: IoT & Edge AI Programming 22
Definitions
• Some shorthand names are defined in
main.h
• For example:
• LD2_Pin is alias for GPIO_PIN_5
• But where is GPIO_PIN_5 define?
• It is defined in the stm34f4xx_hal_gpio.h

Winter 2022 IE5995: IoT & Edge AI Programming 23


HAL_GPIO_TogglePin(LD2_GPIO_Port, LD2_Pin);
• Where is the HAL_
function defined?
• What other GPIO
functions are available?

Check out the


Drivers/STM32F4xx_HAL_D
river folder in the source
code

Winter 2022 IE5995: IoT & Edge AI Programming 24


Some other GPIO functions

This means
GPIO_PIN_RESET is alias for 0 (Low)
GPIO_PIN_SET is alias for 1 (High)

So, another way of blinking the green led is:


Exercise 1: Modify the content in the while (1)
loop to realize this:
- When the blue button (B1_Pin) is pressed
(PinState is 0), the green led is on;
otherwise, the green led is off.
Hint: Use the HAL_GPIO_ReadPin function.

Winter 2022 IE5995: IoT & Edge AI Programming 25


GPIO_InitStruct.Mode, .Pull, .Speed defs

Winter 2022 IE5995: IoT & Edge AI Programming 26


Use other GPIO pins (e.g., PA_10)
• Double click HelloWorld.ioc in
the Project Explore pane to
open the Device
Configuration perspective
• Change the role of PA10 to
GPIO_Output in the Pinout &
Configuration view (see pic)
• Click the save button , click
“Yes” to the question “Do you
want generate code?”, then
click “Yes” to open the code
perspective.

Winter 2022 IE5995: IoT & Edge AI Programming 27


Regenerated MX_GPIO_Init code in main.c
• LD2_Pin | GPIO_PIN_10
• Both LD2_Pin (alias for GPIO_PIN_5)
and GPIO_PIN_10 are enabled on
GPIO Port A (GPIOA)

Winter 2022 IE5995: IoT & Edge AI Programming 28


Hardware connection
• Let PA_10 (now configured as a
digital output pin) to drive a led

+ - 330 ohm

PA_10 (D2)

GND

Winter 2022 IE5995: IoT & Edge AI Programming 29


Write user code
• If the blue button (B1_Pin, or equivalently GPIO_Pin_13) is pressed, then
light up the led connected to PA_10; otherwise, turn off the led

Winter 2022 IE5995: IoT & Edge AI Programming 30


Exercises
1. Use the blue button to toggle the led connected to PA_10.
• Toggle means: click -> turn on, click again -> turn off
2. Connect a tactile switch to PA_8, set PA_8 as digital input, and use the
switch to toggle the led connected to PA_10

Tactile switch

Winter 2022 IE5995: IoT & Edge AI Programming 31


Debug functions
• We will monitor a global variable
• int counter = 0
• Increment the counter every 500 ms,
and reset when hit 20
• We are going to monitor the value of
this variable while the program is
running
• Make sure Debug is “Serial Wire”
• PA13 and PA14 will be used automatically

Winter 2022 IE5995: IoT & Edge AI Programming 32


Debug Configuration
• Make sure the board is connected
to the PC via USB
• It should not be in active connection
elsewhere, i.e., STM32CubeProgrammer
• Go to Run -> Debug Configuration
• Click the Debugger tab
• Check the box “ST-LINK S/N”, click
Scan, and select the board ID
• Check “Enable” under SWV
• Set Core Clock (MHz) to 84.0
• This value is read from the HCLK value
from the Clock Configuration page
• “Enable live expressions” is checked
• Click Debug

Winter 2022 IE5995: IoT & Edge AI Programming 33


The Debug perspective
• In the Live Expressions tab, add the
variable name “counter” as a new
expression
• Hit the play button (or F8), the program
will run on board, and the counter
value is displayed in the Live Expression
view in real-time
• Hit the suspend button to pause the
program
• Go to Window -> Show View -> SWV ->
SWV Data Trace
• Click “Configure trace”
• Add “counter” to comparator 0
• Turn on “Start Trace” button

Winter 2022 IE5995: IoT & Edge AI Programming 34


Winter 2022 IE5995: IoT & Edge AI Programming 35
Use Interrupts
• Configure PC13 (the blue
button) as GPIO_EXTI13
• Set GPIO mode (Falling
edge trigger)

Winter 2022 IE5995: IoT & Edge AI Programming 36


Enable EXTI 15:10 interrupts in NVIC

• PC13 is grouped together with


many other pins into a
common NVIC IRQ named
EXTI15_10_IRQ.
• We have to enable it to use
PC13 pin for interrupt.
• Disregard the priority setting,
just use the default 0.
• Smaller value means
higher priority.

Winter 2022 IE5995: IoT & Edge AI Programming 37


IRQ Handler invocation chain
• HAL_GPIO_IRQHandler(B1_Pin); is
called in EXTI15_10_IRQHandler
• Where is this function defined?
• IN the file stm32f4xx_hal_gpio.c

• We have to implement the HAL_GPIO_EXTI_Callback function


in main.c

Winter 2022 IE5995: IoT & Edge AI Programming 38


Implement the callback function
• Do nothing in the infinite loop
• The green led is to be toggled by the B1_Pin
interrupt

• User implementation of the


HAL_GPIO_EXTI_Callback function
• If the interrupt is trigger by B1_Pin, then toggle
the led
• Exercise: Change the interrupt trigger to the
• After making these changes, save, build project, Rising edge, and try again
and debug. • Which one (falling or rising) is better?

Winter 2022 IE5995: IoT & Edge AI Programming 39


Timers
• Many embedded applications are time dependent
• Timers are the primary means by which the MCU controls the application
• It would be a great waste of the processing power if functions like
HAL_Delay() are pervasively used to time processes
• Use hardware timers along with interrupts is the right way to implement
embedded time-dependent applications
• Use case examples:
• Measure the frequency of an incoming digital pulse train
• Measure elapsed time on an output signal (called output compare for STM timers)
• Generate precise PWM signals for servo and motor control
• Generate single pulse with programmable length and delay
• ADC (e.g., oscilloscope, audio signal) sampling at a given frequency

Winter 2022 IE5995: IoT & Edge AI Programming 40


Timer setup
• A timer is essentially a counter
• The clock source Frequency and the Prescaler controls how fast it counts
• The timer’s Counter Period determines how many counts before it’s reset to 0, i.e., the
timer’s maximum counting value
• A value of 0 turns off the timer - the timer will not run at all

Winter 2022 IE5995: IoT & Edge AI Programming 41


Timer modes
• Input Capture: allows us to automatically store the timer’s
value when an event happens on a pin
• Output Compare: allows us to toggle a pin whenever the
value in the timer reaches a certain amount
• PWM Generation: toggles a pin at different duty cycles
based on a timer’s counter value

Winter 2022 IE5995: IoT & Edge AI Programming 42


84 MHz / 84 = 1 MHz → 1 tick / microsecond
Max time: 65535 * 1 microsecond = 65.535 ms
The maximum time we can measure with this timer is
about 65 milliseconds.
We will use this timer (TIM11) to measure how long
something takes to process in the MCU
Save configuration, generate code, and go to main.c

Winter 2022 IE5995: IoT & Edge AI Programming 43


Use hardware timer to time a block of code
• Use UART2 to output messages
• Use Putty at the STLink Virtual COM Port to receive
• Cannot use physical TX/RX pins on board unless solder
bridge SB62 or SB63 is closed.

Winter 2022 IE5995: IoT & Edge AI Programming 44


Use Serial port to receive uart2 messages
• Do nothing in the infinite loop
• The green led is to be toggled by the B1_Pin
interrupt

Winter 2022 IE5995: IoT & Edge AI Programming 45


Non-blocking blinky using Timer
• 84 MHz / 8400 = 10 kHz → 1 tick every 0.0001 sec
• Can count up to 0.0001 * 65536 = 6.5536 sec

Winter 2022 IE5995: IoT & Edge AI Programming 46


Timer triggered interrupt Target event rate: 1 Hz
Time between target event: 1 sec
Clock speed: 84 MHz
Prescaler: 8400
Desired Period value:
Reaches a max value 1 sec * (84 MHz / 8400) = 10000
TIM11_CNT (Counter Period) and
value start over

Time
HAL_TIM_Base_Start() Timer update event Timer update event
(trigger interrupt) (trigger interrupt)

Enable this, or interrupt won’t trigger

Winter 2022 IE5995: IoT & Edge AI Programming 47


Timer functions to use

This function gets


called whenever the
timer resets

Use this function to start timer


if we are using interrupts

https://www.st.com/resource/en/user_manual/dm00105879-
description-of-stm32f4-hal-and-ll-drivers-stmicroelectronics.pdf
Winter 2022 IE5995: IoT & Edge AI Programming 48
Code to blink LED using Timer triggered Interrupt

Implement the Callback function in main.c


Be careful with the function name here. If it’s
misspelled, no error will occur, but the LED will
not light

Winter 2022 IE5995: IoT & Edge AI Programming 49


Use UART Rx to receive data
• There are several ways.
• Polling: call HAL_UART_Receive() in while(1) loop
• Other executions are blocked until the data is received or the timeout happens.
• Interrupt: call HAL_UART_Receive_IT() before while(1) loop, and implement
user callback function HAL_UART_RxCpltCallback() to handle event (e.g.,
process the received data)
• USART2 global interrupt must be enabled in NVIC, see next slide
• Inside the callback function, need to make a call to HAL_UART_Receive_IT() to restart,
i.e., continue receiving data in interrupt mode
• At beginning of the callback function body, use this to respond to the right UART:
• if(huart->Instance == USART2){ /* Do everything in this block */ } else {/* Do nothing */}
• DMA: call HAL_UART_Receive_DMA() before while(1) loop, and implement
callback functions
Memory DMA UART Rx buf
• HAL_UART_RxCpltCallback()
• HAL_UART_RxHalfCpltCallback() // perform some tasks when half the Rx buffer is filled

Winter 2022 IE5995: IoT & Edge AI Programming 50


Enable USART2 global interrupt

Winter 2022 IE5995: IoT & Edge AI Programming 51


Useful UART functions

Winter 2022 IE5995: IoT & Edge AI Programming 52


Use DMA to transfer data to UART Tx (Polling)
• Before the while(1) loop, add
• HAL_UART_MspInit(&huart2);
• In the while(1) loop:
huart2.Instance->CR3 |= USART_CR3_DMAT;
HAL_DMA_Start(&hdma_usart2_tx, (uint32_t)msg,
(uint32_t)&huart2.Instance->DR,
(uint32_t)strlen(msg));
HAL_DMA_PollForTransfer(&hdma_usart2_tx,
HAL_DMA_FULL_TRANSFER, HAL_MAX_DELAY);
huart2.Instance->CR3 &= ~USART_CR3_DMAT;
HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_5);
HAL_Delay(1000);

Winter 2022 IE5995: IoT & Edge AI Programming 53


Use DMA to transfer data to UART Tx (Interrupt)

Register a user callback function, let us


name it DMATransferComplete
In the while(1) loop:

Definition of the callback function

Compared to the Polling method, the interrupt method does not block the process,
especially when the message (msg) size is large.

Winter 2022 IE5995: IoT & Edge AI Programming 54


ADC (Polling)

Winter 2022 IE5995: IoT & Edge AI Programming 55


ADC (DMA) • Analog samples continuously enter memory
(buf) without CPU intervention
• Each time half and full buf is filled, a
respective event is triggered. Write callback
to handle them, e.g., process / copy the data

Empty while (1) loop will work

• Sampling frequency is
determined by clock and
prescaler
• Useful for audio sampling

Winter 2022 IE5995: IoT & Edge AI Programming 56


Pulse width modulation (PWM)
• A digital signal generated by the MCU for a variety of purposes, e.g.,
• Set the position of a standard servo motor
• Control the rotational speed of a continuous rotation motor
• Control the luminescence of a light emitter
• Control the rotational speed of a standard electric motor with external driver circuitry
• Control a photovoltaic solar battery charger’s charging rate
• Generate a waveform such as sine, triangle and square
• Generate acoustic sound waveform

Winter 2022 IE5995: IoT & Edge AI Programming 57


PWM configuration
• Frequency
• 50 Hz (or equivalently 20 ms
period) is common for servo
control
• Duty cycle
• The percentage of the amount of
time the signal is in the high state
during a period
• PWM signals are generated by
a Timer

Winter 2022 IE5995: IoT & Edge AI Programming 58


Generate PWM to toggle the LED
• Configure TIM2 for PWM
• TIM2 Channel 1 (CH1), assign to PA5
• Clock Source: Internal Clock (84 MHz)
• Channel 1: PWM Generation CH1
• Prescaler: 10000
• So, counter frequency = 84 MHz/10000 = 8400 Hz
• Counter Period: 16800
• So, timer resets every 16800/8400 Hz = 2 sec
• The PWM signal frequency is therefore 2 sec
• Pulse: 8400
• Duty cycle = Pulse / Period = 8400 / 16800 = 50%
• HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_1); in
main.c before while(1) loop
• Result: the green led (PA5) toggles at 1Hz

Winter 2022 IE5995: IoT & Edge AI Programming 59


Use PWM to dim the LED
• Based on the previous example, modify
• Prescaler: 168
• So, the counter frequency is 50 Hz
• Pulse: 21
• So, the duty cycle is 12.5%
• Result
• The green led is on but looks dim
• Exercise
1. Try some other Prescaler and Pulse values
2. Assign TIM2_CH1 to PA0, and use an
oscilloscope to visualize the signal

Winter 2022 IE5995: IoT & Edge AI Programming 60


Use PWM to control a servo motor
• A typical servo motor expects to be updated every 20 ms with a pulse between 1
ms and 2 ms, or in other words, between a 5 and 10% duty cycle on a 50 Hz
waveform. With a 1.5 ms pulse, the servo motor will be at the natural 90 degree
position. With a 1 ms pulse, the servo will be at the 0 degree position, and with a
2 ms pulse, the servo will be at 180 degrees.

https://learn.sparkfun.com/tutorials/pulse-width-modulation/all
Winter 2022 IE5995: IoT & Edge AI Programming 61
Update the duty cycle in the program
• The Pulse value is stored in the register
• TIM2->CCR1
• Timer 2 Channel 1’s Capture Compare Register
• This register value can be updated in user code
Experiment: Vary the CCR1 value
in the while(1) loop
Result: the green led will gradually
light up and dim down.

Exercise: This execution is blocking.


Change it to non-blocking mode by
using a different timer (e.g., TIM11) to
trigger the adjustment of TIM2->CCR1,
every 20 ms.

Winter 2022 IE5995: IoT & Edge AI Programming 62


DAC

https://www.st.com/resource/en/application_note/cd00259245-audio-and-
waveform-generation-using-the-dac-in-stm32-products-stmicroelectronics.pdf

Winter 2022 IE5995: IoT & Edge AI Programming 63


DAC with DMA
• Output a sine wave through DAC
Channel 1, assigned to Pin PA4
• The DAC is triggered by Timer 2
• TIM2 Trigger Event Selection is
set to Update Event
• TIM2’s clock source is 84 MHz
• Prescaler: 1000
• Period: 1680
• So, 84 MHz/1000/1680 = 50 Hz
• This means there are 50 DAC
conversions per second
• The sine wave is represented by
NSAMP = 100 samples, meaning
100 DAC conversions per sine
cycle
• So, the sine wave frequency is
50/100 = 0.5 Hz
• The analog signal output is used
for driving a LED
• See video clip
Winter 2022 IE5995: IoT & Edge AI Programming 64
DAC with DMA

The while(1) loop is empty

• Video clip

Winter 2022 IE5995: IoT & Edge AI Programming 65


Final notes
• In all experiments, we used the default Clock Configuration (HCLK = 84 MHz)
• For control projects, the lowest frequency that is high enough to meet the application’s response
requirement should be used. Lower CPU speed means lower power consumption.
• For digital processing, the clock frequency may be configured so that some timer (e.g., the trigger timer for
DAC) can produce the desired signal frequency (e.g., 44.1 kHz for audio).

Winter 2022 IE5995: IoT & Edge AI Programming 66


References
• STM32CubeIDE Advanced Debug Features: Part 3
• https://youtu.be/Eg_GLvLHM1o
• Programming with STM32 Getting Started with the Nucleo Board and C/C++, by
Donald Norris, McGraw Hill Education, 2018
• https://www.amazon.com/Programming-STM32-Getting-Started-
Nucleo/dp/1260031314
• Getting Started with STM32 and Nucleo Part 6: Timers and Timer Interrupts |
Digi-Key Electronics
• https://youtu.be/VfbW6nfG4kw
• Receive data using UART in STM32 || Poll || Interrupt || DMA
• https://youtu.be/l5msGz2tZP0

Winter 2022 IE5995: IoT & Edge AI Programming 67

You might also like