• No results found

The embedded software design

4. Results

4.4 The embedded software design

" What is needed to configure the DSI interface?

This question will be answered in chapter 4.6: Configuration of the DSI

The Software for OMAP5 Platform Remote Control Tester Version:5.2

2. Theoretical framework

It is necessary to know some new concepts, professional knowledge and technical methods that are related to the assignment. In this chapter the knowledge, concepts and methods will be introduced based on the assignment.

2.1 Platform

This chapter mainly explains the operating systems that can be installed on the platform. The interface that is used on the development board is introduced as well.

And the details for selecting a suitable operating system can be found in Chapter 4.

2.1.1 Ubuntu

In the assignment, Ubuntu was selected as the operating system, which was install on the development board.

Ubuntu is a distribution of the Linux operating system with Unity as its default desktop environment.[4] Ubuntu aims to provide a latest, fairly stable operating system, which contains some free software such as picture viewer and media player. Ubuntu is a completely open source operating system, so it has a powerful community. Users can get any help from the community.

2.1.2 Android

Android is another option for installing on the development board.

Android is a Linux-based open source and freely operating system, mainly used in mobile devices, such as smart phones and tablet computers. Google and the Open Handset Alliance developed Android together. The Android operating system was originally developed for the phone by Andy Rubin. It can also be installed on some development boards[5].

2.1.3 Universal Serial Bus (USB) interface

The development board does not have a Bluetooth interface nor a WLAN interface.

So in the assignment, no matter what kind of communication (USB, Wi-Fi or Bluetooth) was chosen, they all need use the USB interface because the platform needs an USB adapter to connect with the Wi-Fi or Bluetooth.

The two-wire USBB2 HSIC interface is connected to an SMSC USB3503A-1-GL-TR physical layer on the development board. It converts the two-wire HSIC interface to three downstream DP/DM host port. Two of the ports are connected to the dual USB Type-A connector at the position of J6. Figure 4 shows a block diagram of the USBB2 interface.[6]

Figure 4 USBB2 Interface Block Diagram

2.2 Communication and data transmission

This chapter gives an introduction of three communication methods for the hardware and two connections between the software that can be selected in this assignment.

They are: USB, Wi-Fi and Bluetooth for the hardware. Socket and Secure Shell (SSH) could be chosen in software. The reasons for selecting are written in Chapter 4.

2.2.1 Wi-Fi communication

Wi-Fi communication was set up between the computer and the platform in this assignment.

Wi-Fi is a kind of technology that makes electrical devices like computers and mobiles do some data exchanges or connect to the Internet without any cables. Wi-Fi can also be regarded as a wireless network communication technology brands. Hold by the Wi-Fi Alliance [7].

Wi-Fi is a wireless local area network that enables portable computing devices to

The Software for OMAP5 Platform Remote Control Tester version: 5.2

1 TCP/IP: The Transmission Control Protocol (TCP) and the Internet Protocol (IP) are two basic computer networking protocols. They provides a connection about how data should be formatted, addressed, transmitted, routed and received at the destination.

8

2.2.2 USB communication

BesidesWi-Fi communication, USB communication is another option that can be established between the computer and the platform.

USB defines connectors, cables and communication protocol to use a bus as

connection, communication even power supply between the computer and electronic devices. USB communication puts data into several packets and transmits them to other device. Initially, all packets are sent to devices from the host via the root hub.

Some of the packets direct a device to send some data as a reply.[8]

2.2.3 Bluetooth communication

The third communication method option between the computer and the platform is Bluetooth.

Bluetooth can be used as a way of wireless exchanging data in short distances. It helps the user to get rid of traditional connect methods with cables. Bluetooth implement the function of data transmission through a special radio frequency. It is very secure and eight types of electronic equipment (such as a mobile, computer headphone) can be connected at the same time.[9]

2.2.4 Socket

USB, Bluetooth and Wi-Fi are three optional communication methods between the hardware: the PC and the platform. The socket is a method to make the PC application and the embedded software communicate with each other in this project.

The establishment of the socket is reflected in the development of the PC application and the embedded software.

