element14
Freedom Beginners Guide
The purpose of the “Freedom” Board Platform is to provide a low-cost ($10-15 MSRP) evaluation and development platform for Freescale MCUs and the Tower System should be considered as a development platform offering extended options (external components, connectors, accessories).
The Freedom boards will be simple but useful with quick but effective out-of-box demo options. The goals of the design are to provide:
- easy access to MCU I/O
- battery-ready, low-power operation
- power-measurement access points
- standard-based form factor with expansion board options
- built-in debug interface for flash programming and run-control
Contents
1. Introduction to ARM MCU Cores |
1.1 ARM Processor Architecture overview |
1.2 ARM Cortex Microcontroller Families |
1.3 ARM Cortex-M0+ core module details |
1.4 ARM Cortex-M4 core module details |
2. Kinetis MCUs based on ARM Technology |
2.1 Kinetis series overview |
2.2 Kinetis K-Series MCUs |
2.2.1. Kinetis K Series Portfolio Details |
2.2.2 Freescale Development Tool Part Numbers for K series |
2.3 Kinetis L-Series MCUs |
2.3.1 Kinetis L series portfolio details |
2.3.2 Freescale Development Tool Part Numbers for L series |
2.4 Kinetis E-series MCUs |
2.4.1 Kinetis E series Portfolio Details |
2.4.2 Freescale Development Board Part Numbers for E series |
2.5 Kinetis V-Series MCUs for Motor control |
2.6 Kinetis W-Series for Wireless Connectivity |
2.7 Kinetis M-Series for Smart Metering |
3. Freescale Freedom Development Platform |
3.1 List of available Freedom Development boards |
3.2 List of available Freedom Accessory boards |
3.3 Freescale Freedom Board Features Matrix |
3.3.1 FRDM-KL Series Board |
3.3.2 FRDM-KE Series Board |
3.3.3 FRDM-K Series Board |
4 Introduction to the OpenSDA interface |
4.1 OpenSDA MSD Bootloader |
4.2 OpenSDA Application Overview |
4.2.1 OpenSDA as Mass Storage Application |
4.2.2 OpenSDA P&E Debug Application |
4.2.3 OpenSDA Data Logging Application |
4.2.4 OpenSDA + CMSIS-DAP |
4.3 MSD Flash Programmer |
4.3.1 Enter OpenSDA Bootloader Mode |
4.3.2 Load an OpenSDA Application |
4.3.3 Load executables (Flash Programmer) |
5 Complementary Development Board: Freescale Tower System |
6 Freescale’s Microcontroller Enablement |
6.1 Software Development Tools |
6.1.1 Processor Expert Software |
6.1.2 Freescale CodeWarrior Development Studio |
6.1.3 IAR Embedded Workbench |
6.1.4 Keil IDE Microcontroller Development Kit for ARM (MDK-ARM) |
6.2 mbed Development Tools |
6.2.1 mbed SDK |
6.2.2 mbed HDK |
6.2.3 Benefits of the mbed |
6.3 Hardware Development Tools |
6.3.1 Segger Tools |
6.3.2 P&E Micro Tools |
6.3.3 KEIL Tools |
6.4 Operating Systems |
7 Basic Exercise on Freedom Board |
7.1 Freescale Processor Expert - Make FRDM-KL25Z RGB Blink exercise |
7.2 Exercise on mbed - Blinky, Touch Sensor and Accelerometer exercises |
1. Introduction to ARM MCU Cores
ARM is a family of instruction set architectures for computer processors based on a reduced instruction set computing (RISC) architecture developed by British company ARM Holdings. ARM Holdings develops the instruction set and architecture for ARM-based products, but does not manufacture products. The company periodically releases updates to its cores.
The company is best known for its processors, although it also designs, licenses and sells software development tools under the RealView and KEIL brands, systems and platforms, system-on-a-chip infrastructure and software.
There are many variants of ARM processors, with different capabilities, and implementing different features. But all of them implement a version of the 'ARM architecture' (ARM ISA), that describes the interface and properties (instruction set, behaviour, etc.) that ARM processors must support. It has been refined over time with successive architecture versions.
1.1 ARM Processor Architecture overview
ARM architecture forms the basis for every ARM processor. Over time, the ARM architecture has evolved to include architectural features to meet the growing demand for new functionality, high performance and the needs of new and emerging markets.
The ARM architecture supports implementations across a wide range of performance points, establishing it as the leading architecture in many market segments. The ARM architecture supports a very broad range of performance points leading to very small implementations of ARM processors, and very efficient implementations of advanced designs using state of the art micro-architecture techniques. Implementation size, performance, and low power consumption are key attributes of the ARM architecture.
ARM developed architecture extensions to provide support for Java acceleration (Jazelle), security (TrustZone), SIMD, and Advanced SIMD (NEON) technologies. The ARMv8-architecture adds a Cryptographic extension as an optional feature.
The ARM architecture is similar to Reduced Instruction Set Computer (RISC) architecture, as it incorporates these typical RISC architecture features:
- A uniform register file load/store architecture, where data processing operates only on register contents, not directly on memory contents.
- Simple addressing modes, with all load/store addresses determined from register contents and instruction fields only.
Enhancements to a basic RISC architecture enable ARM processors to achieve a good balance of high performance, small code size, low power consumption and small silicon area.
1.2 ARM Cortex Microcontroller Families
The 32-bit ARM architecture, such as ARMv7, is the most widely used architecture in mobile devices. The architecture has evolved over time, and version seven of the architecture, ARMv7, that defines the architecture for the first of the Cortex series of cores, defines three architecture "profiles". Although the architecture profiles were first defined for ARMv7, ARM subsequently defined the ARMv6-M architecture (used by the Cortex M0/M0+/M1) as a subset of the ARMv7-M profile with fewer instructions.
The latest Cortex family (v7) includes a wider range of processors than earlier families. These processors are suitable for very different kinds of application, and three profiles were therefore introduced to distinguish what targets they are adapted to:
- A-profile applications processors are for full OS. This features powerful processors found in high-end products like Smartphone’s, tablets, or notebooks. This includes the famous Cortex-A8 and Cortex-A9 (in your super phone) processors.
- 'R-profile is Real-time profile processors which can be found for example in control units for automotive systems or hard disk drive controllers. They come with specific features suited to real-time environment constraints. R profile processors have for example a tightly coupled memory, local to the processor that allows for fast-responding code and data. They also all have hardware support for integer division that would otherwise require software emulation.
- The 'M' Micro-controller profile processors are smaller and used in numerous embedded systems like human interface devices, automotive control systems, power management systems, and others.
The ARM Cortex-M is a group of 32-bit RISC ARM processor cores licensed by ARM Holdings. The cores are intended for microcontroller use, and consist of the Cortex-M0, Cortex-M0+, Cortex-M1, Cortex-M3, and Cortex-M4.
The Cortex-M family is optimized for cost and power sensitive MCU and mixed-signal devices for end applications such as smart metering, human interface devices, automotive and industrial control systems, white goods, consumer products and medical instrumentation.
Some of the most important options for the Cortex-M cores are:
- SysTick Timer: A 24-bit system timer that extends the functionality of both the processor and the Nested Vectored Interrupt Controller (NVIC). When present, it also provides an additional configurable priority SysTick interrupt. Though the SysTick timer is optional, it's rare to see a Cortex-M microcontroller without it.
- Bit Banding: Maps a complete word of memory onto a single bit in the bit-band region. For example, writing to an alias word will set or clear the corresponding bit in the bitband region. This allows every individual bit in the bit-banding region to be directly accessible from a word-aligned address, and individual bits to be toggled from C/C++ without performing a read-modify-write sequence of instructions.
- Memory Protection Unit (MPU): Provides support for protecting regions of memory through enforcing privilege and access rules. It supports up to eight different regions, each of which can be split into a further eight equal-size sub-regions.
ARM Cortex-M Instruction Sets
All four Cortex-M cores implement a common instruction subset that consists of: Thumb subset, Thumb-2 subset, and multiply. The Cortex-M0 / M0+ / M1 include all older Thumb instructions, except new instructions (CBZ, CBNZ, IT) which were added in ARMv7-M architecture. The Cortex-M0 / M0+ / M1 include a minor subset of Thumb-2 instructions (BL, DMB, DSB, ISB, MRS, MSR)
ARM | Thumb | Thumb-2 | Hardware | Hardware | Saturated | DSP | Floating point | ARM | Core |
---|---|---|---|---|---|---|---|---|---|
Cortex-M0 | Most | Subset | 1 or 32 cycle | No | No | No | No | ||
Most | Subset | 1 or 32 cycle | No | No | No | No | |||
Most | Subset | 3 or 33 cycle | No | No | No | No | |||
Entire | Entire | 1 cycle | Yes | Yes | No | No | |||
Entire | Entire | 1 cycle | Yes | Yes | Yes | Optional |
1.3 ARM Cortex-M0+ core module details
The ARM Cortex-M0+ processor is the most energy efficient ARM processor available. It builds on the very successful Cortex-M0 processor, retaining full instruction set and tool compatibility, while further reducing energy consumption and increasing performance. Along with the Cortex-M0 processor, the exceptionally small silicon area, low power and minimal code footprint of these processors enable developers to achieve 32-bit performance at an 8-bit price point, bypassing the step to 16-bit devices. The Cortex-M0+ processor comes with a wide selection of options to provide flexible development.
Below are the features of Cortex-M0+ core:
- Supports up to 32 interrupt request sources
- 2-stage pipeline micro architecture for reduced power consumption and improved architectural performance (cycles per instruction)
- Binary compatible instruction set architecture with the Cortex-M0 core
- Thumb instruction set combines high code density with 32-bit performance
- Serial wire debug (SWD) reduces the number of pins required for debugging
- Single cycle 32 bits by 32 bits multiply
Nested Vectored Interrupt Controller (NVIC)
- Up to 32 interrupt sources
- Includes a single non-maskable interrupt
Asynchronous Wake-up Interrupt Controller (AWIC)
- Supports interrupt handling when system clocking is disabled in low-power modes
- Takes over and emulates the NVIC behavior when correctly primed by the NVIC on entry to very deep sleep mode.
- A rudimentary interrupt masking system with no prioritization logic signals for wake-up as soon as a non-masked interrupt is detected
- Contains no programmer’s model visible state and is therefore invisible to end users of the device other than through the benefits of reduced power consumption while sleeping
The Cortex-M0+ is an optimized superset of the Cortex-M0. The Cortex-M0+ has complete instruction set compatibility with the Cortex-M0 thus allowing one to use the same compiler and debug tools. The Cortex-M0+ pipeline was reduced from 3 to 2 stages, which lowers the power usage. In addition to debug features in the existing Cortex-M0, a silicon option can be added to the Cortex-M0+ called the Micro Trace Buffer (MTB) which provides a simple instruction trace buffer. The Cortex-M0+ also received Cortex-M3 and Cortex-M4 features, which can be added as silicon options, such as the memory protection unit (MPU) and the vector table relocation. Key features of the Cortex-M0+ core are:
- ARMv6-M architecture
- Instruction sets (same as Cortex-M0)
- Thumb (most), missing CBZ, CBNZ, IT.
- Thumb-2 (subset), only BL, DMB, DSB, ISB, MRS, MSR.
- 32-bit hardware multiply, 1-cycle or 32-cycles (silicon option)
- 2-stage pipeline (one less than Cortex-M0)
- 11.21 µW/MHz dynamic power requirement
- Silicon options:
- Micro Trace Buffer (MTB) (unique to Cortex-M0+)
- Single-cycle I/O port (unique to Cortex-M0+)
- Vector table relocation (same as Cortex-M3 and Cortex-M4)
- 8 region memory protection unit (MPU) (same as Cortex-M3 and Cortex-M4)
ISA Support | Thumb / Thumb-2 subset |
---|---|
Pipeline | 2 stage |
Performance Efficiency | 2.42 CoreMarks/MHz* |
Performance Efficiency | 0.95 / 1.11 / 1.36 DMIPS/MHz** |
Memory Protection | Optional 8 region MPU with sub regions and background region |
Interrupts | Non-maskable Interrupt (NMI) + 1 to 32 physical interrupts |
Sleep Modes | Integrated WFI and WFE Instructions and Sleep On Exit capability |
Bit Manipulation | Bit banding region can be implemented with Cortex-M System Design Kit |
Enhanced Instructions | Hardware single-cycle (32x32) multiply option |
Debug | Optional JTAG or Serial-Wire Debug Ports Up to 4 Breakpoints and 2 Watchpoints |
Trace | Optional Micro Trace Buffer |
1.4 ARM Cortex-M4 core module details
The ARM Cortex-M4 processor is the latest embedded processor by ARM specifically developed to address digital signal control markets that demand an efficient, easy-to-use blend of control and signal processing capabilities.
The combination of high-efficiency signal processing functionality with the low-power, low cost and ease-of-use benefits of the Cortex-M family of processors is designed to satisfy the emerging category of flexible solutions specifically targeting the motor control, automotive, power management, embedded audio and industrial automation markets.
The Cortex-M4 processor has been designed with a large variety of highly efficient signal processing features applicable to digital signal control markets. The Cortex-M4 processor features extended single-cycle multiply accumulate (MAC) instructions, optimized SIMD arithmetic, saturating arithmetic instructions and an optional single precision Floating Point Unit (FPU).
The processor executes the Thumb-2 instruction set for optimal performance and code size, including hardware division, single cycle multiply, and bit-field manipulation. The Cortex-M4 Nested Vectored Interrupt Controller is highly configurable at design time to deliver up to 240 system interrupts with individual priorities, dynamic reprioritization and integrated system clock.
Conceptually the Cortex-M4 is a Cortex-M3 plus DSP Instructions, and optional floating-point unit (FPU). If a core contains an FPU, it is known as a Cortex-M4F, otherwise it is a Cortex-M4. Key features of the Cortex-M4 core are:
- ARMv7E-M architecture
- Instruction sets
- Thumb (entire)
- Thumb-2 (entire)
- 1-cycle 32-bit hardware multiply, 2-12 cycle 32-bit hardware divide, saturated math support
- DSP extension: Single cycle 16/32-bit MAC, single cycle dual 16-bit MAC, 8/16-bit SIMD arithmetic.
- Floating-point extension (silicon option): Single-precision floating point unit, IEEE-754 compliant. This is called the FPv4-SP extension.
- 3-stage pipeline with branch speculation
- 1 to 240 physical interrupts, plus NMI
- 12 cycle interrupt latency
- Integrated sleep modes
- 8 region memory protection unit (MPU) (silicon option)
- 1.25 DMIPS/MHz
ISA Support | Thumb / Thumb-2 |
---|---|
DSP Extensions | Single cycle 16,32-bit MAC Single cycle dual 16-bit MAC 8,16-bit SIMD arithmetic Hardware Divide (2-12 Cycles) |
Floating Point Unit | Single precision floating point unit IEEE 754 compliant |
Pipeline | 3-stage + branch speculation |
Performance Efficiency | 3.40 CoreMark/MHz* |
Performance Efficiency | Without FPU: 1.25 / 1.52 / 1.91 DMIPS/MHz** |
Memory Protection | Optional 8 region MPU with sub regions and background region |
Interrupts | Non-maskable Interrupt (NMI) + 1 to 240 physical interrupts |
Interrupt Priority Levels | 8 to 256 priority levels |
Wake-up Interrupt Controller | Up to 240 Wake-up Interrupts |
Sleep Modes | Integrated WFI and WFE Instructions and Sleep On Exit capability. |
Bit Manipulation | Integrated Instructions & Bit Banding |
Debug | Optional JTAG & Serial-Wire Debug Ports. Up to 8 Breakpoints and 4 Watchpoints. |
Trace | Optional Instruction Trace (ETM), Data Trace (DWT), and Instrumentation Trace (ITM) |
2. Kinetis MCUs based on ARM Technology
Freescale is the leader in 32-bit embedded control, offering the market’s broadest and best-enabled portfolio of solutions based on ARM technology. ARM-powered portfolio includes scalable MCU and MPU families from small ultra-low power Kinetis MCUs to i.MX and Vybrid applications processors with advanced performance and feature integration and QorIQ communications processors that deliver industry-leading power and performance. Each family has been designed to offer a broad range of performance, peripheral and packaging options, providing migration paths for end-product platform development.
Freescale's Kinetis portfolio of ARM Cortex MCUs consists of multiple hardware- and software-compatible ARM Cortex-M0+ and ARM Cortex-M4 MCU families with exceptional low-power performance, memory scalability and feature integration. Families range from the entry-level ARM Cortex-M0+ Kinetis L Series to the high-performance, feature-rich ARM Cortex-M4 Kinetis K and include a wide selection of analog, communication, HMI, connectivity and security features.
All Kinetis MCUs are supported by a comprehensive Freescale and third-party hardware and software enablement system which reduces development costs and time to market.
2.1 Kinetis Series Overview
Below shows different Kinetis series family of devices with core and application specific details.
2.2 Kinetis K-Series MCUs
Freescale's Kinetis K series MCU portfolio includes more than 600 compatible low-power, high-performance 32-bit MCUs built on the ARM Cortex-M4 core. This series is designed for scalable performance, integration, connectivity, communications, HMI and security and offers additional features for exceptional integration with multiple fast 16-bit analog-to-digital converters (ADCs), digital-to-analog converters (DACs) and a programmable-gain amplifier (PGA), along with powerful, cost-effective signal conversion, conditioning and control. These MCU families are performance efficient, offer industry-leading low power, and provide significant BOM savings through the smart on-chip integration.
Scalability – Over 200 hardware and software compatible ARM Cortex-M4 MCUs with DSP + low-power, connectivity, communications, HMI and security features
Mixed Signal – Exceptional integration with fast 16-bit ADCs, DACs, PGAs and more. Powerful, cost-effective signal conversion, conditioning and control
Flex Memory – Fast, low-power 90nm Thin-Film Storage Flash. Innovative FlexMemory technology delivers fast, flexible, high-endurance on-chip EEPROM
Enablement – Freescale bundled MQX RTOS and CodeWarrior IDE with Processor Expert auto code generator. 3rd party support from IAR, KEIL and other ARM ecosystem providers.
Common Features of KL series MCU are:
System
- ARM Cortex-M4 core with FPU, MAC, SIMD
- Multiple low power modes and peripherals, low-power boot, clock gating
- Powerful DMA and X-bar switch enabling parallel Processing
- 200 μA/MHZ in run modes, fast wake up times, 690 to 2μA in lower power Stop and 10 modes of operation to balance performance and power
- 1.71 to 3.6 V voltage supply with full access to analog and memory across full range
- –40° C to +105° C
Memory
- Up to 1 MB of flash memory
- Single cycle access to flash
- Optional EEPROM
- MPU and flash swap controller to enable robust firmware updates
- CRC module
- DRAM and NAND flash I/F
Rich Mixed Signal
- Up to 4 x configurable 16-bit ADCs supporting on-chip PGAs
- High-speed analog comparator with integrated 6-bit DAC
- 12-bit DAC
- FlexTimers for ICAP, OCOMP and PWM
Connectivity
- 10/100 BaseT Ethernet MAC with stacks supporting IPV6
- USB2.0 OTG module
- Up to 2 x FlexCAN, 2.0B compliant
- Up to 6 UART, support available for smart card plus Manchester Encoding
- Up to 3 SPI with chip selects
- I2S or Serial Audio I/F
- I2C
- SDIO I/F
Security
- Hardware encryption accelerator
- Random number generator
- Anti-tamper circuitry to monitor and help prevent application tampering and to protect your IP
HMI
- Graphics controller supporting SVGA resolution
- Parallel bus for camera I/F
- Capacitive touch sense module
2.2.1. Kinetis K Series Portfolio Details
Kinetis K Series MCUs Family Compatibility: Hardware & software compatible MCU families with scalable performance, memory and feature integration
2.2.2 Freescale Development Tool Part Numbers for K series
Freescale Tower Development Board Part Numbers
Tower Module Part Number | Kinetis Family Support | Buy Here | Extended H/W Support Options |
---|---|---|---|
TWR-K20D50M | 50 MHz MK10 and MK20 |
802.11.x, Serial Connectivity, Analog, Sensors, Graphics LCD, Audio, Tower Dock (iPad, iPhone, iPod), General I/O, 2.4GHz and Sub 1 GHz RF, Modules, Motor Control, Memory Modules etc. | |
TWR-K21D50M | 50 MHz MK11, MK12, MK21 and MK22 | ||
TWR-K20D72M | 72 MHz MK10 and MK20 | ||
TWR-K21F120M | 120 MHz MK21 and MK22 | ||
TWR-K40D100M | 100 MHz MK30 and MK40 | ||
100 MHz MK30 and MK40 | |||
TWR-K53N512 | All MK50, MK51, MK52 & MK53 variants | ||
TWR-K60D100M | 100 MHz MK10, MK20 and MK60 | ||
TWR-K60F120M | 120/150 MHz MK10, MK20 and MK60 | ||
K10, K20 and K60, 100MHz | Buy | ||
IAR Kick Start Kit for Kinetis K60 family | |||
Keil Starter Kit for Kinetis K60 family | |||
K64, 120MHz | |||
TWR-K70F120M | 120/150 MHz MK61 and MK70 |
Freescale Freedom Development Board Part Numbers
Freedom board Part Number | Kinetis Family Support | Buy Here | Extended H/W Support Options |
---|---|---|---|
FRDM-K64F | Kinetis K MCU, K64, 120 MHz |
Arduino shields footprint | |
Kinetis K MCU, K20, 50MHz | |||
FRDM-K22F | Kinetis K MCU, K22, 120 MHz |
2.3 Kinetis L-Series MCUs
Kinetis L series MCUs are the world’s most energy efficient, bringing new design possibilities to entry-level applications that have previously been limited by 8/16-bit MCU capabilities. Kinetis L series MCUs combine the enhanced energy efficiency, performance and debug features of the new 32-bit ARM Cortex-M0+ core, with the scalability, feature integration and enablement of the Kinetis MCU portfolio. Available with multiple flash memory options and a rich selection of analog, connectivity and HMI peripherals, Kinetis L series MCUs are also hardware and software compatible with Kinetis K series MCUs based on the ARM Cortex-M4 core. Both are supported by an industry-leading Freescale enablement package that includes the CodeWarrior IDE with Processor Expert tool, Freescale Freedom development platform and MQX Lite RTOS, as well as the ARM third-party ecosystem.
Ultra-low Power
Architected for power efficiency, the Kinetis L series takes advantage of ARM’s ultra-low-power Cortex-M0+ processor and features peripherals that help you optimize power consumption.
Super Simple
Its 32-bit functionality with 8-bit ease-of-use. Built on the new ARM Cortex-M0+ core (the smallest, lowest-power ARM core), the L series simplifies development with an upward migration path to Kinetis K and X series, software reuse and flexible power optimization. And, with a comprehensive enablement bundle including CodeWarrior IDE, MQX RTOS and the ARM support ecosystem, development is simple.
Leading Scalability and Integration
Expanding on well-known features of the Kinetis platform with leading scalability, best-in-class integration with rich analog features and low-power connectivity, the L series redefines entry-level.
Common Features of KL series MCU are :
System
- ARM Cortex-M0+ core, 48 MHz
- Multiple low power modes and
- peripherals, low-power boot,
- clock gating
- 1.71–3.6 V, –40° C to +105° C
Memory
- 90 nm TFS flash, SRAM
- Internal memory security/protection
Analog Peripherals
- 12/16-bit ADC, 12-bit DAC
- High-speed comparator
Serial Interfaces
- UART (including 1 LPUART)
- SPI, I2C
Timers
- Real-time clock
- 16-bit low-power TPMs (GP timer/PWM)
- Low-power timers
- 32-bit periodic interrupt timer
2.3.1 Kinetis L series portfolio details
Choosing the Right Kinetis ARM Cortex-M MCU’s (K and L series)
2.3.2 Freescale Development Tool Part Numbers for L series
Freescale Freedom Development Board
• Ultra-low-cost development platforms
• Quick and simple with easy access to MCU I/O and including a capacitive touch slider and accelerometer
• Form factor compatible with popular third-party hardware designed to work with Arduino and Arduino-compatible boards
• New, sophisticated OpenSDA Debug interface: Mass storage device flash programming interface, P&E Multilink interface for run-control debugging,
open-source data logging application
• Loaded with software, including Processor Expert: Stand-alone or IDE integrated, MQX Lite RTOS (via Processor Expert) and ecosystem partner support from IAR, Keil, Code Red, Atollic, Rowley, Free GNU command line tools with GDB server
Part Number | Supporting Families | Buy Here |
---|---|---|
FRDM-KL02Z | KL02 | |
FRDM-KL05Z | KL04/05 | |
FRDM-KL25Z | KL14/15/24/25 | |
FRDM-KL26Z | KL16/26 up to 128 KB flash | |
FRDM-KL46Z | KL16/26 at 256 KB flash and KL34/36/46 |
Freescale Tower System Platforms for Kinetis L series MCUs
• Modular, open-source development platform with reusable peripheral modules offering connectivity, analog, graphics LCD and motor control functionality
• Tower plug-in (TWRPI) socket
• OpenSDA debug circuit with virtual serial port
• MMA8451Q accelerometer
• Tower elevator modules (TWR-ELEV) and Tower peripheral modules (TWR-SER, TWR-PROTO, etc.) pictured, are ordered separately for additional system capability
Part Number | Supports Families | Buy Here |
---|---|---|
TWR-KL25Z48M | KL14/15/24/25 | |
TWR-KL46Z48M | KL16/26 at 256 KB flash and KL34/36/46 |
2.4 Kinetis E-series MCUs
The Kinetis E series is the most scalable portfolio of ARM Cortex-M0+ MCUs in the industry. Designed to maintain high robustness for complex electrical noise environments and high-reliability applications, the Kinetis E series families offer a broad range of memory, peripheral and package options. They share common peripherals and pin counts allowing developers to migrate easily within an MCU family or between MCU families to take advantage of more memory or feature integration. This scalability allows developers to standardize on the Kinetis E series for their end product platforms, maximizing hardware and software reuse and reducing time-to-market.
Strong Robustness – EMC/ESD design technology ensure strong noise immunity performance
High Efficiency – Cortex-M0+ core up to 48MHz and 40x more than 8/16-bit MCUs
Low Cost – Optimized for cost-sensitive applications offering low pin count option
General Features of Kinetis E series MCU:
- 32-bit ARM Cortex-M0+ core
- Scalable memory footprints from 8 KB flash / 1 KB SRAM to 128 KB flash / 16 KB SRAM
- Precision mixed-signal capability with on chip analog comparator and 12-bit ADC
- Powerful timers for a broad range of applications including motor control
- Serial communication interfaces such as UART, SPI, I²C, etc.
- High security and safety with internal watchdog and programmable CRC module
- Single power supply (2.7–5.5 V) with full functional flash program/erase/read operations
- Ambient operation temperature range: -40 °C ~ 105 °C
- Robust 5 V MCU (high electrical noise environments) with 8-bit S08 compatibility
- System safety peripherals for high reliability applications
Common Features of the core
Operating characteristics | • 2.7 V to 5.5 V |
Core features | • Next generation 32-bit ARM Cortex M0+ core |
System and power management | • Watchdog |
Clocks | • External crystal oscillator or resonator |
Memory and memory interfaces | • Up to 64 KB flash memory |
Security and integrity | • Watchdog (WDOG) |
2.4.1 Kinetis E-Series Portfolio Details
2.4.2 Freescale Development Board Part Numbers for E-Series
Part Number | Kinetis Family | Buy Here |
---|---|---|
FRDM-KE02Z | KE02, 20 MHz | |
FRDM-KE02Z40M | KE02, 40 MHz | |
FRDM-KE04Z | KE04, 8 KB Flash | |
FRDM-KE06Z | KE06, KE04, 64-128 KB Flash |
2.5 Kinetis V-Series MCUs for Motor control
Kinetis V Series MCUs are based upon the ARM Cortex-M0+ and M4 cores and are designed for BLDC, PMSM and ACIM motor control, as well as digital power conversion applications. The Kinetis KV1x family is the entry point and features a 75 MHz ARM Cortex-M0+ core with a hardware square root and divide block giving it a 27% increase in performance vs. comparable 32-bit MCUs in sensorless PMSM control.
With an ARM Cortex-M4 core, floating point unit and clock frequencies of up to 150 MHz, the Kinetis KV3x and Kinetis KV4x families extend the V series to higher dynamic control systems including those with multiple motors. Kinetis V Series features include dual 16-bit analog-to-digital converters (ADCs) sampling at up to 1.2 mega samples per second (MS/s) in 12-bit mode, multiple motor control timers and 16-512 KB of flash memory. The Kinetis KV4x family includes advanced analog and timing peripherals from Freescale's digital signal controller (DSC) portfolio to address the requirements of digital power conversion applications. All families are supported by a full enablement suite from Freescale and third-party resources, including reference designs, software libraries and motor configuration tools.
Freescale Development Board Part Numbers for V-Series
Part Number | Kinetis Family | Buy Here |
---|---|---|
KV1x, 75 MHz | ||
KV3x, 120 MHz |
2.6 Kinetis W-Series for Wireless Connectivity
The Kinetis W series integrates class-leading sub-1 GHz and 2.4 GHz RF transceivers with ARM Cortex cores, providing robust feature sets for reliable, secure and low-power embedded wireless solutions. The Kinetis W series is optimized for wireless, providing the right mix of performance, integration, connectivity and security. The enablement packages include Freescale's Tower System Development Platforms, MQX RTOS and support from IAR Systems. Whether you need sub-1 GHz or 2.4 GHz wireless, simple point-to-point or full mesh networking, the Kinetis W series has the solution to fit your needs.
- ARM Cortex-M + Wireless Transceiver
- Sub-1 GHz and 2.4 GHz wireless platforms
- Compatible with “K” series peripherals
- Leverage “K” series tools for design and debug
Freescale Development Tool Part Numbers for W-Series
Part Number | Kinetis Family | Buy Here |
---|---|---|
TWR-KW21D256 | KW2x MCUs | |
TWR-KW24D512 | Kinetis KW2x |
2.7 Kinetis M-Series for Smart Metering
Kinetis M series MCUs are based upon the low-power ARM Cortex-M0+ core and are designed for single-chip 1, 2 and 3 -phase electricity meters as well as flow meter and other precision measurement applications.
Kinetis M Series MCUs include a powerful analog front end consisting of multiple 24-bit Sigma Delta ADCs, Programmable Gain Amplifiers, voltage reference with low drift over temperature and a phase shift compensator. A large range of security features including a memory protection unit, external tamper detection pins, iRTC with tamper detect and a random number generator provide protection of supplier/user data within the MCU and from the MCU to the power grid. A low power segment LCD controller support up to 288 segments and 8 backplanes.
- ARM Cortex-M0+ Core
- Multiple high-precision 24-bit ΣΔ ADCs with PGAs
- Hardware Current Transformer phase shift compensation
- Robust Tamper Detection Circuitry & Low Power Segment LCD
- 50MHz, up to 128KB, 100pin
Freescale Development Tool Part Numbers for M-Series
Part Number | Kinetis Family | Buy Here |
---|---|---|
TWR-KM34Z50M | KM3x and KM1x, 50MHz |
3. Freescale Freedom Development Platform
The Freescale Freedom development platform is a small, low-power, cost-effective evaluation and development system perfect for quick application prototyping and demonstration ofKinetis MCU families. The platform offers an easy-to-use mass-storage device mode flash programmer, a virtual serial port and classic programming and run-control capabilities.
- Low–cost (<$20 USD MSRP)
- Designed in an industry-standard compact form factor
- Easy access to the MCU I/O pins
- Integrated open-standard serial and debug interface (OpenSDA)
- Compatible with a rich-set of third-party expansion boards
It's easy to get started. Simply choose your preferred Freescale Freedom development hardware, select compatible software, connect with the community, and go.
3.1 List of available Freedom Development boards
- FRDM-KL02Z for Kinetis KL02 MCUs
- FRDM-KL05Z for Kinetis KL05Z and KL04Z MCUs
- FRDM-KL25Z for Kinetis KL1x and KL2x MCUs
- FRDM-KL26Z for Kinetis KL16 and KL26 MCUs
- FRDM-KL46Z for Kinetis KL3x and KL4x MCUs
- FRDM-KE02Z for Kinetis E Series MCUs
- FRDM-KE02Z40M for Kinetis KE02 MCUs
- FRDM-KE04Z for Kinetis KE04 MCUs
- FRDM-KE06Z for Kinetis KE06 MCUs
3.2 List of available Freedom Accessory boards
The Freedom development platform is form factor compatible with the Arduino R3 shields.
Some shield drivers have already been ported for certain FRDM boards and will be easily modifiable between each FRDM board. In the other side, it should not be a huge effort to migrate the existing shield drivers (available for the ATMega Arduino MCU boards) to the FRDM boards.
Below are the shields with a FRDM driver available:
- FREESCALE FRDM-FXS-MULTI for Multiple Xtrinsic Sensors
- FREESCALE FRDM-FXS-MULTI-B for Xtrinsic Sensors (Bluetooth)
- FREESCALE FRDM-FXS-9AXIS for 9-Axis Xtrinsic Sensor Solution
- ELEMENT14 XTRISINC SENSOR EVK for Accelerometer, Magnetometer and Altimeter
- ARDUINO Proto
- ARDUINO Motor Control
- ARDUINO Wifi
- ITEAD 2.8 TFT LCD Touch
- AVNET Wi-Go for multiple sensor, wifi and battery charger
- FREESCALE TFC-KIT for the Freescale Cup with Car chassis, Motor Control and optical Sensor
- ADAFRUIT Datalogger
3.3 Freescale Freedom Board Features Matrix
3.3.1 FRDM-KL Series Board
| FRDM-KL02Z | FRDM-KL05Z | FRDM-KL25Z | FRDM-KL26Z | FRDM-KL46Z |
---|---|---|---|---|---|
MCU Part No | MKL02Z32VFM4 | MKL05Z32VFM4 | 4MKL25Z128VLK4 | KMKL26Z128VLH4 H4 | MKL46Z256VLL4 |
Typ. Operating Voltage | 3.3V | 3.3V | 3.3V | 3.3V | 3.3V |
Accelerometer 3-axis, Digital output | FreescaleMMA8451Q | FreescaleMMA8451Q | FreescaleMMA8451Q | FreescaleFXOS8700CQ | Freescale MMA8451Q |
Core | Cortex-M0+ | Cortex-M0+ | Cortex-M0+ | Cortex-M0+ | Cortex-M0+ |
MHz | 48 | 48 | 48 | 48 | 48 |
Magnetometer3D, Digital output | _ | _ | _ | Freescale FXOS8700CQ | Freescale MAG3110 |
Arduino R3 compatibility for expansion possibilities | Y | Y | Y | Y | Y |
Capacitive touch slider | 2 electrodes controlled by SOFTW | 2 electrodes controlled by TSI | 2 electrodes controlled by TSI | 2 electrodes controlled by TSI | 2 electrodes controlled by TSI |
Easy access to MCU I/O | Y | Y | Y | Y | Y |
IrDA | _ | _ | _ | _ | _ |
mbed Enabled | _ | Yes | Yes | _ | Yes |
Flash/RAM/ FlexMem | 32KB Flash, 4KB RAM | 32KB Flash, 4KB RAM | 128KB Flash, 16KB RAM | 128KB Flash, 16KB RAM | 256KB Flash, 32KB RAM |
Segment LCD | _ | _ | _ | _ | 4x8 segments LCD module |
Sophisticated OpenSDA debug interface | Mini USB connector | Mini USB connector | Mini USB connector | Mini USB connector | Mini USB connector |
Temperature Sensor | _ | _ | _ | _ | _ |
USB OTG FS Interface | _ | _ | Mini USB connector | Mini USB connector | Mini USB connector |
User LED(s) | Tri-color RGB | Tri-color RGB | Tri-color RGB | Tri-color RGB | 1- Red, 1- Green |
Ambient Light Sensor |
|
|
| EverlightALS-PT19-315C/L177/TR8 |
|
3.3.2 FRDM-KE Series Board
| FRDM-KE02Z | FRDM-KE02Z40M | FRDM-KE04Z | FRDM-KE06Z |
---|---|---|---|---|
MCU Part No | MKE02Z64VQH2 | MKE02Z64VQH4 | MKE04Z8VFK4 | MKE06Z128VLK4 |
Typ. Operating Voltage | 5V | 5V | 5V | 5V |
Accelerometer3-axis, Digital output | Freescale MMA8451Q | Freescale MMA8451Q | Freescale MMA8451Q | Freescale MMA8451Q |
Core | Cortex-M0+ | Cortex-M0+ | Cortex-M0+ | Cortex-M0+ |
MHz | 20 | 40 | 48 | 48 |
Magnetometer3D, Digital output | _ | _ | _ | _ |
BLDC Motor control interface | Motor control headers | Motor control headers | Motor control headers | Motor control headers |
Arduino R3 compatibility for expansion possibilities | Y | Y | Y | Y |
Capacitive touch slider | 2 electrodes controlled by TSI | 2 electrodes controlled by TSI | 2 electrodes controlled by TSI | 2 electrodes controlled by TSI |
Easy access to MCU I/O | Y | Y | Y | Y |
IrDA | Transmitter & Receiver EVERLIGHT PT12-21C/TR8 (RX)IR12-21C/TR8 (TX) | Transmitter & Receiver EVERLIGHT PT12-21C/TR8 (RX)IR12-21C/TR8 (TX) | Transmitter & Receiver EVERLIGHT PT12-21C/TR8 (RX)IR12-21C/TR8 (TX) | Transmitter & Receiver EVERLIGHT PT12-21C/TR8 (RX)IR12-21C/TR8 (TX) |
mbed Enabled | _ | _ | _ | _ |
Flash/RAM/ FlexMem | 64KB Flash, 4KB RAM, 256B EEPROM | 64 KB flash, | 8 KB flash | 48MHz, 128KB Flash, 16KB SRAM |
Segment LCD | _ | _ | _ | _ |
Sophisticated OpenSDA debug interface | Mini USB connector | Mini USB connector | Mini USB connector | Mini USB connector |
Temperature Sensor | 10K Thermistor | 10K Thermistor | _ | 10K Thermistor |
USB OTG FS Interface | _ | _ | _ | _ |
User LED(s) | Tri-color RGB | Tri-color RGB | Tri-color RGB | Tri-color RGB |
Ambient Light Sensor | _ | _ | _ | _ |
3.3.3 FRDM-K Series Board
FRDM-K20D50M | FRDM-K64F | |
---|---|---|
MCU Part No | MK20DX128VLH5 | MK64FN1M0VLL12 |
Typ. Operating Voltage | 3.3V | 3.3V |
Accelerometer3-axis, Digital output | FreescaleMMA8451Q | FXOS8700CQ |
Core | Cortex-M4 | Cortex-M4 |
MHz | 50 | 120 |
Magnetometer3D, Digital output | _ | FXOS8700CQ |
Arduino R3 compatibility for expansion possibilities | Y | Y |
Capacitive touch slider | 2 electrodes controlled by TSI | _ |
Easy access to MCU I/O | Y | Y |
mbed Enabled | _ | OpenSDAv2 / mbed |
Flash/RAM/ FlexMem | 128KB Flash, 16KB RAM, 32KB FlexNVM | 1 MB flash memory, 256 KB RAM |
Segment LCD | _ | _ |
Sophisticated OpenSDA debug interface | Mini USB connector-OpenSDA | Mini USB connector |
OpenSDAv2 debug | ||
Temperature Sensor | ROHM | ROHM |
BD1020HFV-TR | BD1020HFV-TR | |
USB OTG FS Interface | Mini USB connector | Mini USB connector |
User LED(s) | Tri-color RGB | Tri-color RGB |
Ambient Light Sensor | Everlight ALS-PT19-315C/L177/TR8 | HDR 1X2 ALS-PT19-315C/L177/TR8 |
RF module | _ | Add-on nRF24L01+ Nordic |
4 Introduction to the OpenSDA interface
OpenSDA is an open-standard serial and debug adapter. It bridges serial and debug communications between a USB host and an embedded target processor as shown . The hardware circuit is based on a Freescale Kinetis K20 family microcontroller (MCU) with 128 KB of embedded flash and an integrated USB controller. OpenSDA features a mass storage device (MSD) bootloader, which provides a quick and easy mechanism for loading different OpenSDA Applications such as flash programmers, run-control debug interfaces, serial-to-USB converters, and more.
OpenSDA is managed by a Kinetis K20 MCU built on the ARM Cortex-M4 core. The Kinetis K20 includes an integrated USB controller that can operate at clock rates up to 50MHz. The OpenSDA circuit includes, at a minimum, a status LED and a pushbutton. The pushbutton asserts the Reset signal to the target processor, which could be a microcontroller, digital signal controller, or a microprocessor. It can also be used to place the OpenSDA circuit into Bootloader mode. SPI and GPIO signals provide an interface to either a JTAG or an SWD debug port on a target processor. Additionally, signal connections are available to implement a UART serial channel. The OpenSDA circuit receives power when plugged into a USB Host. In some designs, the OpenSDA circuit can also control the power supply of the target processor.
New standard for embedded debug circuit supporting SWD and JTAG, it is Open hardware platform with proprietary and open-source software built on K20DX128 50MHz CM4. It provides serial channel and debug interface to the target MCU. Mass-storage bootloader used to load new applications into the OpenSDA
4.1 OpenSDA MSD Bootloader
Mass storage bootloader is Flash resident bootloader which is detected as Mass-storage USB device for which no custom host drivers required. We need to simple copy/paste or drag/drop interface for programming an Application binary file into the flash of the OpenSDA MCU.
Bootloader runs if there is no Application installed or if forced by user (Reset button pressed during power on) or host-side software (method depending on Application implementation)
The OpenSDA MSD Bootloader provides a simple interface for loading an OpenSDA Application into the OpenSDA processor’s non-volatile memory. Only one OpenSDA Application may be resident at a time, and this application will be automatically run at startup unless Bootloader mode is selected.
Two versions available:
- Open-source, non-proprietary version:
- Posted to online-repository (e.g. Google Code or github)
- Closed-source, proprietary version:
- Based on open-source code base
- Only used on Freescale hardware
- Will accept encrypted, proprietary binary
- Allows for protection of proprietary software that can only run on official Freescale hardware
4.2 OpenSDA Application Overview
OpenSDA feature can be used in many ways which includes Mass Storage Programmer, P&E Multilink, Open Debug Standard, Cloud Computing Interface, Data Logging, and as customer’s application.
4.2.1 OpenSDA as Mass Storage Application
MSD application is a closed source proprietary application that can be loaded using the controls the serial and debug interfaces to the target MCU. Mass-storage USB device providing a simple target MCU flash programmer and a virtual serial port (composite device)
The MSD Bootloader appears in the host file system as a removable drive with a volume label of “BOOTLOADER”, An OpenSDA Application is loaded by simply dragging and dropping an OpenSDA Application file onto the BOOTLOADER drive, which implements a pseudo-FAT16 file system. OpenSDA Applications can be in S-record, raw binary file, or an encrypted .SDA file formats. Status information is provided through a text file named LASTSTAT.TXT.
4.2.2 OpenSDA P&E Debug Application
The P&E Debug Application is an OpenSDA Application that provides debugging and a virtual serial port all in one application. It provides a run-control debug interface that controls the JTAG or SWD debug interface to the target processor. It also provides a USB communications device class (CDC) interface that bridges serial communications between the USB Host and a UART serial interface on the target processor. Several integrated development environments support the P&E Debug Application including CodeWarrior for Microcontrollers (v10.3 and later), IAR Embedded Workbench (v6.40.3 and later), Keil MDK (v4.54 w/ P&E patch), as well as software from P&E Microcomputer Systems.
The P&E Debug Application is designed to debug the resident target processor in the OpenSDA system with limited support for off-board devices within the same processor family as the resident target processor. P&E’s Multilink and Tracelink hardware interfaces provide higher performance and additional debug features:
4.2.3 OpenSDA Data Logging Application
This application provides a simple, open-source OpenSDA application that fosters user community development and innovation by providing driver for virtual serial port communications to the target MCU with feature of basic debug control (SWD/JTAG) of the target MCU. Simple serial commands providing the ability to control and monitor the target processor.
4.2.4 OpenSDA + CMSIS-DAP
- Freescale is collaborating with ARM on the definition of a new debug interface standard called CMSIS-DAP.
- CMSIS-DAP will be one of the applications that runs on OpenSDA (Kinetis L and Vybrid boards are the first targets)
- CMSIS-DAP will be a free application based on an open standard
- mbed will utilize CMSIS-DAP to add debug capabilities (new to mbed)
4.3 MSD Flash Programmer
The MSD Flash Programmer offers a very easy and convenient way to program applications into the flash of the target processor. Like the MSD Bootloader, the MSD Flash Programming Application emulates a FAT16 file system and enumerates as a mass-storage device. It appears as a removable drive in the host operating system with a volume label that matches the board name (for example, FRDM-KL25Z). Raw binary and Motorola S-Record files that are copied to the drive are programmed directly into the target memory device. This is most often the flash of the target microcontroller, but it could also be another memory device, such as a serial flash, depending on the specific implementation.
The MSD Flash Programmer is designed to program a specific target configuration. It does not support verification or configuration and is not recommended as a production programmer.
The MSD Flash Programmer also provides a USB communications device class (CDC) interface that bridges serial communications between the USB Host and a UART serial interface on the target processor.
Any freedom board comes with the MSD Flash Programmer OpenSDA Application preinstalled. Follow these instructions to run the OpenSDA Bootloader and update or change the installed OpenSDA Application
4.3.1 Enter OpenSDA Bootloader Mode
- Unplug the USB cable if attached.
- Press and hold the Reset button (SW1).
- Plug in a USB cable (not included) between a USB host and the OpenSDA USB connector (labeled “SDA”).
- Release the Reset button
A removable drive should now be visible in the host file system with a volume label of BOOTLOADER. You are now in OpenSDA Bootloader mode.
4.3.2 Load an OpenSDA Application
- While in OpenSDA Bootloader mode, double-click SDA_INFO.HTML in the BOOTLOADER drive. A web browser will open the OpenSDA homepage containing the name and version of the installed Application. This information can also be read as text directly from SDA_INFO.HTML.
- Locate the OpenSDA Applications folder in the corresponding FRDM-KXXX Quick Start Package.
- Copy & paste or drag & drop the MSD Flash Programmer Application (for example MSD-FRDM KL46Z48M_Pemicro_v109 .SDA for the FRDM-KL46Z board) to the BOOTLOADER drive.
- Unplug the USB cable and plug it in again. The new OpenSDA Application should now be running and a FRDM-KL46Z drive should be visible in the host file system.
You are now running the latest version of the MSD Flash Programmer. Use this same procedure to load other OpenSDA Applications.
4.3.3 Load executables (Flash Programmer)
- Load the appropriate version of the MSD Flash Programmer application into the OpenSDA board
- Copy an S-record (commonly a file with .s19 or .srec extension) or a raw/flat binary file (commonly a file with a .bin extension) to the MSD removable drive with a volume label of the target hardware (for example, FRDM-KL46Z).
- If programming is successful, the embedded application executes automatically. Regardless, the contents of the LASTSTAT.TXT file are updated with the latest status information.
The OpenSDA LED indicator is used by the MSD Bootloader and the standard OpenSDA Applications to provide mode and status information.
In Bootloader mode running normally with no error condition LED will Blinking: 500ms on, 500ms off
In application mode running normally with no USB activity LED are ON
In application mode with USB activity LED are blinking
5 Complementary Development Board: Freescale Tower System
A modular development platform for 8/16/32-bit MCUs & MPUs
- Quickly combine Tower Modules to build a prototype of your application
- Modules sold individually or in kits
- Open Source: Build your own Tower Module to integrate your IP
- Cost-optimized hardware
- Software support from Freescale and Third Parties
- Growing community of Third Party hardware support
- On-line community: www.towergeeks.org
Build Your System in 3 steps or less
- Choose a Processor (MCU/MPU) Module
- Choose Peripheral Modules and Tower Plug-Ins (TWRPIs)
- Up to 3 peripheral modules
- One additional side-mounting peripheral modules
- Multiple TWRPIs
- Connect each module to the Elevator Boards
6 Freescale’s Microcontroller Enablement
ARM processors power hardware development platforms with a wide range of design complexity levels. From simple microcontroller boards to very advanced multi-core solutions, most ARM-based development boards are manufactured by a variety of ARM partners and sold through distributors. Freescale enablement consists of software, Hardware, Middleware and supporting tools to enable user to develop their product. Below are the tools supported for Kinetis family MCU.
6.1 Software Development Tools
Freescale CodeWarrior, Freescale Freemaster, Atollic, Hitex, IAR Systems, Keil (ARM), Rowley Associates, Code Re, ARM GCC Embedded
These are primary IDEs to promote with Kinetis family MCU:
1. FREESCALE CodeWarrior v10.6:
Available now
Free Version: 30 Days free trial Evaluation Edition, 128KB Special Edition
2. FREESCALE Kinetis Design Studio v2.0 (KDS)
Available in October 2014
100% Free toolchain
3. IAR EWARM :
Available now
Free Version : 30 Days free trial, 16KB KickStart
4. KEIL MDK :
Available now
Free Version : 30 Days free trial, 32KB MDK-Lite
5. EMPROG CrossWorks for ARM
Available now
Free Version : 30 Days free trial
6. ATOLLIC TrueStudio
Free Version: 30 Days free trial, 8KB Lite Version
7. Rowley Crossworks
Free version available
8. mbed
Available now for FRDM-KL05Z, FRDM-KL25Z, FRDM-KL46Z, FRDM-K64F
Free online toolchain without debug capabilities
9. Coocox
Free Toolchain: coocox.org/freescale
10. GCC ARM Embedded
Free command line compiler: launchpad.net
6.1.1 Processor Expert Software
Microcontroller Driver Suite v10.4 is a software management system that generates C code to create, configure, optimize, migrate and deliver software components, such as peripheral drivers, for Kinetis and ColdFire+ processors. The driver suite is delivered and installed as a comprehensive product with the Eclipse 4.2 (Juno) IDE. It is also available as an Eclipse plug-in for existing Eclipse 3.7 (Indigo) and Eclipse 4.2 (Juno) installations. The driver suite does not include a compiler or linker. You merge the generated code into a build system. This functionality is integrated into the CodeWarrior tools. The driver suite provides the same kind of support for our ecosystem tools partners. This extends Processor Expert software functionality to non-CodeWarrior IDE users for the supported platforms.
Features of Processor Expert:
- Extensive and comprehensive knowledgebase of all supported silicon encapsulating all pins, registers, etc.
- Silicon resource conflicts flagged at design time, allowing early correction
- Simple creation of optimized peripheral drivers without reading silicon documentation
- Easy integration of an RTOS with peripheral drivers using RTOS adaptor component
- Enables straightforward migration to new hardware
New Hardware Configuration Perspective
- Silicon configuration, and so much more
- A software system to
- Create…
- Configure…
- Optimize…
- Migrate…
- Deliver…
- Reusable components
- Drivers and libraries
- For Freescale silicon
- Kinetis, S08, S12, ColdFire, DSC …
- Integrated in CodeWarrior MCU support is also available stand-alone as the Microcontroller Driver Suite
Design new Software in just 7 Steps!!
6.1.2 Freescale CodeWarrior Development Studio
Freescale’s CodeWarrior for Microcontrollers v10.6 integrates the development tools for the ColdFire, ColdFire+, DSC, Kinetis, Qorivva, RS08, S08 and S12Z architectures into a single product based on the Eclipse open development platform. The modular installer provided with the tools, however, allows you to select and install only the Freescale architecture support you need for your application development.
Features of CodeWarrior:
- Eclipse IDE 4.2.1 (Juno) and CDT 8.1.1
- Unlimited assembler
- C/C++ compiler and debugger (restrictions based on suite)
- Integrated flash programmer
- Full-chip simulation for DSC, RS08 and S08 derivatives
- Processor Expert software and components
- Processor Expert component development environment(restrictions based on suite)
- Kernel-aware debug (Professional Suite only)
New features:
- 64-bit 'long long' and 64-bit floating point support for S12Z devices
- Intrinsic support for Square Root and Hardware Divide commands for the Kinetis V Series
- Optional New Component Inspector available with Processor Expert
- P&E Cyclone Universal [FX] support
6.1.3 IAR Embedded Workbench
The IAR Embedded Workbench is an integrated development environment with a C/C++ compiler for building and debugging ARM processor-based embedded applications.
- Reliable, Powerful and Easy to Use
- The most widely used C/C++ tool chain for ARM MCUs
- Support for Kinetis K-series (10/20/30/40/50/60/70), Kinetis L-series, i.MX, ColdFire+ and ColdFire
- Advanced trace debug functionality
- Power debugging - optimize for power consumption with power profiling
- Timeline shows graphical representations of power consumption, call stack,
variable values and interrupt activity over time
- Function profiling and code coverage
- ETM and SWO trace support
- Freescale MQX RTOS integration
- Ready-made project templates
- Project examples for the Freescale Tower system
- Professional technical support organization
6.1.4 Keil IDE Microcontroller Development Kit for ARM (MDK-ARM)
The ARM Keil Microcontroller Development Kit (MDK-ARM) is the recommended software solution for students working with most of the Cortex-M, ARM7, or ARM9 processor-based MCU devices. It features the industry-standard compiler from ARM, the Keil μVision IDE, and sophisticated debug and data trace capabilities. A free evaluation of the MDKARM is available from the Keil website which features everything from the full commercial version with a 32 KByte object code/data limit. For educational purposes and simple experimentation with ARM processors (even without the need for hardware), the MDKARM evaluation is ideal.
- Tailored to ARM Cortex-M devices
- Complete support of Kinetis family of devices
- Optimized Compiler, IDE, Debugger, Debug/Trace Adapters and Middleware
- Support advanced Cortex-M and CoreSight technologies
- Enable developers to:
- Start projects faster
- Device Database provides tool setup, header files,
start-up code, flash algorithm, etc.
- Device Database provides tool setup, header files,
- Start projects faster
- Use Middleware Libraries for Kinetis K60 & K70
- Ethernet, USB Host & Device, Flash File system and GUI
- Write efficient DSP code
- ARM Compiler optimized for Cortex-M4 SIMD instruction set
- Verify and optimize software
- ULINKpro with Streaming Trace provides
Code Coverage and Performance Analyzer
- ULINKpro with Streaming Trace provides
- Leading supplier of MCU development tools
- ANSI C/C++ compilers, Debuggers and Simulation
- Middleware components
- Extensive Device Database
Directory of over 700 supported ARM MCUs
- Established support
- MDK-STANDARD-FREESCALE (1year license with no code limits): $745 Supports any Cortex-M-based Kinetis Family device
- MDK-LITE (32K Code Limited): FREE
- MDK-STANDARD (T) (1 Year Licence): $1.958
- MDK-BASIC (B) (256KB limit): $2.695
- MDK-STANDARD: $4.895
- MDK-PROFESSIONAL: $9.995
(30-day evaluations and floating Options available for most license types)
6.2 mbed Development Tools
The mbed platform provides free software libraries, hardware designs and online tools for professional rapid prototyping of products based on ARM microcontrollers. The platform includes a standards-based C/C++ SDK, a microcontroller HDK and supported development boards, an online compiler and online developer collaboration tools.
6.2.1 mbed SDK
The mbed Software Development Kit (SDK) is a C/C++ microcontroller software platform relied upon by tens of thousands of developers to build projects fast. We've worried about creating and testing startup code, C runtime, libraries and peripheral APIs, so you can worry about coding the smarts of your next product.
The SDK is licensed under the permissive Apache 2.0 licence, so you can use it in both commercial and personal projects with confidence.
The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community.
The mbed SDK gives you an API-driven approach to microcontroller coding. You can code using meaningful abstract objects and API calls, so you don't need to learn the microcontroller hardware details to get going. There is even a "Hello World!" example for every peripheral, just to get you started before you know it.
6.2.2 mbed HDK
The mbed Hardware Development Kit (HDK) provides full microcontroller sub-system design files and firmware for building development boards and custom products that benefit from the native support of the mbed SDK and free mbed Online Compiler and mbed Developer Platform.
The HDK specifies all support components and circuits including the mbed Onboard Interface design that provides simple USB drag-n-drop programming and CMSIS-DAP debug interface for the target microcontroller.
Development boards that are already based on the HDK are the quickest way to get started with the mbed platform. We manufacture official mbed Microcontroller modules that are specifically optimised for flexible rapid prototyping, and are available from distributors worldwide. Our partners are now also creating mbed-enabled hardware such as ultra low-cost ARM evaluation boards in the popular Arduino form-factor.
6.2.3 Benefits of the mbed
There are various benefits to building a custom design onto of the mbed HDK. The ready made schematics are a great short cut, so you can get started on all the things that make your design, without worrying if you've correctly implemented all the "necessary bits" of the design. The mbed HDK incorporates the CMSIS-DAP interface. This provides USB drag and drop programming, CMSIS-DAP debugging and USB serial communication. The mbed SDK supports each of the exact configurations of HDK designs, and libraries that have been written to the APIs in the mbed SDK are highly reusable. Lastly, the mbed community has developed a wealth of libraries, applications and code examples using the SDK/HDK, and this active community offers a lot of opportunities for support and even hiring in required skills.
6.3 Hardware Development Tools
Freescale Tower System, Freescale Freedom Platform, Hitex, IAR Systems, Keil (ARM), P&E Micro Systems, SEGGER
6.3.1 Segger Tools
J-link
- Support IDEs such as IAR, Keil, Code Soucery, CodeWarrior and more
- Supports JTAG, SWD, SWV Interface
- Supported CPUs: Any ARM7,9,11, Cortex-M0, M1, M3, M4, R4
- Flash breakpoints allow the user to set an unlimited number of software breakpoints when debugging in flash memory.
- Performance Comparison: (Download into RAM):
- Embedded Trace Buffer (ETB) support
Addition Software
- J-Link GDB Server – a remote server for the GDB.
- J-Flash (PC software ) - program your Flash EEPROM devices via the On-Chip Debug connector (JTAG) on your target system.
High Performance Flash Programmer
- Segger Flasher
Product | Cost | Peak download into RAM (KByte/sec) | Added Features |
---|---|---|---|
Segger J-Link Ultra | $648 | 1440 | JTAG speed up to 25MHz Hi-Speed USB On Board FPGA |
Segger J-Link | $299 | 720 | JTAG speed up to 12MHZ |
Segger J-Link Lite | In KIT | 280 | |
Abatron BDI2000 | 340 | ||
ARM RealView Multi-ICE |
6.3.2 P&E Micro Tools
Multilink Universal
- Support IDEs such as CodeWarrior and P&E Software
- Supported CPUs: Any Freescale ColdFire, Power, 8bit, kinetis, DSC
- 1.6 – 5.5 V
- Supports JTAG, SWD Interface
Product | Cost | JTAG speed of | Added Features |
---|---|---|---|
Open Source JTAG | Free | 250 KHz | Built-in to Tower |
Universal Multilink | $119 | 1 MHz | Support Many architectures |
Universal Multilink FX | $399 | 10 MHz | Data Monitor, High Speed |
Tracelink (Q2-2012) | $999 | 30 MHz | External Trace, Very High Speed |
Stand alone programmer & debug
- Cyclone Universal Q2/Q3 2011
- Cyclone Universal FX Q2/Q3 2011
6.3.3 KEIL Tools
ULINK Debug and Trace Units
ULINK2: Debug + Serial Wire Trace
- Flash Programming + Run-Control
- Memory + Breakpoint (access while running)
- Serial Wire Trace Capturing up to 1Mbit/sec (UART mode)
ULINKpro: adds ETM + Streaming Trace
- Cortex-M processors running up to 200MHz
- 50MHz JTAG clock speed
- Serial Wire Trace Capturing up to 100Mbit/sec
(Manchester Mode) - ETM Trace Capturing up to 800Mbit/sec
- Virtually unlimited Trace Buffer
- Streaming Trace allows complete Code Coverage and Performance Analysis
- Full supporting of the Micro Trace Buffer in Kinetis L Cortex-M0+ based devices
6.4 Operating Systems
Freescale MQX, Embedded Access, FreeRTOS, Keil (ARM), Micrium, SEGGER
Freescale MQX Software Solutions Summary
- RTOS (Full priority-based, pre-emptive scheduler)
- Real-time TCP/IP Communication Suite (RTCS)
- TCP/IP, FTP, Telnet, DHCP, SNMP etc..
- USB Host - HID, MASS, HUB
- USB Device - HID, MASS, CDC
- MS-DOS File System (MFS )
- BSP I/O Driver: CAN, UART etc…
- HTTP Web server
Benefits
- Full production source code with silicon
- Business-friendly licensing model that lets developers keep their source modifications
- Small, configurable footprint
- Integrated stacks (TCP/IP, USB, etc.)
- Customers focus on their application, not drivers, porting work, or integration work
7 Basic Exercise on Freedom Board
This section brings you a hands-on exercise working on Freedom board using Processor expert and mbed software development tools.
User must download the Quick Start Package for the Out Of the Box Experience and the Sample Code Package to go further with his evaluations
7.1 Freescale Processor Expert - Make FRDM-KL25Z RGB Blink Exercise
1. Enter FRDM-KL25Z with P&E OpenSDA Debug mode (refer to OpenSDA section)
2. Import the Components: LED: Universal LED driver
Wait: Universal waiting functions
3. Create a new Project:
File > New > Bareboard Project
- Select MKL25Z128 device
- Select OpenSDA debug connection
- Select Processor Expert Option
4. Add and Set up the components
- Add the LED component to the project 3 times: red, blue and green color.
- Change the settings in the Component Inspector for the three LED’s:
- change Component name: LEDR, LEDG and LEDB for the three colors
- specify a Field Name: same name I used in the LDD
- According to the FRDM-KL25Z Schematics, LEDs are connected to following pins: Red: PTB18, Green: PTB19, Blue: PTD1
- Repeat those steps for LEDG and LEDB.
- Add the Wait Component to the project to busy wait between the LED toggling
5. Generate Code
6. Add the Main Code
Application main() is inside ProcessorExpert.c, where add my LED demo code:
for(;;) { WAIT1_Waitms(100); LEDR_Neg(); WAIT1_Waitms(200); LEDG_Neg(); WAIT1_Waitms(400); LEDB_Neg(); }
7. Build the Project and Download and Debug
7.2 Exercise on mbed - Blinky, Touch Sensor and Accelerometer exercises
1. Create/Log-In with your mbed account
Connect your microcontroller to a PC, After a few seconds of activity, the PC will recognise the mbed Microcontroller as a standard USB drive
Click the MBED.HTM link to get logged in. Go to the new USB Drive, and click MBED.HTM to open it in a web browser.
If you do not have an mbed account, choose "Signup", and create your mbed Account. Otherwise, log in with your normal username and password. This will give you access to the website, tools, libraries and documentation.
2. Downloading a program
Start the FRDM-KL25Z with the OpenSDA mbed application and check drag'n dropping the HelloWorld_KL25Z.bin precompiled project example available at http://mbed.org/handbook/mbed-FRDM-KL25Z-Downloading and press the reset button (blue LED should flash).
3 Create a project with the mbed compiler
- Open the mbed Compiler (top-right of the page)
- Create a New Program (Right-click on My Programs, and select New Program)
View the default program source code (main.cpp by default HelloWorld_KL25Z source code)
Click on the "main.cpp" file in your new program to open it in the file editor window. This is the main source code file in your program, and by default contains a simple program already.
- Compile and Download the Program
To compile the program, click the Compile button in the toolbar. This will compile all the program source code files within the program folder to create a binary program.
- After a successful compile, you will get a "Success!" message in the compiler output and the download dialog will pop up. Save it to the location of the mbed Microcontroller drive, and then hit reset on the microcontroller to start it running!
- If there are errors, they will show up in the "Compiler Output" window, and will need to be fixed!
4. Choose a project example featuring the RGB LED, the accelerometer or the touch sensor
mbed FRDM-KL25Z - Hello World!
Touch Sensor - Hello World!
Accelerometer - Hello World!
References:
3. http://infocenter.arm.com/help/index.jsp
4. http://mbed.org/teams/Freescale/
5. http://www.pemicro.com/opensda/