Introduction Purpose • This course highlights the compatibility between the S08, 8-bit S08 QE, 32-bit 32- bit V1 QE, and Coldfire V2 and reviews the strengths and applications of the 8bit and 32-bit processors.

Objectives • Understand the benefits of software, peripheral, and pin compatibility. • Explain the compatibility between the S08, 8-bit S08 QE, 32-bit 32-bit V1 QE, and Coldfire V2 microcontrollers • Understand the progression up and down the family. Content • 38 pages • 4 questions Learning Time • 60 minutes

Welcome to the “QE128 Unprecedented Compatibility” course, one of an exciting series of courses offered by Freescale. This courses describes how Freescale has achieved unprecedented compatibility with its processor designs.

This course highlights the compatibility between the S08, 8-bit S08 QE, 32-bit V1 QE, and Coldfire V2 microcontrollers and reviews the strengths and applications of the 8bit and 32-bit processors.

1 Microcontroller Family

V2

32-bit V1 QE

8 bit QE

S08

This course will highlight the compatibility between the S08, 8 bit QE, 32 bit QE and Coldfire V2 devices and the progression up and down the device family. The course will then conclude with a review of the strengths and applications for both the 8bit and 32-bit processors.

2 Compatibility

We hate getting stuck! • Right solution? • Enough features? • Adequate performance?

►Freescale designers developed the revolutionary QE128 incorporating a few key fundamentals • Unprecedented compatibility between 8-bit and 32-bit • Ultra-low power • Ease of use

►By offering pin, peripheral and tool compatibility, the QE microcontrollers make migration between 8- and 32-bit as easy as swapping a chip

3

Everybody hates to get stuck. When you're designing a processor, you don't want to ask yourself: Did I pick the right solution? Do I have enough features? Do I have enough performance? Do I have enough horsepower to get the job done?

This is why we've introduced the Flexis series of the QE128 microcontroller duo. The Flexis series offer unprecedented compatibility between an 8bit and 32-bit microcontrollers. We've improved ultra-low power performance of the microcontrollers, which makes these microcontrollers extremely easy to use and easy to migrate between the two. Part of that migration is offering pin, peripheral, and tool compatibility at an unprecedented level between 8 and 32 bit microcontrollers.

3 Pin Compatibility

Pin compatibility— it’s more then just a pretty picture

►Flexis QE128 processors are pin-for-pin compatible

►QE128 EVB and Demo boards support both 8-bit and 32-bit QE128 family controllers so it makes changing them as easy as swapping a chip

►What’s in it for you? • One board design can support a series of products • Spend your development time writing new features not rewriting code for a new controller

4

The Flexis QE microcontrollers are pin-for-pin compatible. The Demo boards and EVB boards support both 8-bit and 32-bit QE128 family controllers, which makes it easy for these microcontrollers to use the same hardware. Swapping between the two chips is just a matter of pulling one part out and replacing it with the other.

One of the benefits is that one board design supports a series of products. This means you can have a single board with single pin out. You can swap processors to reduce power consumption, reduce system cost, or improve performance and add features to your application. Also, with this level of compatibility, you spend your time developing new features instead of rewriting code for a new controller. This increases the amount of time you have available for improving the performance.

4 Tool Compatibility

We didn’t stop at pin compatibility

We’ve converged what is traditionally different

• Same Debug interface—one software tool and one BDM cable for both microcontrollers

• Boards—One design provides multiple product possibilities

• CodeWarrior for Microcontrollers 6.0

ƒ Your C-code is recompiled with 4 clicks, 8-bit to 32-bit and back again

• Initialization Tools

ƒ Both the 8-bit and 32-bit QE processors are supported with Processor Expert’s graphical initialization tools

5

If you look at the traditional tool solutions from any software or any microcontroller vendor, you’ll notice that their 8bit and 32- bit development tools are usually completely different. This can result in a major learning curve when migrating between two cores. However, the Flexis QE microcontrollers are tool compatible and they use the same debug interface; there's one software tool and one hardware tool that supports both microcontrollers. So, there's no need to have extra hardware on your board to support two different microcontroller cores.

With the CodeWarrior for Microcontrollers version 6.0, we have integrated all the features needed for both the 8bit and 32-bit microcontrollers. We have also created a migration tool that makes it extremely easy -- just four clicks -- to migrate your code between 8bit and 32 bit cores. Also, within this CodeWarrior tool are initialization tools that make it easy to initialize and set up all the peripherals onboard each chip.

5 Peripheral Compatibility

How is all of this possible?

►Freescale designers found novel ways to integrate the 8-bit peripheral set with our new ColdFire V1 core • We use the same modules from the analog comparator to the timers ►Evaluate both Flexis controllers to 2xSCI 2x see which meets your needs KBI 2xSPI 2xI2C ACMP

