Application of ColdFire MCU on Clinux

Publisher:chaochenLatest update time:2013-11-08 Source: dzscKeywords:ColdFire Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Introduction to ColdFire Series Processors

Freescale's 32-bit processors are divided into PowerPC series, ColdFire series and DragonBall series. ColdFire series is one of the important components, which can be applied to industrial control, instrumentation, civil products, network products and other fields. ColdFire series has a good cost performance, and its price ranges from US$2 to US$20. ColdFire series processors have many development tools and provide users with some ready-made solutions, which enables users to quickly develop their own application products.

ColdFire processors are divided into V2 core and V4 core. The 52 series is V2 core architecture, and the 54 series is V4 architecture. The following takes the V2 core as an example to introduce its performance:

The V2 core has a variable-length RISC instruction set; has 2 independent pipelines; uses 3-longword FIFO buffers to separate the pipelines from each other; a 32-bit internal address bus supports 4GB of linear address space; a 32-bit data bus; 16 user-available 32-bit general-purpose registers; it supports optimization of high-level language structures and many other features.

The MCF527X series mainly includes MCF5270 to MCF5275 processors, which are mainly suitable for remote monitoring, data security encryption equipment, Ethernet hubs, home routers and other products. Its main features are: V2 ColdFire core, with a processing power of 159MIPS at a clock frequency of 166MHz; 32 32-bit enhanced multiplication and accumulation unit and hardware divider; 8KB or 16KB bytes of configurable instruction/data cache; rich peripheral interfaces; packaging forms include 196-pin BGA and 256-pin BGA packaging.

The MCF523X series products mainly include MCF5232, MCF5235, etc. Its biggest feature is the addition of an enhanced timing processing unit (eTPU). This function is particularly suitable for products with network communication security. It is also its V2 ColdFire core structure.

The main feature of the MCF547X series and MCF548X series products is the use of the fourth-generation enhanced ColdFire core (V4e). They are particularly suitable for tool automation, process control, robotics, medical instruments, etc.

In addition to the above processors, Freescale ColdFire series also includes the earliest used MCF5272 processor, the MCF5282 processor with integrated Ethernet media access controller (MAC) and network application software, and the MCF5249 processor with integrated peripherals and enhanced multiplier and accumulator.


CLinux Application Development

There are two main ColdFire programming environments currently in use. The following takes the MCF5249 development board as an example to introduce the operation and application of CLinux.

CLinux Application Development

1. Establish a host development environment

During development, cross-compilation, assembly and linking tools are used on the host machine to generate executable binary code, and then the executable file is downloaded to the target machine for execution.

The hardware development environment of CLinux mainly consists of a host machine and a target board. It is recommended to install RedHat 9.0 on the host machine, and the target board can be MCF5249, 5282, 5272, etc. The connection between the host machine and the target board can be a parallel cable, a serial cable, or a direct network cable.

2. Development Mode

First, after debugging on the host machine (PC), port it to the target board. In this way, the gdb debugging tool can be used. Porting mainly involves function library issues and modifying Makefile to adapt to different target boards. Usually, the mode of developing directly on the target board is adopted. Connect the host machine and the target board through a serial port line, run minicom on the host machine as the display terminal of the target board, mount the host machine hard disk, and debug the application directly on the target board.
There are three ways to debug the application directly on the target board:

(1) Printing serial port. This is the most commonly used debugging method for embedded systems. It is simple, practical and effective.

(2) Use log record files.

(3) gdb debugging. [page]

CLinux Driver Development

CLinux driver development can be divided into three layers from the application development concept level: upper, middle and lower. The lowest layer is hardware, the middle layer is embedded operating system, and the highest layer is application. The hardware layer and embedded operating system are connected by drivers, and the embedded operating system and application are connected by calls.

In Linux, drivers are implemented by device drivers. Linux divides different devices into three categories: character devices, block devices, and network devices. Common character devices include serial ports, monitors, printers, etc.; common block devices include hard disks, disks, CDs, etc.; network devices are generally various network interfaces.


CLinux Application Examples

QSPI data acquisition based on CLinux

The Serial Peripheral Interface (SPI) is a synchronous serial peripheral interface proposed by Freescale, which allows the CPU to communicate and exchange information with various peripheral interface devices in a serial manner. The QSPI module provides a serial peripheral interface with queue transmission performance.

From the QSPI structure, the QSPI module has 7 signal pins, 4 of which are chip select signals. It has 80 bytes of QSPI RAM. Its control logic is connected to the internal bus. The queue control area is connected to the address register. The 4 peripheral chip select signals are used to select which external device communicates with the QSPI. The chip select signal is only used for simple chip selection, but up to 15 ports can be controlled through an external 4-16 decoder.

