ARM 7

Embed Size (px)

Citation preview

  • 7/25/2019 ARM 7

    1/61

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    2/61

    Embedded Systemswith

    ARM 7 Controller (!C "#$% &

    Embedded Daemons

    ww.vjece.blogspot.in

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    3/61

    Syllab's ntrod'ction to ARM

    Embedded Systems

    Di)erence between 'C * '! Di)erence between RSC * CSC

    nstr'ction +'e'e

    nstr'ction !ipeline

    ARM Architect're ARM Core Data ,low

    ARM processor -amily / 0rs

    E1ceptions * nterr'pt 0andling Application o- ARM !rocessor

    Assembly ang'age 2or3ing with +EM4

    Sample Assembly !rograms

    !C"#$% Microcontroller

    ,eat'res o- !C"#$% 5loc3 diagram o- !C"#$%

    !in diagram o- !C"#$%

    Architect'ral overview

    6nchip 8ash program memory

    6nchip static RAM 9 0rs

    ntrod'ction to Coding Environment

    ':E 2;ARM

    !rogramming Concepts

    !in Connect 5loc3

  • 7/25/2019 ARM 7

    4/61

    Session #

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    5/61

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    6/61

    Embedded Systems

    Combination o- hardware and so-twarethat per-orms a speciBc tas3. Is a system built to perform its duty,

    completely or partially independent ofhuman intervention.

    Is specially designed to perform a fewtasks in the most ecient way.

    Interacts with physical elements in ourenvironment, e.g. controlling and driving amotor, sensing temperature

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    7/61

    Embedded SystemsCharacteristics

    SpeciBc !'rpose

    ery strict memorylimitations

    !rocessorlimitations

    Speed limitations

    Cost imitations Acc'racy * iming

    constraints

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    8/61

    Micro !rocessors s Micro

    Controllers

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    9/61

    'C * '!

    Micro Controllers SpeciBc !'rpose

    C!4 with some

    B1ed RAM R6M *other peripheralsembedded in asingle chip

    Cloc3 speed is low Cost is less

    Micro !rocessors

  • 7/25/2019 ARM 7

    10/61

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    11/61

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    12/61

    E1isting Embedded C!4

    Architect'res

    ARMFs ARM architect're (/"bit&

    ARM9$ (9$=/"bit&

    AtmelFs AR architect're

    MicrochipFs !C architect're

    e1as nstr'mentHsMS!$/I architect're

    ntelFs %IJ# architect're

    KilogFs K%I architect're

    2estern DesignCenterFs 9J%#9 architect're

    0itachiFs S'per0 architect're

    A1isComm'nicationsF ERAL

    CRS architect're !ower

    Architect're (-ormerly !ower!C&

    EnSilicaFs eSi

    RSC architect're Mil3ymist architect're

    nmosF ransp'ter architect'res

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    13/61

    CSC * RSC

    Comple1 nstr'ctionSet Comp'ting More n'mber o-

    nstr'ctions ariable width

    nstr'ctions

    Macro nstr'ctions

    More C!4 Cycles nstr'ction +'e'e

    Concept

    SimpliBed Compiler

    Red'ced nstr'ctionSet Comp'ting ess n'mber o-

    nstr'ctions ,i1ed 2idth

    nstr'ctions

    Micro nstr'ctions

    ess C!4 Cycles

    nstr'ction !ipelineConcept

    SimpliBed nstr'ctions

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    14/61

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    15/61

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    16/61

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    17/61

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    18/61

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    19/61

    nstr'ction +'e'e

    Stores one or more instr'ctions

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    20/61

    nstr'ction +'e'e

    Stores one or more instr'ctions

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    21/61

    nstr'ction !ipeline

    !arallel e1ec'tion o- m'ltiple instr'ctions

    Reads consec'tive instr'ction -rom memory while previo'sinstr'ction are e1ec'ted in vario's stages o- pipeline

    !ipeline Strategy nstr'ction pipelining is similar to the 'se o- an assembly line in a

    man'-act'ring plant. An assembly line ta3es advantage o- the

    -act that a prod'ct goes thro'gh vario's staged o- prod'ction. 5y laying the prod'ction process o't in an assembly line

    prod'cts at vario's stages can be wor3ed on sim'ltaneo'sly. hisprocess is also re-erred to as pipelining beca'se as in a pipelinenew inp'ts are accepted at one end be-ore previo'sly acceptedinp'ts appear as o'tp'ts at the other end.

    o apply this concept to instr'ction e1ec'tion we m'st recogni?ethat in -act an instr'ction has a n'mber o- stages.

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    22/61

    nstr'ction !ipeline

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    23/61

    Session "

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    24/61

    ARM Architect're

    ARM !rocessor Core is a 3eycomponent o- many s'ccess-'l /"bitembedded systems.

    ARM # !rototype in #%J

    6ver # billion ARM !rocessors beingshipped by the end o- "II#

    ARM Core ;ot a single core b'twhole -amily o- design shares similardesign * common instr'ction set.

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    25/61

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    26/61

    ARM Core Data ,low Model

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    27/61

    Registers

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    28/61

    C!SRC'rrent !rogram Stat's Register

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    29/61

    Seven 6perating Modes

    4SER 4nprivileged mode 'nder which most tas3 r'n

    ,+ 0igh !riority interr'pt is raised

    R+ ow priority interr'pt is raised

    S'pervisor Most !rivileged

    Abort nvalid memory access

    4nde- 0andles 4nde- nstr'ctions

    System Most !riviledged

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    30/61

    !rocessor Modes

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    31/61

    E1ceptions * nterr'pts

    E1ception handling SpeciBc details o- how the ARM

    !rocessor handles e1ceptions

    nterr'pts ARM deBnes interr'pt as special type o-

    E1ception

    nterr'pt ReN'ests nterr'pts are at 0eart o- Embedded

    Systems

    nterr'pt handlersEmbedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    32/61

    E1ception handling

    A so-tware ro'tine that e1ec'tes when ane1ception occ'rs

    Data Abort e1ception will have a Data Abort

    0andler 0andler Brst determines the ca'se o-

    e1ception and then services the e1ception

    Servicing ta3es place either within the handler

    or by branching to a speciBc service ro'tine Reset E1ception is a special e1ception

    beca'se it initiali?es the embedded system

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    33/61

    ARM !rocessor E1ceptionModes

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    34/61

    ector able

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    35/61

    E1ception !riority evels

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    36/61

    / level ;ested nterr'pt

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    37/61

    !roced're o- 0andlingnterr'pt

    An R+ or ,+ e1ception ca'ses the processor hardware togo thro'gh a standard proced're (provided the interr'ptsare not mas3ed&>

    #. he processor changes to a speciBc interr'pt reN'est modewhich re8ects the interr'pt

    being raised.". he previo's modeHs cpsr is saved into the spsr o- the newinterr'pt reN'est mode./. he pc is saved in the lr o- the new interr'pt reN'est mode.$. nterr'pt=s are disabledOeither the R+ or both R+ and ,+e1ceptions are disabled

    in the cpsr. his immediately stops another interr'pt reN'est o- thesame type beingraised.J. he processor branches to a speciBc entry in the vector table.

    Embedded Daemonswww.vjece.blogspot.in

    nterr'pt 0andling scheme

  • 7/25/2019 ARM 7

    38/61

    nterr'pt 0andling scheme

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    39/61

    ARM Applications

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    40/61

    ARM 7 applications

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    41/61

    applications

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    42/61

    ARM## applications

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    43/61

    ARM Corte1M applications

    Dell E$/IIatit'de aptop

    instant boot'p-or 'sers andaccess to selectapplications

    with m'ltidaybattery li-etimes

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    44/61

    ARM Corte1A applications

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    45/61

    ARM Corte1R

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    46/61

    Session /

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    47/61

    Assembly ang'age

    nstr'ctions in te1t -orm

    ,low o- Assembly lang'age program .s .o .o't P in'1 Q

    C !rogram ,low .c (!reprocessor& .i (Compiler& .s

    (Assembler & .o (in3er &.o't

    Advantage is we can observe allinstr'ctions in machine level andhelps in 'nderstanding.

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    48/61

    +EM4 nstallation J Mins

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    49/61

    +EM4

    +EM4 is a FAST! processor em'lator 'sing dynamictranslation to achieve good em'lation speed.

    +EM4 has two operating modes> ,'ll system em'lation. n this mode +EM4 em'lates a -'ll

    system (-or e1ample a !C& incl'ding one or several

    processors and vario's peripherals. t can be 'sed tola'nch di)erent 6perating Systems witho't rebooting the!C or to deb'g system code.

    4ser mode em'lation. n this mode +EM4 can la'nchprocesses compiled -or one C!4 on another C!4. t can be

    'sed to la'nch the 2ine 2indows A! em'lator (http>==www.winehN.org& or to ease crosscompilation andcrossdeb'gging.

    +EM4 can r'n witho't an host 3ernel driver and yetgives acceptable per-ormance.

    Embedded Daemonswww.vjece.blogspot.in

    http://www.winehq.org/http://www.winehq.org/
  • 7/25/2019 ARM 7

    50/61

    +EM4 imitations

    C'rrent +EM4 limitations>

    imited 1%99$ s'pport.

    !C syscalls are missing.

    he 1%9 segment limits and accessrights are not tested at everymemory access (yet&. 0ope-'lly very-ew 6Ses seem to rely on that -ornormal 'se.

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    51/61

    Assembly ntrod'ction

    Commonly 4sed nstr'ctions Moving

    M6 M;

    Arithmetic ADD S45 M4

    5ranch 5 5L 5

    ogical A;D 6RR E6R

    Compare CM!

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    52/61

    Sample !rograms

    Demo 'sing +EM4 4sing in'1 erminal

    Some basic in'1 commands

    Editor 2or3ing

    Sample !rograms Addition s'btraction m'ltiplication

    6dd or Even Arithmetic !rogression

    4sing h'mb nstr'ctions

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    53/61

    Session $

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    54/61

    !C "#$% /" = #9 ARM7DMs C!4

    Embedded 0igh Speed ,lash Memory

    iny si?e * low !ower Cons'mption

    +,!9$ pac3age

    #"% bit wide nter-ace= Accelerator enables 0igh Speed 9I M0?

    6peration 5lend o- Serial Comm'nication nter-ace

    4S5 ".I ,'ll Speed Device

    M'ltiple 4ARS

    S! SS!

    C

    /" bit imers

    #I bit ADC DAC

    !2M Channels

    $J ,ast

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    55/61

    Embedded Daemonswww.vjece.blogspot.in

    !C"#$% development board

  • 7/25/2019 ARM 7

    56/61

    !C"#$% development board

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    57/61

    Applications in

  • 7/25/2019 ARM 7

    58/61

    Development boardschematic

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    59/61

    4nderstanding 4ser Man'al o- !C"#$%

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    60/61

    Session J!rogramming in ARM

    Embedded Daemonswww.vjece.blogspot.in

  • 7/25/2019 ARM 7

    61/61

    ':E nstallation * ntrod'ction to!rogramming