COP • Switch at a moments notice ColdFire® V1 Core 24 ch. Selection S08 Peripherals 12-bit 3 16-bit • Extra processing speed ADC timers S08 • Low power 8KB 128 KB SRAM • Flexis has your needs covered

Power ICE + Mgmt 70 ICS+ULP BDM Control OSC (PMC) GPI/O

6

The Flexis QE microcontrollers also have peripheral compatibility. This is accomplished by integrating the 8bit peripheral set with the new ColdFire V1 core. So we are using the exact same peripheral modules from the analog comparator all the way up to the timer modules. So there isn’t a 32-bit version and an 8bit version. They are both the 8bit version of the peripherals. Thus, all code written to initialize, run, change, and so on is exactly the same.

This allows the customer to evaluate both controllers to see which one meets their needs. Once you make a decision, if you decide that your requirements change, it's very easy to switch at the last minute. If you decide you need extra processing speed, you can easily migrate to the 32-bit. If you decide that you need to reduce the power consumption, you can go to the 8bit microcontroller. Basically, whatever the requirements of your system, the Flexis will have you covered.

6 Benefits of Compatibility Software Compatibility • Eliminate the need to rewrite code • One development tool supports two compilers • Switch between the two architectures using the same tool!

Peripheral Compatibility • Peripheral specific code transfers seamlessly from one microcontroller to the other • Reduces overall learning curve involved when migrating to a higher performing or a lower power architecture

Pin Compatibility • Enables a designer to design 1 platform for a series of scalable products • Have immediate access to higher performance, lower power, or lower cost with the flip of a chip • Development time drastically reduced and simplified

So, what are the benefits of this high-level compatibility? Software compatibility, peripheral compatibility, and pin compatibility.

Software compatibility means that you don’t have to rewrite code. You get a single development tool that supports two compilers, two completely different [MCU] cores and it makes the migration between these two cores extremely easy – it takes only four clicks to migrate between 8bit and 32-bit microcontrollers.

Peripheral compatibility makes transitioning code almost negligible because the interfaces for the modules are identical from part to part.

Pin compatibility means you have the same pin out in the same packages. This allows you to design one set of hardware that you can easily swap between 8bit and 32-bit so you immediately have access to higher performance or lower power.

7 Question

Which of these compatibility features are offered by the Flexis microcontrollers? Select all that apply and then click Done.

A. Pin compatibility

B. Assembly code compatibility

C. Tool compatibility

D. Peripheral compatibility

Done

Take a moment now to answer this question about compatibility.

Correct. The Flexis microcontrollers are pin, tool, and peripheral compatible. Pin compatibility makes transitioning code simple because the interfaces for the modules are identical from part to part. Tool compatibility means there's no need to have extra hardware to support two microcontroller cores. Peripheral compatibility means that the same peripheral modules are used from the analog comparator up to the timer modules.

The Flexis microcontrollers are not assembly code compatible because they have different CPUs.

8 Microcontroller Family

V2

32-bit V1 QE

8 bit QE

S08

Now we're going to take a look at what needs to be done to move from the traditional S08 microcontroller to the 8-bit QE family.

9 V2 Platform 32-bit V1 QE 8 bit QE

S08 HCS08 Core S08 Core • Most existing S08MCUs run at 10MHz CPU or 20MHz max bus speed • The 8-bit QE microcontroller runs at a BDC BKP maximum of 25MHz bus speed • Same S08 ISA HCS08 System Control • Added instructions for managing Resets and Interrupts extended memory map Modes of Operation ƒ CALL Power Management ƒ RTC COP LVD

INT IRQ

The first thing to note when moving from the S08 8bit to the 8-bit S08 QE is that the 8-bit S08 QE 128 family uses the S08 core. One difference between the two is that S08s typically run at either 10 or 20 MHz maximum bus speed, but the QE microcontrollers have a higher maximum speed of 25 MHz. The 8-bit S08 QE microcontrollers use the same S08 instruction set architecture as other S08 microcontrollers. However, we've added two new instructions – call and return from call - to help managing the extended memory maps for the 128k of flash memory.

10 V2 Peripherals 32-bit V1 QE 8 bit QE

S08

Peripherals 2xSCI 2x • The 8-bit S08 QE 128 uses KBI 2xSPI 2xI2C ACMP the same peripherals as the S08 series COP

S08 or V1 24 ch. Core S08 Peripherals 3 16-bit core 12-bit Enhancements ADC timers

• New Set/Clear/Toggle Flash Memory 8KB registers for 2 I/O Ports 128 KB SRAM

Power ICE + Mgmt 70 ICS+ULP BDM Control OSC (PMC) GPI/O

The 8-bit S08 QE 128 uses the standard S08 peripherals, however there are new set/clear toggle registers for manipulating two 8bit I/O ports on the microcontroller. Other than this change, all the features that you find on the QE 128 can be found on other S08 microcontrollers.