For 32-bit ColdFire processors, there are three ways to control QSPI (taking MCF5249 as an example), which are:

1. Bare metal mode, that is, no need for CLinux support, directly set the QSPI register of MCF5249.

2. Set the QSPI registers directly in CLinux and control the QSPI operation as a user application.

3. Add the QSPI control program in the form of CLinux driver and provide the QSPI interface for users. Users can set and control the QSPI through the provided interface.
The data acquisition scheme in this article is the third method.

USB data storage based on CLinux

The USB data storage structure based on CLinux is shown in Figure 1, where the MCF5249 development board is used as the USB HOST and the USB flash drive is used as the storage medium, which can realize flexible data storage and movement.

The main modules of USB driver in CLinux are:

To support USB flash drives, you need to set up CLinux as follows: Execute make menuconfig in the CLinux directory to enter the CLinux configuration interface.

MCF5282EVB board bootloader transplantation

There are two Bootloader operation modes.

Boot loading mode: This mode is also called autonomous mode, that is, the bootloader loads the operating system from the ROM on the target machine into the RAM and runs it, and the whole process does not involve the user.
Download mode: In this mode, the bootloader on the target machine will download the image from the host machine through communication means such as serial port connection or network connection. The image downloaded from the host machine is usually saved to the RAM of the target machine first, and then written to the ROM of the target machine.

The main files of the MCF5282EVB board bootloader transplantation are shown in Figure 2. Since the MCF5282 is a Coldfire series microprocessor, it has similarities with other models of Coldfire microprocessors. The read and write methods of the control registers of the chip peripherals are similar to those of the MCF5206; and the chip peripherals are very similar to those of the MCF5272, with QSPI, QAD, and FEC.

Keywords:ColdFire Reference address:Application of ColdFire MCU on Clinux

Previous article:Design of USB/PS2 MOUSE Using SH69P04
Next article:MSC1210 single chip computer with 24-bit analog-to-digital conversion and its application

Recommended ReadingLatest update time:2024-11-16 15:19

The solution of communication between single chip microcomputer and Kingview software
1. Introduction As an industrial control configuration software, KingView software has been widely used in China. It has strong hardware support capabilities and has written corresponding drivers for most PLCs, frequency converters, boards, modules, and instruments at home and abroad. It is very c
[Microcontroller]
The solution of communication between single chip microcomputer and Kingview software
Design of smart home anti-theft alarm system with AT89S51 microcontroller as the control core
1 Introduction With the rapid development of our country's national economy and the improvement of people's living standards, people are paying more and more attention to anti-theft, anti-robbery, and fire prevention equipment for family homes. Therefore, in modern society, more people need to be aware of theft, robbe
[Microcontroller]
Design of smart home anti-theft alarm system with AT89S51 microcontroller as the control core
How to upgrade from single chip microcomputer to DSP
  In the past few decades, the widespread application of single-chip microcomputers has realized simple intelligent control functions. With the progress of informatization and the rapid development of computer science and technology, signal processing theory and methods, the amount of data that needs to be processed i
[Microcontroller]
The process of MCU processing analog quantity
MCU can only process digital quantities, so digital input----- MCU-------- digital output MCU cannot process analog quantity directly, so analog quantity input---- analog signal processing----- Analog-to-digital converter--- MCU------ digital-to-analog converter---- analog signal processing--- analog output Theref
[Microcontroller]
The structure and working principle of 51 single-chip microcomputer I/O port
1 Overview         The I/O port of a microcontroller is a channel for input and output signals. The 8051 microcontroller has four groups of I/O ports: P0, P1, P2, and P3, and each group of ports has 8 pins. 2.P0 port 2.1 Overview         The P0 port has 8 pins, P0.0 to P0.7. In addition to being used as input pins a
[Microcontroller]
The structure and working principle of 51 single-chip microcomputer I/O port
Programming of the storage system of the mixed signal microcontroller C8051F060
The C8051F series of microcontrollers launched by Cygnal Corporation of the United States has pushed the 51 series of microcontrollers from the MCU level to the SoC era. In particular , the C8051F 06X series integrates the latest development technology of current microcontrollers, and its fun
[Microcontroller]
Lesson 8: MCU addressing mode and instruction system
Through previous studies, we have understood the internal structure of the microcontroller, and we also know that to control the microcontroller and let it do things for us, we need to use instructions. We have learned a few instructions, but they are very scattered. From now on, we will systematically study the instr
[Microcontroller]
Interpretation of the secure boot encryption algorithm for automotive MCU
We have previously briefly described common secure booting for automotive MCUs. Here we will describe the encryption algorithm used during booting. First, let's analyze the members required for secure boot in MCU: 1. The data length and starting address of the object to be verified (usually an applic
[Embedded]
Interpretation of the secure boot encryption algorithm for automotive MCU
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号