Designing with STM32F3x Course Description Designing with STM32F3x is a 3 days ST official course. The course provides all necessary theoretical and practical know-how for start developing platforms based on STM32F3x. The course begins with an introduction to STM32F microcontroller families and focuses on Cortex-M4 architecture. The course continues with an in-depth study of the memory organization, reset unit, interrupts handling, low power modes, and all the SoC peripherals such as I/O ports, ADC, RTC, USART, I2C, DAC, TSC, SPI, CAN, USB, Timers, Op-Amps, embedded comparators, HDMI, DMA and CRC. The course also employs hardware and software design tools, and combines 60% theory with 40% practical work in every meeting. Course Duration 3 days
Goals 1. Become familiar with STM32F families 2. Become familiar with ARM Cortex-M4 architecture 3. Become familiar with STM32F3x peripherals 4. Become familiar with hardware and software design tools 5. Build a new project using the development tools 6. Work with Firmware libraries Target Audience Software and hardware engineers who would like start developing with STM32F3x microcontroller Prerequisites Computer architecture background Experience in C programming Experience in developing embedded systems Course Material KEIL MDK-ARM or IAR ST Eval board Course book (including labs)
Agenda Cortex-M4 Introduction Day #1 o Cortex-M processors o Binary compatibility o Cortex-M4 core o Cortex-M4 microarchitecture o Cortex-M feature set comparison Cortex-M4 DSP Features o ARM7-ME architecture revision o Single cycle MAC unit o Saturated arithmetic o Single cycle SIMD instructions o Packed data types o DSP performance for control application o DSP library by ARM o Tools o Main DSP operations o Assembly Vs C o Circular addressing o Loop unrolling o Apply SIMD o Caching intermediate values o Fixed point DSP examples Cortex-M4F (DSP & FPU) o Floating point unit overview o FPU usage o Historical perspective o Benefits of a FPU o Cortex-M4: FPU features o Rounding issues o IEEE 754 introduction
o Number format o Arithmetic operations o Number conversion o Special values o 4 rounding modes o 5 exceptions and their handling o ARM FPv4-SP single precision FPU introduction o FPv4-SP vs IEEE 754-2008 o FP status & control register o FPU instructions o Exception management o FPU programmers model o Floating point DSP examples Lab #1: using FIR filter on STM32F3xx devices STM32F3xx Block Diagrams o STM32F30x series o STM32F37x series Memory and System Architecture o System architecture o Memory mapping and boot modes Embedded Flash Memory o Flash features overview o Flash memory organization o Flash operations o Flash memory prefetch controller o Flash error/status flags and interrupts o Flash protections Power Control (PWR) o STM32F30x power supply o STM32F37x power supply o Power sequence o Supply monitoring and reset circuitry o Power on reset (POR) / power down reset (PDR) o Programmable voltage detector (PVD)
o Backup domain o Low power modes Lab #2: Power consumption on STM32F30x Direct Memory Access (DMA) o DMA features o DMA1 request mapping o DMA2 request mapping General Purpose I/O (GPIO) o GPIO features o GPIO configuration modes o Alternate functions features o I/Os special features External Interrupt/Event Controller (EXTI) o EXTI features Day #2 STM32F3 Eco-System o Standard peripheral library o CMSIS (ARM DSP Library) o STM32F3 vs. STM32F1 firmware compatability o Tools Lab #3: Using ETM to identify root cause of hard-fault (with MDK-ARM) Reset and Clock Control (RCC) o Reset sources and block diagram o Clock features o Clock scheme STM32F30x & STM32F37x o HIS/LSI/external clock measurement Cyclic Redundancy Check Calculation Unit (CRC) o CEC introduction o CRC operation
Digital-to-Analog Converter (DAC) o DAC features o DAC channels block diagram o DAC output voltage o DAC data format o DAC conversion triggers o Noise wave generation o Triangle wave generation o DAC with DMA o Dual DAC channel mode and data format Window Watchdog (WWDG) & Independent Watchdog (IWDG) o WWDG features o IWDG features Serial Peripheral Interface (SPI) o SPI features and block scheme o Data frame format o Full duplex communication o Simplex communication o Half duplex mode o NSS HW & SW management o Multi slave system (duplex/simplex) o 32-bit Rx and Tx FIFOs o Packed mode & FIFO access o DMA o CRC calculation o NSS enhanced mode Universal Synchronous Asynchronous Receiver Transmitter (USART) o USART features o DMA capability o Synchronous mode o IrDA SIR encoder decoder o Smart card mode o Single wire half duplex mode
o Modbus communication o Auto-baudrate detection o USART interrupts Lab #4: USART and MCU wakeup from Stop Mode on START bit detection Inter Integrated Circuit (I2C) o I2C features and block diagram o I2C SDA and SCL noise filter o I2C programmable timings o I2C master clock generation o Slave addressing mode o Wakeup from STOP on address match o Master & Event mode management o Slave mode o I2C events o SMBUS PEC Lab #5: Write/Read operations in RF EEPROM I2S Peripheral o SPI/I2S mode switch o I2S features o I2S full duplex block diagram o Half/full duplex communication o 2 x full duplex communication o STM32F37xxx vs STM32F30xxx
Day #3 Controller Area Network (CAN) o CAN features o BxCAN operating modes Real-Time Clock (RTC) o RTC features and block diagram o RTC registers write protection o RTC clock sources o RTC in low power modes and Reset o RTC alternate function configuration o RTC calendar o RTC programmable alarm o Wakeup configuration o Smooth digital calibration o Tamper detection General Purpose Timers o STM32F30x & STM32F37x timer features overview o Features overview o Counter modes o Update event o Capture compare array o Input capture mode o PWM input mode o Output compare mode o PWM mode o One pulse mode o Encoder interface o Hall sensor interface o TIMs synchronization o Timers enhancements in STM32F30x Lab #6: generate phase shifted signals using the new PWM modes (asymmetric and combined PWM modes)
Universal Serial Bus Interface (USB Device) o USB speeds and bus components o USB 2.0 Bus Tiered-Star topology o USB device attachment & speed detection o USB device power o USB suspend mode o USB transaction o USB transfer o USB device controller in STM32 series o Main features o Double buffering transfer mode o USB library footprints Touch Sensing Controller (TSC) o TSC features o TSC block diagram o Charge transfer measuring circuit o Charge transfer acquisition overview o Charge transfer acquisition sequence o STMTouch sensing library o GPIO analog switch and hysteresis control Analog-to-Digital Converter (ADC) 5 MSPS o ADC features o ADC pins o ADC block diagram o ADC clocks o ADC deep power down mode o ADC calibration o ADC channel selection o ADC sampling time o Single ended and differential input channels o ADC conversion modes o Queue context and Queue overflow o ADC channel offset o Auto delayed conversion o ADC analog watchdogs
o ADC dual mode o Injected & Regular simultaneous modes o Interleaved mode o Alternate trigger mode o DMA request in dual ADC mode o ADC flags and interrupts Lab #7: ADC continuous conversion of potentiometer analog signal Comparators (COMP) o COMP features o Block diagram o Blanking function Lab #8: COMP and TIM1 break function Operational Amplifier (OPAMP) o Features o Standalone mode o Follower mode o PGA mode o Timer controlled multiplexer mode o OPAMP calibration Lab #9: Using OPAMP in PGA mode HDMI-CEC o HDMI-CEC v2 controller features o HDMI-CEC interrupts o Bit timing error detection o Signal free time (SFT) configuration