stm32f4 + cube mx + keil - emcu• cube mx • stm32f4 hal library. 3 11 june 2016 cube. 4 11 june...
TRANSCRIPT
1 11 June 2016
STM32F4 + CUBE MX + KEIL
Presenter’s name
2 11 June 2016
HW and SW tools
HW:
• NUCLEO-F401RE
SW:
• KEIL Compiler
• CUBE MX
• STM32F4 HAL Library
4 11 June 2016
Introduction to CubeMX 1/3
5 11 June 2016
Introduction to CubeMX 2/3
6 11 June 2016
Introduction to CubeMX 3/3
7 11 June 2016
CubeMX request update 1/2
The green arrow indicate that are presents some updates.
8 11 June 2016
CubeMX request update 2/2
9 11 June 2016
CubeMX: Pinout configuration
11 11 June 2016
CubeMX: Peripheral and middleware configuration
13 11 June 2016
CubeMX generate the code for some GUI 1/3
14 11 June 2016
CubeMX generate the code for some GUI 2/3
15 11 June 2016
CubeMX generate the code for some GUI 3/3
16 11 June 2016
CubeMX: Power consumption calculator
18 11 June 2016
HAL library – HAL == hardware abstraction layer
19 11 June 2016
HAL library The HAL library are here.
20 11 June 2016
HAL library – LL now (June 2016) only available on L4
21 11 June 2016
HAL library – LL now (June 2016) only available on L4
22 11 June 2016
HAL library – LL now (June 2016) only available on L4
23 11 June 2016
HAL library – LL now (June 2016) only available on L4
24 11 June 2016
HAL library – LL now (June 2016) only available on L4
25 11 June 2016
HAL library – LL now (June 2016) only available on L4
26 11 June 2016
HAL library - Where to find examples ready to use ?
28 11 June 2016
Create new project using CubeMX
• Run CubeMX tool
• Start new project
• Click “New Project” desktop
shortcut, or
• Go to “Menu->File->New Project”
• Filter:
• Series: STM32F4
• Line: STM32F401
• Package: LQFP64
• Select: STM32F401RE
29 11 June 2016
Configure debug interface
Go to Pinout
settings
Under SYS
peripheral select
SWD interface
30 11 June 2016
Configure LSE resonator (32,768 KHz)
31 11 June 2016
Configure GPIO for LED toggling
Configure LED pin as GPIO_Output
33 11 June 2016
CubeMX generate the code for some GUI 1/3
1
2
3
34 11 June 2016
CubeMX generate the code for some GUI 2/3
35 11 June 2016
CubeMX generate the code for some GUI 3/3
36 11 June 2016
CubeMX generate the code 1/3
37 11 June 2016
CubeMX generate the code 2/3
38 11 June 2016
CubeMX add code for flashing LEDs
See the:
UM1725 - Description
of STM32F4 HAL
drivers
39 11 June 2016
CubeMX compile and debug – 1/3
40 11 June 2016
CubeMX compile and debug – 2/3
41 11 June 2016
CubeMX compile and debug – 3/3