Socket is used to make two parts of the software that is based on TCP/IP1 protocol communicate with each other. It was appeared in the UNIX system for the first time.

But with the strengthening of the communication technology, now socket can be used between Linux to Linux, Windows to Windows even Linux to Windows. The socket

2.2.5 SSH

protocol can effectively prevent the users to remote management of information disclosure issue. It is also a program that was originally on the UNIX system, and compensate for network vulnerabilities [11]. Almost all UNIX system – including HP-UX, Linux, AIX, Solaris, Digital UNIX, Irix, and other operating system can run SSH.

2.3 PC application on computer

This part introduces the programming tool and the programming language for the PC application, which is running on the computer in this assignment.

2.3.1 Microsoft visual C Sharp

Microsoft Visual C sharp (also written as C#) is a compiler tool for programmers creating applications by C# programming language for Windows operating system.[12] In Figure 5, it is the logo of Microsoft Visual C#. In this assignment, Microsoft Visual C# is used to develop PC software with a GUI in C# for the computer.

As a part of the Microsoft visual studio developed by Microsoft. Microsoft Visual C#

enhances its interoperability with other languages such as C++. The designer can build scalable application and take advantage of multi-core processors easily and quickly with the Task Parallel Library (TPL) in the Microsoft Visual C#.

2.3.2 C# language

C# is the programming language for developing the PC application with the GUI in this assignment.

C# is a multi-paradigm programming language that encompasses strong typing, imperative, declarative, functional, procedural, generic, object-oriented (class-based), and component-oriented programming disciplines.[13]

C# was designed as a new programming language by Microsoft Corporation based on the C and C++ languages. The programmer will be familiar with the C# as long as he has some experiences in C and C++ to do some programming. C# cooperates with the high productivity of Rapid Application Development (RAD) languages and the new ability of C++.[14]

Figure 5

 

The Software for OMAP5 Platform Remote Control Tester Version:5.2

11

2.4 Embedded software for the platform

The compiler and the programming language for developing the embedded software are introduced in this chapter. The embedded software will be run under a suitable operating system in the platform.

2.4.1 GNU Compiler Collection (GCC)

GCC is a compiler system produced by GNU project for various programming languages like C++, C and JAVA.[15] In this assignment, GCC is used as a compiler for the development of the embedded software running on the platform.

Figure 6 is the logo of GCC designed by GNU project in 1987. GCC has been ported to a wide variety of processor architectures, and is used as a tool in programming non-profit software and paid software widely. GCC is also available for most embedded platforms, including Symbian. Now most other modern Unix computer operating systems like Linux regards GCC as a standard compiler.[16]

2.4.2 C language

C language is a programming language to develop the embedded software for the platform in this project.

C language is used as a general-purpose, high-level language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system at Bell Labs. C language was implemented on the DEC PDP-11 computer in 1972. In 1978, Brian Kernighan and Dennis Ritchie published the first available description of C, which is known as the K&R standard.

The C has now become a widely used professional language for various reasons.[17]

" C language is a programming language that is to learn.

" C language can develop efficient programs.

" C language can solve low-level activities.

" C language is suitable for different types computer platforms

Figure 6

 

2.5 Device under test

The LCD display is the device that needs to be tested by the software and the DSI is an interface that connects with the LCD display. Through the DSI, the image can be shown on the display.

2.5.1 LCD Display

LCD (liquid-crystal display) displays are placed in the structure in which two parallel liquid crystal cell glass substrates provided TFT (Thin Film Transistor) on the glass substrate. A color filter disposed on the upper glass substrate. Change the voltage signal on the TFT liquid crystal molecules can control the rotational direction [18]. Then the polarization of the emission of each pixel is controlled.

Figure 7 The internal structure of LCD’s

There is a kind of material called LC materials, which contains a liquid crystalline phase. This material is located between solid phase and liquid phase, which is regarded as an additional phase in some materials. The long cigar-shaped organic molecules in this material and the elastic coupling in molecules are so powerful [19]. There are two polarizing filters on the both sides of the LC layer. One of the filters polarizes the light in a vertical direction, and the other one is on horizontal direction. In fact, the purpose of the LC layer is not to produce the light. The work principle of the layers is change the direction of the long cigar-shaped organic molecules of the LC material, and then the light outside will be transmitted or reflected. As a result, the LC layers require a fluorescent or LED backlight behind it [20].

The Software for OMAP5 Platform Remote Control Tester version: 5.2

13

2.5.2 DSI interface

MIPI DSI (Display Serial Interface) is one of the most important interfaces for the platform. The interface will be enabled when the developer wants to drive telecom (smart phone) displays. This interface was developed by the Mobile Industry Processor Interface (MIPI) Alliance. DSI provides a communication protocol that is used between the target (the display) and the host (in this case the OMAP processor) and a serial bus [21].

The DSI on the physical layer called DPHY. It is also used by the camera interface developed by the MIPI Alliance, which is called Camera Serial Interface (CSI). A DPHY uses one clock lane and one to four data lanes. The advantages of DPHY are:

a) It facilitates integration and interoperability, because it is a standardized serial bus.

