DESLab STM32 Training
latest
Contents
Introduction
GPIO Configurations
Clock Configuration For STM32F1
External Interrupt (EXTI)
Timer
Universal synchronous asynchronous receiver transmitter (USART)
Analog-to-digital converter (ADC)
Activities
GPIO
Interrupt
Timer
Universal synchronous asynchronous receiver transmitter (USART)
Extension
System Clock Configuration
Timer Interrupt
Development
GitHub Codespaces
Appendix
Create an STM32 Bare Metal Project
Debugging Sample Code
Clock Configuration For STM32F4
DESLab STM32 Training
Welcome to DESLab STM32 Training’s documentation!
Edit on GitHub
Welcome to DESLab STM32 Training’s documentation!
Contents
Introduction
Training Context
Expected Training Module
Training Schedule
Training Resource
Device References
Acknowledgement
GPIO Configurations
OUTPUT Configurations
INPUT Configurations
Clock Configuration For STM32F1
Configuration Target
1. Enable Prefetch buffer
2. Initializes the RCC Oscillators
1. Initializes the CPU, AHB and APB buses clocks
Full Implementation Source
Reference
External Interrupt (EXTI)
1. Enable AFIO Clock
2. Select PB1 input for EXTT1
3. Unmask interrupt request from Line 1
4. Disable rising trigger
5. Enable falling trigger
6. Init EXTI interrupt
Demo Code: Toggle LED0 when Button 1 is pushed
EXTI1_IRQHandler initialization
Reference
Timer
Timer Configuration
Full Implementation Source
Universal synchronous asynchronous receiver transmitter (USART)
Conventional Setup
USART Interrupt
Reference
Analog-to-digital converter (ADC)
ADC Conventional Configuration
ADC Interrupt
Activities
GPIO
MATERIALS
Activity 1
Activity 2
Reference
Interrupt
MATERIALS
ACTIVITY 1: EXTERNAL INTERRUPT
ACTIVITY 2: SYSTEM TICK
ACTIVITY 3: TIM2
ACTIVITY 4: TIM2 AND TIM3
ACTIVITY 5: TIMER AND EXTERNAL INTERRUPT
Reference
Timer
ACTIVITY 1
ACTIVITY 2
ACTIVITY 3
Reference
Universal synchronous asynchronous receiver transmitter (USART)
ACTIVITY 1
ACTIVITY 2
ACTIVITY 3
ACTIVITY 4
Extension
System Clock Configuration
Configure SysTick control and status register (STK_CTRL)
Configure SysTick reload value register (STK_LOAD)
Option 1: Create a delay from System Clock
Option 2: Setup
SysTick_Handler
SysTick_Handler initialization
Full Implementation Source
Reference
Timer Interrupt
Clear Update Interrupt Flag
Enable Update Interrupt
Enable Pending Interrupt
Set up the
TIM1_UP_IRQHandler
Implementation Source
Reference
Development
GitHub Codespaces
Materials
Create new codespaces
Install Sphinx ReadtheDocs Theme
Reload Window
Image Name Generator
Appendix
Create an STM32 Bare Metal Project
Chip Select
Create an HAL project
Create an Bare Metal Project
References
Debugging Sample Code
Sample Code
Debugger Configurations of the Training Board
Cable Connection
Clock Configuration For STM32F4
1. Configure the main internal regulator output voltage
2. Configure Flash prefetch, Instruction cache, Data cache
3. Initializes the RCC Oscillators
4. Initializes the CPU, AHB and APB buses clocks
Full Implementation Source
Reference