11 V2 Memory 32-bit V1 QE 8 bit QE

S08 FLASH • S08QE128 has a flash size of 128KB, the highest in the Freescale 8-bit portfolio • Paged memory via a MMU ƒ New MMU supports up to a 2MB memory map ƒ Utilizes a 16KB paging window • New linear address pointer for direct access to data/tables without using pages RAM • RAM size of 8K is the largest in the Freescale 8-bit portfolio

The QE 128 is the first S08 member to go beyond a 64k memory map. As the name implies, the QE128 has 128k of FLASH memory, the most ever on an S08 microcontroller. In order to exceed the 64k limit of a 16bit program counter, we've implemented new paged memory via a memory management unit, or MMU. The MMU supports up to a 2 megabyte memory map and utilizes a 16 kilobyte paging window.

In addition, we've also added a linear address pointer that allows direct access to any location within flash without having to go through the paging window. This is useful for grabbing data and tables throughout the entire memory array without having to change the paging register. In addition to the flash, the QE 128 also has the largest RAM that has been put onto an S08 microcontroller so far.

12 V2 Hardware 32-bit V1 QE 8 bit QE

S08

Supply Voltage • Like some current S08 microcontrollers, the QE family operates from 1.8V to 3.6V • QE family benefits from a faster wake up from stop modes than current S08s New Ultra low power features (discussed in detail later) • Clock gating • Low power run and wait modes (LPRun, LPWait) • New ultra low power 32kHz osc • New voltage regulator with fast start-up • Ultra low power or real time counter

S08 microcontrollers operate at one of two voltage ranges, either 2.7 to 5.5 volts, or 1.8 to 3.6 volts. The QE family is a low- voltage, low-power microcontroller, therefore it operates in the 1.8 volt to 3.6 volt range. One advantage that we have introduced on the QE family is a faster wakeup time from stop modes than the current S08s.

One of the features that has been introduced into the S08 family is clock gating, which helps to improve the low power performance. We've also introduced two new low-power modes - low-power run and low-power wait - and a new, ultra low- power 32kHz external crystal oscillator. We've also introduced a new voltage regulator that allows us to implement the faster startup time, and we have a new low-power or real time counter.

13 V2 Tools 32-bit V1 QE 8 bit QE

S08

CodeWarrior • CodeWarrior for Microcontrollers v6.0 supports all of the S08 architecture products including the 8-bit S08 QE Processor Expert Initialization • Graphical tools support all S08s including the S08 QE Family Debug Module • One additional comparator for a total of three • Loop mode bus trace makes code tracing more effective • Trace into and out of Reset.

The CodeWarrior for Microcontrollers version 6.0 supports the entire range of S08 products. It also supports the entire 8bit microcontroller family, from the HC08 and RS08 up through the S08 products, including the QE family.

The Processor Expert Initialization is a graphical tool for initializing different peripherals. It supports the entire S08 family.

We've made an enhancement to the debug module that adds an additional comparator for a total of three hardware breakpoints in the debug module, plus a fourth breakpoint in the BDM module. With this additional comparator, it has allowed us to introduce a loop mode to the bus trace feature making code tracing more efficient. And, we've also added the ability to trace into and out of reset.

14 Question

Which of these statements about migrating from the traditional S08 microcontroller to the S08 8-bit S08 QE family are true? Select all that apply and then click Done.

A. The 8 bit QE 128 microcontrollers operate at 2.7 to 5.5 volts or 1.8 to 3.6 volts

B. S08s typically run at either 10 or 20 MHz maximum bus speed; 8 bit QE 128 microcontrollers have maximum speed of 25 MHz.

C. 8-bit S08 QE 128 family uses the S08 core

D. The 8 bit QE 128 microcontrollers have new set/clear toggle registers for manipulating two 8bit I/O ports on the microcontroller.

Done

Answer this question about migrating from the traditional S08 microcontroller to the S08 8-bit S08 QE family.

Correct. A. The QE family is a low-voltage, low-power microcontroller, therefore it operates in the 1.8 volt to 3.6 volt range. B.) Existing S08s typically run at either 10 or 20 MHz maximum bus speed, but the QE 128 microcontrollers have a higher maximum speed of 25 MHz. c.) The 8-bit S08 QE 128 family uses the S08 core. D.) The 8-bit S08 QE 128 uses the standard S08 peripherals, however it the 8 bit QE 128 microcontrollers have new set/clear toggle registers for manipulating two 8bit I/O ports on the microcontroller. Click the forward arrow to continue on to the next page.]

15 Microcontroller Family

V2

32-bit V1 QE

8 bit QE

S08

Now we will examine what’s required to move from the 8-bit S08 QE to the 32-bit QE family.