b) A four data lane configuration can speed up to 4 Gbps. The maximum speed of one lane is 500 Mbps.

c) The power is consumed very low.

d) High scalability: a DPHY can use one to four data lanes determined by the user.

2.5.3 Linux Kernel

The Linux kernel is a part of the Linux distributions.In the Linux kernel, the user can find all the basic and necessary programs and modules[22]. For example: network driver, sound driver, Wi-Fi driver and the image output driver. The kernel is used to configure the DSI interface in the assignment.

The Linux kernel is written in C language and it was created in contributors worldwide in 1991. All the source of the kernel is open to the public, so a Linux user can modify the Linux kernel to create a Linux of his own.

3. Methodology

While knowing the knowledge related to the project, selecting a correct and proper methodology would provide the designer a higher efficiency and a perfect performance in a project. So the methodology used in the internship will be introduced in this chapter.

3.1 Engineering Design Process

This chapter gives a clear view of the methodology and introduces it step by step. In TPO, the colleagues use a method called Engineering Design Process (EDP) to finish a project. This internship assignment is also a part of the project in TPO. So the methodology should be same with the company.

3.1.1 Introduction

EDM can be regarded as a formulation to help a designer to realize his target. It includes several steps, and the engineer should follow the methodology step by step.

If it is necessary, some phases may repeat for more than once. Here is an overview of the methodology in Figure 8.

Figure 8 The steps of the Engineering Design Process

The Software for OMAP5 Platform Remote Control Tester version: 5.2

15

3.1.2 Define the problem

The Engineering Design Process begins at defining the problem. At the time an engineer receives a project, he should make a clear view about what this project is about. Then the main question will be got and several related sub questions for solving the main question are listed. This phase has finished in Chapter 1.

3.1.3 Do background research

Before starting a project, the designer needs to know some necessary knowledge and concepts about the assignment. The research should relay to the main question and sub questions. The platform, the communication, the PC application, the embedded software and other related devices build up a complete framework in this phase. All the knowledge and concepts related to these parts can be found in Chapter 2.

3.1.4 Specify requirements

There might be lots of requirements that come from the client, the company or other department in a project. These requirements are what the designer needs to realize.

All the requirements are listed and given an explanation in this project in Chapter 1.

3.1.5 Choose a best solution

Generally, different choices can give a designer more idea in solving the problem. The designer needs to make a comparison of all the possible selections like doing some test or combining with the real condition to get an evaluation for each option. Then the best choice can be selected. The options were given in selecting a suitable operating system and communication (sub question 1 and sub question 2) in this assignment.

The final solution will be determined through the analysis, comparison and combining with the real situation. This part can be found in chapter 4.

3.1.6 Build the prototype, test and redesign

As long as the engineer gets the solution, next phase is to make the solution come true—develop the solution. This phase requires improving the solution as well and keeps improving until the whole process of the assignment is finished.

For a complete assignment, it is always divided several functions or parts. When the designer finishes building all the prototypes, they are used to check whether it meets all the specific requirements, or do some tests.

