0 Introduction
With the development of embedded technology and communication technology, smart phones have become the mainstream trend of mobile phone development in the field of mobile phones. At present, in the field of smart phones, processor selection, operating system selection and application development are all hot topics of research. In the courses of computer-related majors in colleges and universities, more and more smart phones are involved, and more and more students are also involved in the learning and development of smart phones. Therefore, it is necessary to provide these students with relevant experimental equipment. This paper proposes to build a smart phone hardware experimental platform based on the Samsung S3C2410 chip as the core, and combine the wireless communication module to realize the short message function of smart phone calls. It provides a platform for students to conduct experiments related to smart phones. Through this platform, students can complete various software development when designing smart phones by themselves, which changes the traditional verification-based experimental platform mode and is conducive to the cultivation of students' innovative ability.
1 Design of smartphone hardware and software experimental platform
There are three main ways to implement mobile phone hardware:
(1) Only using baseband chips, usually called feature phones;
(2) Baseband chip plus coprocessor: This type of product enhances multimedia processing capabilities based on feature phones;
(3) Baseband processor plus application processor. This is the design used in smartphones. The baseband processor is used for communications, and the application processor is used for multimedia and other applications.
When designing a smartphone hardware platform, the following aspects need to be considered:
(1) The application processor should have a sufficiently high main frequency to ensure the system's operating speed so that various applications can run smoothly;
(2) The system should have sufficient memory space to store applications and user data;
(3) It has a good human-computer interaction interface, which allows users to operate it conveniently. The baseband processor has stable performance and ensures real-time communication for users.
1.1 Hardware Platform Design
The hardware mainly includes debugging interface, storage system, GSM/GPRS communication module, and human-computer interaction module. The core controller chip uses Samsung's S3C2410 processor, which runs stably at 203 MHz. As an experimental platform, it completes the basic functions of a smartphone and does not require a large amount of data processing, so the main frequency of 203 MHz can ensure the running speed of the system. The system uses 64 MB SDRAM and 64 MB NANDFLASH as the storage system to ensure the storage space of the system and users. In terms of communication, the application processor connects the baseband processor, namely the GSM/GPRS communication module, through UART2. The GSM/GPRS module uses SIMCOM's SIM300 module, which has a complete GSM/GPRS tri-band/quad-band solution, supports GSM calls and short message sending and receiving and GPRS data transmission, and can be easily controlled through AT commands. The system displays a graphical operation interface through an LCD, and uses a touch screen instead of a traditional keyboard operation, which is more user-friendly and more convenient to operate. At the same time, an expansion interface is provided for students to expand other functions of smartphones, such as using an Ethernet interface to realize web browsing. The hardware block diagram of the entire system is shown in Figure 1.
1.2 System software platform design
The function of the system software platform is to provide a platform for application development. The system software is designed based on the embedded Linux operating system and the embedded GUI Qtopia. The architecture of the entire software platform is shown in Figure 2.
Bootloader is the first code to run after the system is powered on. Its main task is to complete hardware initialization and prepare conditions for loading the operating system. Its implementation depends on the hardware, and the Bootloaders of development boards with different architectures vary greatly. In order to better support the hardware devices of the target board, the system chooses to develop its own Bootloader in the ADS1.2 integrated development environment. The implementation process of Bootloader is mainly divided into the following two stages:
(1) It mainly performs initialization processing closely related to the CPU core and storage devices. This part of the code is usually written in ARM assembly instructions and included in the start.S file. It usually includes the following steps:
① Hardware initialization work. Including turning off the watchdog; shielding all interrupts; setting the processor clock and operating frequency; initializing external registers; initializing the stack pointer.
② Prepare RAM space for stage (2), copy the code of stage (2) to RAM, and jump to the entry point of stage (2).
(2) Complete the general startup process and provide driver support for the target board device. This part will be copied to RAM for execution. This code is usually implemented in C language and has strong readability and portability.
Usually includes the following steps:
①Complete the general I/O settings through the set_gpios() function;
②Complete memory mapping and memory management unit initialization through mere_map_init() and mmu_init() functions;
③ Initialize the MTD device using the mtd_dev_init() function;
④Copy the kernel image file and root file system image in NAND FLASH to the RAM space;
⑤Jump to the first instruction of the kernel.
At this point, the Bootloader's task is completed, and the next task is completed by the operating system.
1.2.2 Tailoring and transplanting of operating systems
The operating system is responsible for managing the entire peripheral device and scheduling each software task. This is very important for smartphones. The operating system uses open source and free Linux, and is ported based on embedded Linux 2.6. The main porting process includes establishing a development environment, downloading kernel source code, modifying configuration files, configuring the kernel, compiling the kernel, and compiling modules. Because the porting process is roughly the same, only a brief introduction is given here:
(1) The cross-compilation tool on the host machine uses arm-linux-gcc-3.4.1;
(2) Modify the commom-smdk.c file to set partitions for NANDFLASH;
(3) Modify the configuration file fs/Kconfig to enable the kernel to support mounting devfs at startup;
(4) Configure the kernel;
(5) Compile the kernel and modules, and use the Busy-box tool to create the Yaffs file system.
1.2.3 Embedded GUI Qtopia Porting
Embedded GUI is used to develop the graphical interface of SMS and phone application programs. This article uses Trolltech's Qtopia as the graphical interface library, and the version used is Qtopia-core-opensource-src-4.4.3. The main tasks of the transplantation are:
(1) Modify the qmouselinuxtp_qws.h file to make Qtopia support touch screen;
(2) Configuration, compilation, and installation;
(3) Copy the relevant library files to the development board and set the environment variables.
2 Application Design
Phone and SMS applications are the most basic and core applications of smart phones. The main tasks of phone and SMS application design include: process design of phone and SMS application, serial port communication between communication module and application processor, and phone and SMS application interface development.
2.1 Phone/SMS Application Flow
The application uses a timer function to control the entire program flow. The timer is triggered once every 200 ms.
The detection process of new calls and new text messages is shown in Figure 3. The application initialization needs to initialize the interface between the GSM/GPRS communication module and the application processor. In addition, a 200 ms trigger timer must be defined. After the system is initialized, the timer triggers to read the serial port data for judgment. When there is no data in the serial port, wait for the next timer to start; when there is data in the serial port, judge the serial port data; when there is a new text message prompt in the data, decode the text message according to the decoding format of the PDU text message, and call the UI interface to prompt the user that a new text message has arrived, asking the user whether to read it; when there is a new call prompt in the data, call the UI interface to ask the user whether to answer it.
When it is necessary to send a text message or dial a number, the application process is shown in Figure 4. When the user calls the sending interface to edit the text message, enters the recipient, and clicks the send button, the application first determines whether the text message center number and the receiving number are correct. If not, it prompts the user that the error occurred; if the number and number format are correct, the text message content to be sent is encoded according to the PDU text message format, and the AT command is written to the serial port to send the text message. The process of dialing and hanging up the call is very simple. You only need to write ATD+the dialed number and ATH to the serial port. When the dialing is wrong, the user is prompted that the dialing is wrong.
Previous article:Smart Home Remote Monitoring System Solution Based on S3C2440
Next article:Introduction of Mobile Email Terminal Based on S3C2410 Processor
Recommended ReadingLatest update time:2024-11-16 16:51
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- 77G millimeter wave antenna design
- Unboxing of Materials - STM32F767 & ESP32
- Prize Review: 50 Rapid IoT Kits from NXP to Proof of Concept in Minutes
- Download Keysight Technologies' e-book "X-Apps Treasure Map: Essential Measurement Apps for Signal Analyzers That Accelerate Tests" and receive a gift!
- [Evaluation of EC-01F-Kit, the EC-01F NB-IoT development board] Power-on and serial port test
- ELEXCON 2022 Shenzhen International Electronics Exhibition will open on November 6 (new schedule), hurry up and get your tickets! There are also many gifts waiting for you!
- Registration reminder: In the last few hours, 100 sets of Pingtouge RISC-V ecological development boards worth 390 yuan will be given away for free~
- Visit Avnet New Energy Technology Innovation Cloud Exhibition and win great gifts!
- Python Learning Handbook (4th Edition)
- Small Automotive Front-End 16W Power Supply Reference Design