TechOnline India Header
Most Popular
Top 5 Courses
  • Fundamentals of PCB Design
  • Analog Devices' SHARC 32-Bit DSP
  • Fundamentals of Audio Networking
  • Analog eLab - Improved INA Input Filter
  • Fundamentals of x86 Architecture
    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
  • Designing embedded HMIs and connecting them to hardware
  • 2009 Embedded Market Study
    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

    Disabling interrupts
    Occasionally, an application may need to temporarily disable all processor interrupts. On the ARM7TDMI, the vendor-supplied interrupt controller may provide a global disable register or the application may set the current processor status register "I" bit (and perhaps the "F" bit) with the assembly code in Listing 6.

    View the full-size image

    On the Cortex-M3, a special PRIMASK register disables all interrupts except the NMI and fault exceptions:

    	disable_irq:	
    mov
    r0, #1	
    msr
    PRIMASK, r0	enable_irq:	
    mov
    r0, #0	
    msr
    PRIMASK, r0

    But there is still more to do, if you want to get this job done by last Wednesday. To read about porting issue related to software interrupts, fault handling, the SWP command, instruction time, assembly language and optimizations, go on line and read Part 2: "An ARM programmer's work is not yet done."

    Endnotes:
    1. The FIQ handler can simply begin at offset 0x1c instead of a branch.

    2. PC-relative LDR instructions can be used instead of branches for long jumps.

    After receiving a BSEE from the University of Texas in 1992, Todd Hixon has spent most of his career developing hardware and software for various microcontroller-based products, eventually specializing in network device drivers for a major DSL modem manufacturer. He now works for Atmel where he provides specialized software solutions for Atmel's AT91 family of ARM microcontrollers.

    < PREV 1 | 2 | 3 | 4 | 5 | 6
     
     
    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
    Texas Instruments
      Featuring the industry's lowest power floating-point and fixed-point DSPs, TI's new low power processors deliver greater power efficiency for unparalleled battery life. The new multi-architecture roadmap introduces three generations of processors. Learn more about TI's TMS320C640x, C674x, C550x and OMAP-L1x processors.


    Member Companies