TechOnline India Header
Most Popular
Top 5 Courses
  • Fundamentals of PCB Design
  • Paralleling DC-DC Converters
  • Analog eLab - Improved INA Input Filter
  • Fundamentals of x86 Architecture
  • Analog Devices' SHARC 32-Bit DSP
    Most Popular
    Top 5 Technical Papers
  • ARM Platform Technical Overview
  • Using C++ Efficiently in Embedded Applications
  • Top 10 Drivers for Embedded Android
    Most Popular
    Top 5 Webinars
  • 2009 Embedded Market Study
  • Designing embedded HMIs and connecting them to hardware
    All Articles Products Courses Papers VirtuaLabs Webinars
    Top Search Items
    C


    Techpaper Spotlight

    Wind River
    Accelerating the Development of Embedded Linux Devices with JTAG On-Chip Debugging
    /
        Login | Register | Welcome, Guest

    Topics
    POLL
    How much code have you produced in your career?
    A few KLOC
        38%
    100s of KLOC
        44%
    Millions of LOC
        11%
    A trillion
        7%
     



    Migrating ARM7 code to a Cortex-M3 MCU
    There's a new ARM embedded core in town. Here's a step-by-step guide to porting your code to the Cortex-M3.
    Embedded.com

    The Exception Vector Table
    The exception vector table is where the application code tells the processor core the location of software routines to handle various asynchronous events. For ARM cores, these events include Reset (triggered by a power-up or hard reset), faults and aborts due to bus errors or undefined instructions, and interrupts triggered by either software requests or external sources such as on-chip peripherals.

    For an ARM7TDMI, the exception vector table typically consists of at least six1 branch2 instructions in hand-coded assembly:

    
    b	Reset_Handler
    b	UndefInstr_Handler
    b	SWI_Handler
    b	PrefetchAbort_Handler
    b	DataAbort_Handler
    b	. ; Reserved vector
    b	IRQ_Handler
    b	FIQ_Handler

    The exception vector table on the Cortex-M3 can be defined in C as an array of pointers (see Listing 1). The first entry is the address of the stack and the remaining entries are pointers to various exception handler functions.

    View the full-size image

    Processor modes
    The ARM7TDMI has seven processor modes, six of which have their own stack pointer. One of the seven modes, User, operates at a lower privilege level than the others. The Cortex-M3, on the other hand, has only two modes: Thread and Handler. Thread mode can operate at either an elevated privilege level or a user level and can use either the main stack or the process stack. Handler mode always operates at privilege level with the main stack.

    Elevated privilege levels allow access to the processor status registers (CPSR and SPSR on the ARM7TDMI; APSR on the Cortex-M3) and possibly restricted memory regions as dictated by an optional memory protection unit (MPU). Table 3 shows equivalent levels between the ARM7TDMI and the Cortex-M3.

    View the full-size image

    < PREV 1 | 2 | 3 | 4 | 5 | 6 NEXT >
     
     
    Latest Webinars
    · The Next Generation of Ethernet: How the New IEEE Standards Enable Energy Efficiency and Quality-of-Service
    · Simplified Physical Layer Receiver Test of Re-timed Architectures Such as USB 3.0, SATA, SAS, PCIe 2
    · How to solve the most common high-speed bus issues in embedded design on a budget
    · Early access to ARM Core Technology with Fast Models from ARM
    · Latest MIPI Standards: PHY and Protocol Testing Guidance
     
    Member Company Spotlight
    IDT
     

    Check out IDT's new paper The Role of Jitter in Timing Signals. This paper provides a basic tutorial on timing signal jitter for designers building electronics systems. It defines this phenomenon and describes how it is measured in different applications.


    Member Companies