16 V2 Platform 32-bit V1 QE 8 bit QE

S08

Buses • Data Bus increases to 32-bit • Address Bus increases to 24-bit Instruction Set • Uses Revision C of the ColdFire ISA • Two separate compilers: S08 and ColdFire V1 ƒ CodeWarrior automatically selects based on target processor Interrupts and Reset • Supports up to 256 interrupt/reset exceptions • Supports nesting interrupts • Expanded reset features including illegal address reset, and multiple reset vectors Input/Output • Added Rapid GPIO feature

sThe data bus on the 32-bit version increases to 32-bits wide versus the 8-bit S08 QE and the address bus increases from 16 bits to 24-bit.

The ColdFire V1 32-bit instruction set uses Revision C of the ColdFire instruction set. Within the CodeWarrior development tool, there are two separate compilers: one for the S08, one for the ColdFire V1. The CodeWarrior tool automatically selects which compiler to use based on the target processor that's been selected.

While the S08 is limited to a maximum of 32 interrupts, the 32-bit V1 has support for up to 256 interrupt/reset exceptions. And, unlike the S08, it also supports nesting interrupts. The 32-bit V1 also has expanded reset features to allow specific vectoring for illegal address resets and multiple vector resets. The S08 does not support this.

Finally, the 32-bit V1 has added a rapid GPIO feature to allow for quicker manipulation of two 8-bit data ports.

17 V2 Peripherals 32-bit V1 QE 8 bit QE

S08

32-bit QE microcontrollers: 2x 2 2xSCI ► Reuse the same S08 peripherals KBI 2xSPI 2xI C ACMP • Rapid GPIO on two I/O ports COP ColdFire® V1 ► Share the 8-bit S08 QE Core 24 ch. Selection S08 Peripherals 12-bit 3 16-bit microcontrollers’ power saving ADC timers S08 modes Flash Memory 8KB • All modes entered the same 128 KB SRAM

way, except wait mode Power ICE + Mgmt 70 ICS+ULP BDM Control GPI/O OSC • On the 32-bit QE (PMC) microcontrollers, set SOPT1[WAITE] bit then execute STOP instruction

The 32-bit V1 QE microcontrollers use the exact same peripherals as the S08 QE microcontrollers with the addition of the rapid GPIO on two of the 8-bit I/O ports. The 32-bit QE microcontroller shares all of the 8-bit S08 QE microcontroller's power saving modes. All of the modes are entered exactly the same way except for the wait mode. To enter wait mode on the 32- bit QE microcontrollers the user must set the wait-enable bit in the SOPT1 register and then execute a stop instruction.

18 V2 Memory 32-bit V1 QE 8 bit QE

S08

Flash • 32-bit is addressed directly (not paged) • FLASH arrays are arranged differently ƒ 32-bit has 32K x16-bits arranged in parallel • On the 32-bit, use the RAM to reprogram FLASH • 32-bit protects the FLASH in 2K increments • Default is unsecured RAM • RAM runs at CPU frequency • Default is unsecured

Because of the larger address bus, the 32-bit V1 is able to address the entire memory map directly, so paging and a memory management unit are not required.

The flash arrays are arranged differently. On the 32-bit V1 microcontroller there are two 32K by 16 bits arrays arranged in parallel. On the S08, there are two 64K by 8 bit arrays arranged in series. So, if you want to reprogram flash within the application for a 32-bit microcontroller you have to copy a very small program into RAM in order to reprogram the flash. On the S08, you can program the flash in one array while executing the flash routines from the second array.

There's a slight difference in the flash protection. The 32-bit V1 protects the flash in 2K increments where the S08 uses 1K increments. Also, the default for a blank array is unsecured, while it is secured for the S08.

The RAM on the 32-bit QE runs at the CPU frequency compared to the bus frequency on the S08. Like the FLASH, the RAM defaults to unsecured on a blank microcontroller.

19 V2 Hardware 32-bit V1 QE 8 bit QE

S08

►Pin to pin compatible ►Same Supply Voltage ► Ultra low power features – Same on both QE microcontrollers • Clock gating • Low power run and wait modes (LPRun, LPWait) • New ultra low power 32kHz osc • New voltage regulator with fast start-up • Ultra low power auto-wake up

Because the 8bit and 32-bit QE families are pin-for-pin compatible they operate in the same voltage supply range and they share the same ultra low-power features. So, the hardware for the 8bit and 32-bit QE microcontrollers requires no changes to migrate between them.

20 V2 Tools 32-bit V1 QE 8 bit QE

S08

CodeWarrior • CodeWarrior for Microcontrollers version 6 is standard • Different Libraries • Different support files • Different compiler • CodeWarrior for Microcontrollers make switching between the Libraries, support files, and the compiler as easy as 4 clicks. Initialization • Processor Expert support for both • microcontroller Initialization support in CW for both Debugger • S08 compatible BDM interface allows reuse of S08 BDM cables on the 32-bit QE microcontrollers • Increased number of breakpoints available • Deeper trace FIFO for software reconstruction

