Table Of ContentSeries ISSN: 1932-3166 A
S
A
D
I
•
P
O
N
G
S
W
A
T
D
Series Editor: Mitchell A. Thornton, Southern Methodist University
P
R
Programming the ARM® Cortex®-M4-based STM32F4 O
G
R
Microcontrollers with Simulink® A
M
M
I
N
Farzin Asadi, Maltepe University G
T
Sawai Pongswatd, King Mongkut’s Insitute of Technology H
E
A
R
A microcontroller is a compact, integrated circuit designed to govern a specific operation in an M
®
embedded system. A typical microcontroller includes a processor, memory, and input/output C
O
(I/O) peripherals on a single chip. R
T
E
When they first became available, microcontrollers solely used Assembly language. X
®
Today, the C programming language (and some other high-level languages) can be used as well. -M
4
Some of advanced microcontrollers support another programming technique as well: Graphical -B
A
programming. In graphical programming, the user does not write any code but draws the block S
E
D
diagram of the system he wants. Then a software converts the drawn block diagram into a suitable
S
T
code for the target device. M
3
Programming microcontrollers using graphical programming is quite easier than 2
F
4
programming in C or Assembly. You can implement a complex system within hours with graphical M
I
programming while its implementation in C may take months. These features make graphical C
R
O
programming an important option for engineers.
C
O
This book explains the graphical programming of STM32F4 high-performance
N
T
microcontrollers with the aid of Simulink® and Waijung blockset. Students of engineering (for R
O
instance, electrical, biomedical, mechatronics and robotic to name a few), engineers who work in L
L
industry, and anyone who want to learn the graphical programming of STM32F4 can benefit from E
R
S
this book. Prerequisite for this book is the basic knowledge of MATLAB®/Simulink®. W
I
T
About SYNTHESIS H
S
This volume is a printed version of a work that appears in the Synthesis IM
U
Digital Library of Engineering and Computer Science. Synthesis L
I
books provide concise, original presentations of important research and N
K
development topics, published quickly, in digital and print formats. ®
M
O
R
G
A
N
&
store.morganclaypool.com C
L
A
Y
P
O
O
L
Programming the ARM®
Cortex®-M4-based
STM32F4 Microcontrollers
with Simulink®
Synthesis Lectures on Digital
Circuits and Systems
Editor
MitchellA.Thornton,SouthernMethodistUniversity
TheSynthesisLecturesonDigitalCircuitsandSystemsseriesiscomprisedof50-to100-pagebooks
targetedforaudiencememberswithawide-rangingbackground.TheLecturesincludetopicsthat
areofinteresttostudents,professionals,andresearchersintheareaofdesignandanalysisofdigital
circuitsandsystems.EachLectureisself-containedandfocusesonthebackgroundinformation
requiredtounderstandthesubjectmatterandpracticalcasestudiesthatillustrateapplications.The
formatofaLectureisstructuredsuchthateachwillbedevotedtoaspecifictopicindigitalcircuits
andsystemsratherthanalargeroverviewofseveraltopicssuchasthatfoundinacomprehensive
handbook.TheLecturescoverbothwell-establishedareasaswellasnewlydevelopedoremerging
materialindigitalcircuitsandsystemsdesignandanalysis.
ProgrammingtheARM®Cortex®-M4-basedSTM32F4Microcontrollerswith
Simulink®
FarzinAsadiandSawaiPongswatd
2021
ArduinoIII:InternetofThings
StevenF.Barrett
2021
ArduinoII:Systems
StevenF.Barrett
2020
ArduinoI:GettingStarted
StevenF.Barrett
2020
IndexGenerationFunctions
TsutomuSasao
2019
MicrochipAVR®MicrocontrollerPrimer:ProgrammingandInterfacing,ThirdEdition
StevenF.BarrettandDanielJ.Pack
2019
iii
MicrocontrollerProgrammingandInterfacingwithTexasInstrumentsMSP430FR2433
andMSP430FR5994–PartII,SecondEdition
StevenF.BarrettandDanielJ.Pack
2019
MicrocontrollerProgrammingandInterfacingwithTexasInstrumentsMSP430FR2433
andMSP430FR5994–PartI,SecondEdition
StevenF.BarrettandDanielJ.Pack
2019
SynthesisofQuantumCircuitsvs.SynthesisofClassicalReversibleCircuits
AlexisDeVos,StijnDeBaerdemacker,andYvanVanRentergen
2018
BooleanDifferentialCalculus
BerndSteinbachandChristianPosthoff
2017
EmbeddedSystemsDesignwithTexasInstrumentsMSP43232-bitProcessor
DungDang,DanielJ.Pack,andStevenF.Barrett
2016
FundamentalsofElectronics:Book4OscillatorsandAdvancedElectronicsTopics
ThomasF.SchubertandErnestM.Kim
2016
FundamentalsofElectronics:Book3ActiveFiltersandAmplifierFrequency
ThomasF.SchubertandErnestM.Kim
2016
BadtotheBone:CraftingElectronicSystemswithBeagleBoneandBeagleBoneBlack,
SecondEdition
StevenF.BarrettandJasonKridner
2015
FundamentalsofElectronics:Book2Amplifiers:AnalysisandDesign
ThomasF.SchubertandErnestM.Kim
2015
FundamentalsofElectronics:Book1ElectronicDevicesandCircuitApplications
ThomasF.SchubertandErnestM.Kim
2015
ApplicationsofZero-SuppressedDecisionDiagrams
TsutomuSasaoandJonT.Butler
2014
iv
ModelingDigitalSwitchingCircuitswithLinearAlgebra
MitchellA.Thornton
2014
ArduinoMicrocontrollerProcessingforEveryone!ThirdEdition
StevenF.Barrett
2013
BooleanDifferentialEquations
BerndSteinbachandChristianPosthoff
2013
BadtotheBone:CraftingElectronicSystemswithBeagleBoneandBeagleBoneBlack
StevenF.BarrettandJasonKridner
2013
IntroductiontoNoise-ResilientComputing
S.N.Yanushkevich,S.Kasai,G.Tangim,A.H.Tran,T.Mohamed,andV.P.Shmerko
2013
AtmelAVRMicrocontrollerPrimer:ProgrammingandInterfacing,SecondEdition
StevenF.BarrettandDanielJ.Pack
2012
RepresentationofMultiple-ValuedLogicFunctions
RadomirS.Stankovic,JaakkoT.Astola,andClaudioMoraga
2012
ArduinoMicrocontroller:ProcessingforEveryone!SecondEdition
StevenF.Barrett
2012
AdvancedCircuitSimulationUsingMultisimWorkbench
DavidBáez-López,FélixE.Guerrero-Castro,andOfeliaDelfinaCervantes-Villagómez
2012
CircuitAnalysiswithMultisim
DavidBáez-LópezandFélixE.Guerrero-Castro
2011
MicrocontrollerProgrammingandInterfacingTexasInstrumentsMSP430,PartI
StevenF.BarrettandDanielJ.Pack
2011
MicrocontrollerProgrammingandInterfacingTexasInstrumentsMSP430,PartII
StevenF.BarrettandDanielJ.Pack
2011
v
PragmaticElectricalEngineering:SystemsandInstruments
WilliamEccles
2011
PragmaticElectricalEngineering:Fundamentals
WilliamEccles
2011
IntroductiontoEmbeddedSystems:UsingANSICandtheArduinoDevelopment
Environment
DavidJ.Russell
2010
ArduinoMicrocontroller:ProcessingforEveryone!PartII
StevenF.Barrett
2010
ArduinoMicrocontrollerProcessingforEveryone!PartI
StevenF.Barrett
2010
DigitalSystemVerification:ACombinedFormalMethodsandSimulationFramework
LunLiandMitchellA.Thornton
2010
ProgressinApplicationsofBooleanFunctions
TsutomuSasaoandJonT.Butler
2009
EmbeddedSystemsDesignwiththeAtmelAVRMicrocontroller:PartII
StevenF.Barrett
2009
EmbeddedSystemsDesignwiththeAtmelAVRMicrocontroller:PartI
StevenF.Barrett
2009
EmbeddedSystemsInterfacingforEngineersusingtheFreescaleHCS08Microcontroller
II:DigitalandAnalogHardwareInterfacing
DouglasH.Summerville
2009
DesigningAsynchronousCircuitsusingNULLConventionLogic(NCL)
ScottC.SmithandJiaDi
2009
vi
EmbeddedSystemsInterfacingforEngineersusingtheFreescaleHCS08Microcontroller
I:AssemblyLanguageProgramming
DouglasH.Summerville
2009
DevelopingEmbeddedSoftwareusingDaVinci&OMAPTechnology
B.I.(Raj)Pawate
2009
MismatchandNoiseinModernICProcesses
AndrewMarshall
2009
AsynchronousSequentialMachineDesignandAnalysis:AComprehensiveDevelopment
oftheDesignandAnalysisofClock-IndependentStateMachinesandSystems
RichardF.Tinder
2009
AnIntroductiontoLogicCircuitTesting
ParagK.Lala
2008
PragmaticPower
WilliamJ.Eccles
2008
MultipleValuedLogic:ConceptsandRepresentations
D.MichaelMillerandMitchellA.Thornton
2007
FiniteStateMachineDatapathDesign,Optimization,andImplementation
JustinDavisandRobertReese
2007
AtmelAVRMicrocontrollerPrimer:ProgrammingandInterfacing
StevenF.BarrettandDanielJ.Pack
2007
PragmaticLogic
WilliamJ.Eccles
2007
PSpiceforFiltersandTransmissionLines
PaulTobin
2007
vii
PSpiceforDigitalSignalProcessing
PaulTobin
2007
PSpiceforAnalogCommunicationsEngineering
PaulTobin
2007
PSpiceforDigitalCommunicationsEngineering
PaulTobin
2007
PSpiceforCircuitTheoryandElectronicDevices
PaulTobin
2007
PragmaticCircuits:DCandTimeDomain
WilliamJ.Eccles
2006
PragmaticCircuits:FrequencyDomain
WilliamJ.Eccles
2006
PragmaticCircuits:SignalsandFilters
WilliamJ.Eccles
2006
High-SpeedDigitalSystemDesign
JustinDavis
2006
IntroductiontoLogicSynthesisusingVerilogHDL
RobertB.ReeseandMitchellA.Thornton
2006
MicrocontrollersFundamentalsforEngineersandScientists
StevenF.BarrettandDanielJ.Pack
2006
Copyright©2022byMorgan&Claypool
Allrightsreserved.Nopartofthispublicationmaybereproduced,storedinaretrievalsystem,ortransmittedin
anyformorbyanymeans—electronic,mechanical,photocopy,recording,oranyotherexceptforbriefquotations
inprintedreviews,withoutthepriorpermissionofthepublisher.
ProgrammingtheARM®Cortex®-M4-basedSTM32F4MicrocontrollerswithSimulink®
FarzinAsadiandSawaiPongswatd
www.morganclaypool.com
ISBN:9781636392448 paperback
ISBN:9781636392455 ebook
ISBN:9781636392462 hardcover
DOI10.2200/S01128ED1V01Y202109DCS061
APublicationintheMorgan&ClaypoolPublishersseries
SYNTHESISLECTURESONDIGITALCIRCUITSANDSYSTEMS
Lecture#61
SeriesEditor:MitchellA.Thornton,SouthernMethodistUniversity
SeriesISSN
Print1932-3166 Electronic1932-3174
Programming the ARM®
Cortex®-M4-based
STM32F4 Microcontrollers
with Simulink®
Farzin Asadi
MaltepeUniversity,Istanbul,Turkey
Sawai Pongswatd
KingMongkut’sInstituteofTechnology,Ladkrabang,Thailand
SYNTHESISLECTURESONDIGITALCIRCUITSANDSYSTEMS#61
M
&C Morgan&cLaypool publishers