How to check the bugs in the software and make sure the product can work correctly and steadily? The answer is testing. A test can help the designer to find which part has a mistake and find the problem, then redesign to fix it.

The designer will build some prototypes for the communication between the PC application and the embedded software, the PC application (include GUI), the embedded software and the configuration of the DSI (sub question from 2~7). The PC application will be developed in C# and C language is used to program the embedded software. The DSI is configured through calculating the timing and the frequency. The

designer can improve the result or fix the bug in the test phase. All the prototypes are built in Chapter 4 and the test phase can be found in Chapter 5.

3.1.7 Communicate the result

This is the last step of the method, which also means the task is close to complete.

The way to communicate the result should be a final report, a demo, even a presentation. For a huge assignment, it is also necessary to write a thoroughly document as a manual for the user to check.

The Software for OMAP5 Platform Remote Control Tester Version:5.2

4. Results

This chapter shows the process of designing and the results of this project. It includes five parts: operating system selection, communication selection and establishment, the PC application design, the embedded software design and the configuration of the DSI. All the sub questions will be answered in this chapter.

4.1 Operating system selection

An operating system is a basic condition for running the embedded software on the platform. As the methodology, the alternative choices of the operating system for OMAP5432-EVM development board are Ubuntu (one of the distributions of the Linux) and Android.

The way of selecting the operating system is to install Ubuntu and Android on the platform respectively and give a comparison. The result is shown in table 1.

Android Vs Ubuntu

Stability System crash in 15 mins Stable

Table 1 Comparison between Android and Ubuntu

According to the table 1, we can find that both Android and Ubuntu have Wi-Fi module and Bluetooth module. The designer used the USB mouse to control the cursor and did some typing via a keyboard under the desktop environment in both two types of the operating systems. The development board booted Android in 32 seconds.

However, it took more than 1 minute (84s) to boot the Ubuntu. So Android is better than Ubuntu in the aspect of booting time.

To verify the stability of the system, the platforms were powered on to run Android and Ubuntu separately for an hour. It has been found that the platform running Android crashed after 15 minutes. When rebooted the platform, the system crashed again in 15 minutes. Turning to another operating system, Ubuntu ran stably on the platform after an hour without any crashes. Then the time is extended to 2 hours for a deeper test. The system still kept running on the platform and maintained a good status when using Ubuntu. As a result, Ubuntu is more stable than Android.

Conclusion: The stability of an operating system is the key consideration that should be considered. A test between the Android and Ubuntu shows Ubuntu is more stable than Android. So Ubuntu was selected as the operating system to install on the platform. The method of installing Ubuntu can be found in Appendix I.

4.2 Communication method

This chapter is divided into three parts. First part is how to select a suitable communication method. Second part introduces why choosing socket for the software to communicate and how to establish a socket. The third part is how to make the computer control more than one platform at the same time is the last part of this chapter.

4.2.1 Communication method for the hardware

A connection must be built if the PC application and the embedded software want to communicate with each other. The communication method should be easy to establish, transmit in a high speed, and meet the requirements of the company. The three optional communication methods: USB communication, Bluetooth communication and Wi-Fi communication have been introduced in Chapter 2.

According to the research and the evaluation, Wi-Fi communication is the final solution. The reasons why selecting Wi-Fi communication between the PC and the platform are listed as followed:

a) The platforms are fixed on a special round turning test desk in the factory. When the operator starts testing, the test desk will rotate in a certain direction. This will cause the USB cables intertwined. So combining with the really testing environment, only a wireless connection method can be used in this assignment.

b) Both Wi-Fi and Bluetooth can connect two or more devices without using any wires. But one megabyte per second is the maximum data transfer speed of the Bluetooth. The Bluetooth cannot be an ideal choice for data transmission because of the low transfer rate.

c) Wi-Fi communication method is the most popular connection method between two devices. The transfer speed is the fastest among the three communication methods as well. The range of Wi-Fi is also very large, a room, a floor even the

c) Wi-Fi communication method is the most popular connection method between two devices. The transfer speed is the fastest among the three communication methods as well. The range of Wi-Fi is also very large, a room, a floor even the

GERELATEERDE DOCUMENTEN