The CodeWarrior for Microcontrollers version 6.0 is used for the 8-bit S08 QE and the 32-bit QE family. CodeWarrior uses different libraries, different support files, and different compilers in order to compile code for the 8bit or 32-bit microcontrollers. The CodeWarrior tool will automatically use the correct library and support files and compiler based on the microprocessor chosen.

The Processor Expert initialization tools supports both the 8bit and the 32-bit. The debugger on the 32-bit V1 is compatible with the S08. It uses the same BDM interface which, in turn, allows reuse of the same BDM cable hardware for the 32-bit microcontroller. The 32-bit microcontroller has an increased number of breakpoints available and also has a deeper trace FIFO, or first in first out, buffer for the software reconstruction during a bus trace.

21 Question

True or false? If you want to reprogram flash within the application for a 32-bit QE microcontroller, you have to copy a very small program into RAM in order to do the read while write or reprogram the flash. Click the correct answer and then click Done.

A) True

B) False

Done

Please answer this question about migrating from the 8-bit S08 QE to the 32-bit QE family.

Correct! On the 32-bit V1 microcontroller there are two 32K by 16 bits arrays arranged in parallel. On the S08, there are two 64K by 8 bit arrays arranged in series. So, if you want to reprogram flash within the application for a 32-bit microcontroller you have to copy a very small program into RAM in order to do the read while write or reprogram the flash.

22 Microcontroller Family

V2

32-bit V1 QE

8 bit QE

S08

Now we will review the migration from the 32-bit V1 QE to the 32-bit ColdFire V2 architecture.

23 V2 Platform 32-bit V1 QE 8 bit QE

S08

Instruction Set • ColdFire V2 supports ISA Revision A+; ColdFire V1 supports ISA Revision C • ColdFire V1 is a simplified version of the ColdFire V2 Core • MAC/EMAC and Hardware Divide are standard on the ColdFire V2 core • Addressing modes and instruction definitions are the same between the ColdFire V1 and the ColdFire V2 core Micro-architecture • ColdFire V1 and ColdFire V2 cores contain 2-stage Instruction Fetch pipeline and 2-stage operand execution pipeline • Same programming model for both 32-bit QE and ColdFire V2 microcontrollers • Supports other ColdFire compiler conventions with no changes

The ColdFire V2 supports the instruction set architecture revision A+, ColdFire V1 supports revision C. The ColdFire version 1 is a simplified version of the ColdFire V2 core. What we've done is we've taken MAC and EMAC and the hardware divides, which are standard on the V2 core, and removed them from the V1 core. However, the addressing modes and instruction definitions are the same between the V1 and the V2 cores.

Both the V1 and the V2 cores contain two-stage instruction fetch pipelines and a two-stage operand execution pipeline. The same programming model can be used for both the V1 and V2 microcontrollers. And the ColdFire compiling conventions are supported on both the V1 and the V2.

24 V2 Peripherals 32-bit V1 QE 8 bit QE

S08 Clock Source • ColdFire V2 MCUs and MPUs have a built-in clock module with several clocking methods available ƒ Internal clock, external crystal, or external clock GPIO • Different on the ColdFire V2 in that the ColdFire V2 has a pin assignment register to determine if pins are used as GPIO or for peripheral use ADC • Available on most ColdFire V2 MCUs • Very similar to that of the QE microcontroller family and requires similar configuration • Most ColdFire V2 MPUs require an external ADC SPI • ColdFire V2 MCUs and MPUs have a queued serial peripheral interface (QSPI) • Acts like a normal SPI but with queued transfer capabilities

The ColdFire V2 MCUs and microprocessors have a built in clock module with several clocking methods available. This is very similar to the 32-bit QE V1, but it is not exactly the same.

The general purpose I/O on the V2 has a pin assignment register to determine if pins are used as GPIO or for the peripherals. On the ColdFire V1, simply enabling the peripheral will reassign the priority of the pins for that peripheral without having to us a pin assignment register.

Analog to digital converters (ADCs) are available on most ColdFire V2 microcontrollers. They are very similar to the ADC that is used on the V1 QE family in that they require a similar configuration. However, they are not exactly the same. Most of the ColdFire V2 microprocessors do require an external ADC because they're not embedded in the processor.

The ColdFire V2 MCUs and microprocessors have queued serial peripheral interfaces (QSPI). The queued SPI acts like a normal SPI but it has a queued buffer on the transfer input so that several bytes can be buffered for transmit without having CPU intervention in between each byte of transfer. The V1 QE family does not have a queued SPI, so every byte must be written to by the CPU.

25 V2 Memory 32-bit V1 QE 8 bit QE

