EE2024
EE2024
EE2024
AssocProfThamChenKhong,ECE,NUS Email:eletck@nus.edu.sg
TeachingTeam
Lecturer:AssocProfC.K.Tham Tutors:
MsTrangDo Mr RajeshC.Panicker
~8 8GraduateAssistants
EE2024Lecture1:IntroductiontoMicroprocessors&ARM
CKTham,ECENUS
Introductionto Microprocessors&ARM
EE2024 Lecture1
AssocProfThamChenKhong,ECE,NUS Email:eletck@nus.edu.sg
Whatyouwilllearninthiscourse
DevelopanARMembeddedsystemusingassembly languageandC BasicUMLdesignmethodology:usecasediagram andstatecharts Interfacewithdevicessuchassensorsandactuators usingindustrystandardprotocolssuchasGPIO,I2C, SPIandUART
EE2024Lecture1:IntroductiontoMicroprocessors&ARM
CKTham,ECENUS
LearningOutcomes
Tobeabletoapplyknowledgeofmicroprocessorconceptstoprogramamicroprocessoror microcontrollerusingassemblylanguagetoperformanengineeringtask. gmodestoefficiently yaccessdatainCPUregisters g and Tobeabletousedifferentaddressing memory. TobeabletoconfigureCPUinterruptswithdifferentprioritiestoreflecttheimportanceof differentevents. TobeabletouseUMLusecasediagramstocapturethedesiredinteractionsbetweensystem componentsinaspecifiedapplication. TobeabletouseUMLstatechart diagramstoexpressthedesiredsystembehavioursofa specifiedapplication. TobeabletoapplyknowledgeofcomputerinterfacingprotocolssuchasI2C, I2C SPI/SSPand UART,tointerfaceamicroprocessortootherdevicessuchassensorsandactuators. Tobeabletoprogramtheinterfacebetweenamicroprocessorandotherdevicessuchas sensorsand dactuators t t using i Clanguage. l Tobeabletodevelopanembeddedsystemapplicationanddemonstratethatitmeetsdesign specificationsandeffectivelyperformsspecifiedfunctions.
EE2024Lecture1:IntroductiontoMicroprocessors&ARM
CKTham,ECENUS
LecturePlan
Lecture1:IntroductiontoMicroprocessors&ARM Lecture2:MicroprocessorConcepts Lecture3:ARMCortexM3Overview Lecture L 4 4:ARMI Instruction i Set S &Assembly A bl Language L Lecture5:EmbeddedSystemDevelopmentthroughC Programming Lecture6a:InterruptSystem Part1 Lecture6b:EmbeddedSystemDesign Lecture L t 7 7:Pin Pi Connect C tBlock Bl kand dGPIO Lecture8:InterIntegratedCircuit(I2C)Protocol p Interface(SPI) ( )Protocol Lecture9:SerialPeripheral Lecture10:UniversalAsynchronousReceiver/Transmitter (UART)Protocol Lecture11:InterruptSystem Part2 Lecture12:Revision
EE2024Lecture1:IntroductiontoMicroprocessors&ARM
CKTham,ECENUS
Projects&Lab/ProjectSessions
2Projects
Project1:PIDControlusingARMAssemblyLanguageandC Programming(Weeks46) Project2(dividedinto2Aand2B):EnergyEfficientLighting ControlandEventDetection(Weeks713) (UMLdesignmethodologywillbecovered)
Session1:FamiliarizationwithDevelopmentEnvironment(Week4) S i 2 Session 2:Assembly A bl Language L and dCProgramming P i (Week (W k5) Session3:Project1Assessment(Week6) Session4:SystemDesignandBaseboardFamiliarization(Week7) Session5 5:InterfacingtoSensorsandOutputDevicesusingGPIO, GPIO I2Cand SPI(Week8) Session6:SystemDesignandProject2AAssessment(Week9) Session7:InterruptHandlingandEventDetection(Week10) Session8:InterfacingtoExternalSystemusingUART(Week11) Session9:Project2BAssessment(Week13)
Lab/ProjectSessions
EE2024Lecture1:IntroductiontoMicroprocessors&ARM
CKTham,ECENUS
Books
Duetothestateoftheartnatureofthismodule, module thereisnosingle recommendedtextbook. ReferenceBooks:
JosephYiu,TheDefinitiveGuidetotheARMCortexM3,Newnes,2010. (ebookavailablefromNUSlibrary) CarlHamacher, Hamacher Zvonko Vranesic, Vranesic Safwat Zaky, Zaky Naraig Manjikian: ComputerOrganizationandEmbeddedSystems,6thEdition,McGrawHill, 2012.ISBN9780071089005. Note:ThisbookaddressesARM7TDMI(ARMv4T)andotherprocessors. processors ThismodulefocusesonARMv7M instead.Therearesomedifferences. NXPUM10360LPC17xxUserManual ARM ARMv7 v7MArchitectureReferenceManual(ARM) LPCXpresso:GettingstartedwithNXPLPCXpresso LPCXpresso BaseBoardRevBUsersGuide
Othersupportingdocuments(especiallyforproject):
EE2024Lecture1:IntroductiontoMicroprocessors&ARM
CKTham,ECENUS
Lecture1:Introductionto Microprocessors&ARM
Objectives:
understandevolutionofcomputing p gandposition p of ARMCortexM3/NXPLPC1769inthelandscape,andkey featuresofARMCortexM3/NXPLPC1769
Outline:
ShorthistoryofComputingandARM ARMCortexM3Processor NXPLPC1769systemonchip Overviewofthismodule,lectureplan,books
EE2024Lecture1:IntroductiontoMicroprocessors&ARM
CKTham,ECENUS
EE2024Lecture1:IntroductiontoMicroprocessors&ARM
CKTham,ECENUS
EE2024Lecture1:IntroductiontoMicroprocessors&ARM
CKTham,ECENUS
ARMSoCinpopulardevices
AppleA4systemonchip
CPU:ARMCortexA8 Instructionset:ARMv7 IniPad,iPhone 4
NVIDIATegra 2systemonchip
CPU:DualcoreARMCortexA9 Instructionset:ARMv7 InLGOptimus 2x
EE2024Lecture1:IntroductiontoMicroprocessors&ARM
CKTham,ECENUS
DifferentARMfamilies
Main Strengths of ARM: High-performance Power-efficient Easy to integrate ARM core with peripherals to form system-on-chip Low cost
EE2024Lecture1:IntroductiontoMicroprocessors&ARM
CKTham,ECENUS
EE2024Lecture1:IntroductiontoMicroprocessors&ARM
CKTham,ECENUS
ARMCortexM3 NXPLPC1769
Operatesat120MHz 100pinpackaging
RefertoUM10360ordata sheetforpinout details Manyofthesepinshave4 functions desiredfunctionis programmable(pinconnect block orPINSEL) block,
EE2024Lecture1:IntroductiontoMicroprocessors&ARM
CKTham,ECENUS
ARMCortexM3 NXPLPC1769
CortexM3processor Incorporatesa3stagepipelineandusesaHarvardarchitecturewithseparatelocal instructionanddatabusesaswellasathirdbusforperipherals 512KBofflashmemory 64KBonchipSRAMincludes:
these th SRAMblocks bl k maybe b used dfor f Ethernet, Eth t USB, USB and dDMAmemory,aswell llasfor f general lpurpose instructionanddatastorage.
BuiltinNestedVectoredInterruptController(NVIC) FastGeneralPurposeInputOutput(GPIO)ports EthernetMAC Host Device, Device orOTG(OnTheGo) aUSBinterfacethatcanbeconfiguredaseitherHost, 8channelgeneralpurposeDMAcontroller 2SSPcontrollers,SPIinterface,4UARTs,2CANchannels 3I2Cinterfaces,2inputplus2outputI2S(InterICSound)interface 8channel12bitADC,10bitDAC,motorcontrolPWM 4generalpurposetimers,6outputgeneralpurposePWM,ultralowpowerrealtime clock(RTC)withseparatebatterysupply
EE2024Lecture1:IntroductiontoMicroprocessors&ARM
CKTham,ECENUS
Buses
MultilayerAdvancedHighPerformanceBus(AHB)matrix interconnectprovidesaseparatebusforeachAHB master. master
AHBmastersincludetheCPU,GeneralPurposeDMA controller, ,EthernetMAC, ,andtheUSBinterface. Thisinterconnectprovidescommunicationwithnoarbitration delaysunlesstwomastersattempttoaccessthesameslaveat thesametime. time
EE2024Lecture1:IntroductiontoMicroprocessors&ARM
CKTham,ECENUS
ARMCortexM3InstructionSet
Relationship p between Thumb-2 32-bit and 16-bit Thumb instruction set and what is found in Cortex-M3
EE2024Lecture1:IntroductiontoMicroprocessors&ARM
CKTham,ECENUS
Howtoapproachthismodule?
Understandunderlyingdesignprinciples,concepts andprotocols,bothhardwareandsoftwareaspects UnderstandtheARMassemblercodeandmainC librarieswhichimplementtheconceptsandprotocols Usethesetocreateausefulembeddedsystemand application! Workhardonthe2Projects
Makesureyoucompleteeachsectionbythestatedtime
EndoftermExamination
EE2024Lecture1:IntroductiontoMicroprocessors&ARM
CKTham,ECENUS
THEEND Questions?
EE2024Lecture1:IntroductiontoMicroprocessors&ARM
CKTham,ECENUS