S08 Flash • Only on ColdFire V2 MCUs • Embedded flash memory of up to 512K available • Linear memory map – very similar to the 32-bit QE microcontroller RAM • ColdFire MCUs ƒ Very similar to the 32-bit QE microcontroller • ColdFire MPUs ƒ Limited amount on ColdFire MPUs ƒ ColdFire V2 MPUs include memory controller to interface with external RAM and/or Flash ƒ User must ensure correct memory type and size is used for the specific ColdFire V2 MPU being used

Only the ColdFire V2 microcontrollers have embedded flash memory in sizes that are up to 512K. The memory map is very similar to the 32-bit QE microcontrollers.

Again, the ColdFire V2 microcontrollers implement RAM in basically the same way as the 32-bit V1 QE microcontroller. The ColdFire microprocessors might just have a limited amount of RAM on the chip, but thsee microprocessors include a memory controller to interface with external RAM and/or flash memories. So, with the ColdFire microprocessor, the user must ensure that the correct memory type and size is used for the specific microcontroller.

26 V2 Hardware 32-bit V1 QE 8 bit QE

S08

microcontrollers not pin for pin compatible Supply Voltage • ColdFire V2 MCUs ƒ Requirements similar to the QE microcontroller family • ColdFire V2 MPUs ƒ Various supply requirements ƒ Core typically operates at +1.5V DC; GPIO typically operates at +3.3V DC ƒ External memory controllers require various operating voltages (1.8V, 2.5V or 3.3V) Clock gating • Feature on ColdFire V2 MCUs very similar to the QE microcontroller family Timer • GPT performs similar functions to the TPM peripheral on the QE microcontrollers • PWM functions on ColdFire V2 core are managed by an independent peripheral • ColdFire V2 timer peripheral includes a 32-bit timer counter

The V1 and V2 microcontrollers are not pin for pin compatible. There are several different pin outs of ColdFire V2 microcontrollers depending on which version is being used.

The voltage range for the ColdFire microcontrollers is very similar to the QE family at 1.8 volts to 3.6 volts. There are various supply requirements for the ColdFire V2 microprocessor, depending on which processor's being used. The CPU core typically operates at 1.5 volts DC, while the general purpose I/O typically operates up to 3.3 volts. In addition, external memory controllers typically require operating voltages of either 1.8, 2.5, or 3.3 volts.

The clock gating feature on the ColdFire V1 is very similar to that on the V2 microcontrollers. Clock gating is not an option on the V2 microprocessors.

The general purpose timer (GPT) performs similar functions to the timer module (TPM) peripheral on the 32-bit V1 QE microcontrollers. The PWM functions on the ColdFire V2 are typically managed by an independent peripheral, a separate PWM peripheral. This is different from the ColdFire V1, in which the PWM functions are integrated into the TPM timer module. The ColdFire V2 timer peripheral typically includes a 32-bit timer counter. The TPM module on the 32-bit V1 QE family is a 16bit timer counter.

27 V2 Tools 32-bit V1 QE 8 bit QE

S08

CodeWarrior • CodeWarrior for Microcontrollers supports the 32-bit V1 QE microcontroller • CodeWarrior for ColdFire® supports the ColdFire V2 microcontrollers • GUI interface between both CodeWarrior tools are essentially identical making the transition between them very straightforward Initialization • ColdFire V1 ƒ Processor Expert ƒ microcontroller Initialization support in CodeWarrior for Microcontrollers • ColdFire V2 ƒ ColdFire Init – Initialization tool for the ColdFire V2, V3, and V4 cores ƒ microcontroller initialization tools available from 3rd party vendor Debugger • Integrated debugging tool in CodeWarrior contains many of the same tools as the 8-bit QE debugger • 4 wire BDM interface on ColdFire V2 microcontrollers vs. the single wire BDM interface on the QE microcontrollers • Both ColdFire V1 and ColdFire V2 microcontrollers have Debug B+ ƒ ColdFire V1 has a wrapper to make it single wire

The CodeWarrior for Microcontrollers version 6.0 only offers support up to the ColdFire V1 microcontrollers. CodeWarrior for ColdFire is needed to support the ColdFire V2 and above microcontrollers. The GUI interface between the CodeWarrior for ColdFire and CodeWarrior for Microcontrollers tool simplifies the transitioning between a V1 and V2.

The ColdFire V1 is supported by Processor Expert and microcontroller initialization within the CodeWarrior for Microcontrollers IDE. The ColdFire V2 uses a third-party software tool called ColdFire Init, which is an initialization tool for the ColdFire versions V2 and above.

The integrated debugging tool in CodeWarrior for ColdFire contains many of the same tools as CodeWarrior for Microcontrollers. The ColdFire V2s require a four wire medium interface versus the single wire medium interface on the V1 QE microcontrollers. Both ColdFire V1 and V2 microcontrollers make use of the debug B+ module. The ColdFire V1, however, has logic around it to integrate it into a single wire interface versus the four wire interface of the V2.

28 Question

Which of these statements about migrating from the 32-bit QE (Coldfire V1?) to the Coldfire V2 are true? Select all that apply and then click Done.

A. Different programming models must be used for both the V1 and V2 microcontrollers.

B. Analog to digital converters (ADCs) are available on most V2 microcontrollers.

C. The V1 and V2 microcontrollers are pin for pin compatible.

D. Clock gating is not an option on the V2 microcontrollers.

Done

Answer this question about migrating from the traditional S08 microcontroller to the S08 8-bit S08 QE family.

Correct. A.) Both the V1 and the V2 cores contain two-stage instruction fetch pipelines and a two-stage operand execution pipeline. The same programming model can be used for both the V1 and V2 microcontrollers. B.) Analog to digital converters (ADCs) are available on most ColdFire V2 microcontrollers. C.) The V1 and V2 microcontrollers are not pin for pin compatible. There are several different pin outs of ColdFire V2 microcontrollers depending on which version is being used. D.) Clock gating is not an option on the V2 microcontrollers.

29 Microcontroller Family

V2

32-bit V1 QE

8 bit QE

S08

It's important to note that migration between microcontrollers is not just upward. Migrating from the 32-bit back down to the 8bit is just as easy as moving from the 8bit to the 32-bit.

30 V2 Platform 32-bit V1 QE 8 bit QE

S08 Buses • Data Bus decreases to 8-bit • Address Bus decreases to 16-bit Instruction Set • HC08 instruction set with added CALL and RTC instructions • Two separate compilers: S08 and ColdFire V1 ƒ CodeWarrior automatically selects based on target processor Interrupts and Reset • Exception priority is fixed (matches default 32-bit QE) • No nesting support • Supports 32 exceptions (interrupt/reset) • One vector for all reset sources • Vector must point to address within pages 0-3 • No illegal address reset Input/Output • There is no support for Rapid GPIO

The 8bit S08 has an 8bit data bus and a 16bit address bus.

The S08 uses the standard S08 instruction set with additional call and return from call instructions.

Exception priority is fixed on the 8bit, which does match the default of the 32-bit V1 QE. The interrupts have no nesting support, but there is support for up to 32 exceptions total, both interrupt and reset. There is only a single vector for all reset sources and the reset vector must point to addresses within pages zero through three of the flash memory. Also, there is no illegal address reset on the QE 128. All addresses are legal addresses.

Finally, there is no support for rapid GPIO on the S08 8-bit S08 QE.

31 V2 Peripherals 32-bit V1 QE 8 bit QE

S08

► Same peripherals 2x 2 2xSCI ► Same power saving KBI 2xSPI 2xI C ACMP modes COP • All modes entered the ColdFire® V1 Core 24 ch. same way, except wait Selection S08 Peripherals 12-bit 3 16-bit ADC timers mode S08

• On the 8-bit QE, simply Flash Memory 8KB execute WAIT 128 KB SRAM instruction Power ICE + Mgmt 70 ICS+ULP BDM Control OSC (PMC) GPI/O

Both the 8bit and 32-bit QE microcontrollers share the exact same peripherals. They also share the same low power modes. Also, all modes are entered the same way except the wait mode. On the 8bit S08 microcontroller, to enter wait mode you simply execute a wait instruction.

32 V2 Memory 32-bit V1 QE 8 bit QE

S08

Flash • The addressing is paged not directly accessed on the 8-bit QE • FLASH arrays are arranged differently ƒ 64K x 8-bits arranged in series for the 8-bit QE • Ability to program one array from the other without executing any code from RAM • FLASH is protected in 1K increments • Default for security to FLASH is secured when blank RAM 128K 8-bit Memory Map • Default for security to RAM is secured when blank

The memory addressing is paged - not directly addressed - on the 8bit microcontroller. Flash arrays are arranged in the 64K by 8-bit arrangement in series. This allows the programming of one array from the other array without having to execute any code from RAM. The flash is protected in 1K increments versus 2K increments on the V1. And default for flash security is secured when the memory is blank.

For the RAM memory, the default for security to RAM is also secure when the microcontroller is blank.

33 V2 Hardware 32-bit V1 QE 8 bit QE

S08

Pin to pin compatible BDM • Drop in replacement between the 8-bit and 32-bit QE microcontrollers No Supply Voltage Differences • Both microcontrollers have a voltage range of 1.8V to 3.6V Compatible Memory and Package Options Pin-to-Pin Evaluation Board • 128K Integrated Flash Compatible ƒ 80LQFP (8-bit and 32-bit QE microcontrollers) ƒ 64LQFP (8-bit and 32-bit QE microcontrollers) • 64K Integrated Flash ƒ 64LQFP (8-bit and 32-bit QE microcontrollers) Lower pin count and memory options for the 8-bit QE microcontroller

Again, the V1 and S08 are pin for pin compatible so they act as drop-in replacements for each other.

The voltage supplies are identical at 1.8 to 3.6 volts.

There's also compatible memory and package options. For both the S08 and the V1, there's a 128K flash option in both an 80LQFP package and a 64LQFP package. There's also a 64K flash memory option available in just the 64LQFP package for both microcontrollers.

The S08 does offer even lower pin count options than the V1, including 48 and 32 pin packages.

34 V2 Tools 32-bit V1 QE 8 bit QE

S08

CodeWarrior • CodeWarrior for Microcontrollers version 6 is standard • Different Libraries • Different support files • Different compiler ƒ CodeWarrior automatically selects based on target processor Initialization • Processor Expert support for both • microcontroller Initialization support in CW for both Debugger • S08 has four h/w breakpoints: 1 in BDM, 3 in Debugger module • S08 has eight deep FIFO for tracing change-of- flow addresses and event-only data

CodeWarrior for Microcontrollers version 6.0 is used for both the V1 and S08 microcontrollers. It automatically selects the correct libraries, support files, and compiler based on the selected target microcontroller.

There's Processor Expert support for both V1 and S08 and microcontroller Initialization support within CodeWarrior for both the V1 and S08.

The S08 debugger has four hardware breakpoints. One in the background debug module and three in the debugger module. The S08 has an eight deep FIFO register for bus traces versus the 32 deep for the V1.

35 Blood Pressure Monitor

OLED Display

► Benefits with S08 QE: Sensor 1 = 120 Air Chamber / Sensor 2 = 60 Pressure Sensor • Low power consumption for battery operated microcontrollers GPIO • 11 GPIO for character C D LCD use A S • Data can be monitored and CI graphed in ► Benefits with Motored Air Pump ColdFire QE:

• Higher Processing Wireless V capabilities: Faster Transmition oic e G collection and processing of PI en S er at data, more sophisticated ion LCD • Simultaneous ZigBee Patient 1: OK Battery Powered connection Patient 2: Alarm Patient 3: OK

With the additional performance of the ColdFire V1 you

Diastolic Pressure = 50 can graph the pulse and analyze/interpret the pulse mmHg and blood pressure in real time. Blood Pressure is High

36

Here we have an example of scalability in the form of a blood pressure monitor application. The benefits of the S08 QE microcontroller in this application is lower power consumption for battery operated microcontrollers. There's a mini GPIO for use for creating characters on an LCD, therefore data can be monitored real time or graphed in a computer.

One of the benefits of the 32-bit V1 QE microcontroller is that the higher processing capabilities of the 32-bit core can result in faster data collection, faster data processing, and more sophisticated LCD graphics. Also, with the increased performance it can allow for a simultaneous RF connection through a standard such as ZigBee.

36 Security System Security Systems • S08 microcontroller can be used in a residential system ƒ Requires low power consumption to enable battery operation when necessary ƒ Serial communication to monitoring microcontrollers ƒ Competitive cost to accommodate low end system requirements • ColdFire V1 microcontroller can be used in a commercial system Security Systems ƒ Still requires low power consumption for battery backup operation ƒ Still requires competitive costs ƒ Requires more bandwidth to handle more monitoring microcontrollers ƒ Requires higher processing power to improve sensitivity (reduce false alarms)

Here we have an example of a scalable application in the form of a the security system. Suppose a vendor wanted to create a single series of security systems yet be able to scale them between residential and commercial systems. The 8-bit S08 QE can be used for a residential system, providing low power consumption for battery backup operation, serial communication to monitoring microcontrollers through any of the serial ports, and reduced cost to keep the end product cost competitive with other residential systems.

The needs of the commercial system can be met by swapping to a 32-bit V1 QE. The V1 QE can still support the low power needs for battery backup operation and the V1 QE still provides a competitive cost for a commercial system. The V1 QE also provides more bandwidth to handle more monitoring microcontrollers and higher processing power to improve the sensitivity and reduce false alarms within the system.

37 Course Summary

►Benefits of software, peripheral, and pin compatibility ►Compatibility between the S08, 8 bit QE, 32-bit V1 QE and Coldfire V2 microcontrollers ►Progression up and down the microcontroller family

For more information, please visit our Web site: www.freescale.com/flexis

sThis concludes the “QE128 Unprecedented Compatibility” course. You learned about benefits of software, peripheral, and pin compatibility. You also learned about the compatibility between the S08, 8 bit QE, 32-bit V1 QE and Coldfire V2 microcontrollers and progression up and down the microcontroller family. For more information about these microcontrollers, please visit the Freescale web site.

38