Question

In: Electrical Engineering

1.give some examples about I/O components in an embedded system 2.Describe hardware components for a mini...

1.give some examples about I/O components in an embedded system

2.Describe hardware components for a mini embedded system with OS

3.What are embedded system basic requirements?

4.What is ARM processor architecture?

Solutions

Expert Solution

Embedded system is defined as a way of working, performing or organizing one or many tasks according to a fixed set of rules (or) an arrangement in which all the units assemble and work together according to the program or plan. Examples of embedded systems are a watch and a washing machine.

An embedded system is a system that has software embedded in computer hardware. It makes a system dedicated to a specific part of an application or product of a larger system. Depending on the application, the embedded system may be programmable or non-programmable.

Examples of embedded systems include various products such as washing machines, microwave ovens, cameras, printers and automobiles. They use microprocessors and microcontrollers as well as specially designed processors such as digital signal processors (DSP).

All embedded systems include some form of input and output (I/O) operations

Examples of embedded systems built explicitly to deal with I/O devices: Cell phone, pager, and a handheld MP3 player

I/O operations are interpreted differently depending on the viewpoint taken and place different requirements on the level of understanding of the hardware details

Interfaces between a device and the main processor occur in two ways: port mapped and memory mapped

DMA controllers allows data transfer bypassing the main processor

I/O subsystems must be flexible enough to handle a wide range of I/O devices.

Uniform I/O hides device peculiarities from applications.

The I/O subsystem maintains a driver table that associates uniform I/O calls with driverspecific I/O routines.

The I/O subsystem maintains a device table and forms an association between this table and the driver table

Embedded System Hardware:

As with any electronic system, an embedded system requires a hardware platform on which it performs the operation. Embedded system hardware is built with a microprocessor or microcontroller. The embedded system hardware has elements like input output (I/O) interfaces, user interface, memory and the display. Usually, an embedded system consists of:

  • Power Supply
  • Processor
  • Memory
  • Timers
  • Serial communication ports
  • Output/Output circuits
  • System application specific circuits

How is software embedded into a system?

We need a program written in assembly or in embedded c language. And then we compile it. This compiled code converted into HEX code. This hex code is programmed or burned into the ROM of the system using some programmer.

These are the tools that are generally used in embedded system development

  • Assembler
  • Emulator
  • Debugger
  • Compiler

Requirements for Embedded Systems:

  • Performance
  • Efficiency
  • Reliability
  • Robustness
  • Safety
  • Security
  • Usability

Introduction to ARM Microcontroller

The ARM stands for Advanced RISC machine and it is a 32-bit reduced instructions set computer (RISC) microcontroller. It was first introduced by the Acron computers’ organization in 1987. The ARM is a family of the microcontroller developed by the different manufacturers such as ST microelectronics, Motorola and so on. The ARM microcontroller architecture come with a few different versions such as ARMv1, ARMv2 etc and each one has its own advantage and disadvantages.

Implementation of ARM Cortex Microcontroller

The ARM cortex microcontroller is an advanced microcontroller in the ARM family, which is developed by the ARMv7 architecture. The ARM cortex family divided into three sub-families such as;

  • ARM-Cortex Ax-series
  • ARM-Cortex Rx-series
  • ARM-Cortex Mx-series

ARM Coretex-M3 Microcontroller Architecture

The cortex-M3 ARM processor is a high performance 32-bit processor, which offers the significant benefits to the developers. The ARM architecture is a ‘Harward architecture’ which offers separate data and instruction buses for communicating with the ROM and RAM memories. It consist a 3-stage pipeline to fetch, decode and execute the instructions sequentially. The Cortex processor is a cost sensitive device which is used to reduce the processor area and has extensive improving interrupt handling and system debug capabilities.

ARM Coretex-M3 Microcontroller Architecture

The cortex-M3 arm processors are implemented by THUMB instruction set based on THUMB-2 technology, therefore, ensures high code density and reduce the program memory requirement. The cortex-m3 instruction set provides the excellent performance due to modern 32-bit architecture. The ARM processor core-m3 is closely integrated to Nested Vector Interrupt Controller (NVIC) to provide the good interrupt performance.

Additional Features of the Cortex-M3 Processor

It is a RISC Controller

  • 32-bit high performance CPU
  • 3-stage pipeline and compact one

It has THUMB-2 technology

  • Optimal merges of 16/32 bit instructions
  • High performance

It supports tools and RTOS and It has core Sight debug and trace

  • JTAG or 2-pin serial wire debug connection
  • Support for multiple processors

Low power Modes

  • It supports sleep modes
  • Control the software
  • Multiple power domains

Nested vectored interrupt controller (NVIC)

  • Low latency, low jitter interrupts response
  • No need for assembly programming

ARM Microcontroller Register Modes

An ARM micrcontroller is a load store reducing instruction set computer architecture means the core cannot directly operate with the memory. The data operations must be done by the registers and the information is stored in the memory by an address. The ARM cortex-M3 consists of 37 register sets wherein 31 are general purpose registers and 6 are status registers. The ARM uses seven processing modes to run the user task.

  • USER Mode
  • FIQ Mode
  • IRQ Mode
  • SVC Mode
  • UNDEFINED Mode
  • ABORT Mode
  • Monitor Mode

ARM Microcontroller Register Modes

USER Mode: The user mode is a normal mode, which has the least number of registers. It doesn’t have SPSR and has limited access to the CPSR.

FIQ and IRQ: The FIQ and IRQ are the two interrupt caused modes of the CPU. The FIQ is processing interrupt and IRQ is standard interrupt. The FIQ mode has additional five banked registers to provide more flexibility and high performance when critical interrupts are handled.

SVC Mode: The Supervisor mode is the software interrupt mode of the processor to start up or reset.

Undefined Mode: The Undefined mode traps when illegal instructions are executed. The ARM core consists of 32-bit data bus and faster data flow.

THUMB Mode: In THUMB mode 32-bit data is divided into 16-bits and increases the processing speed.

THUMB-2 Mode: In THUMB-2 mode the instructions can be either 16-bit or 32-bit and it increases the performance of the ARM cortex –M3 microcontroller. The ARM cortex-m3 microcontroller uses only THUMB-2 instructions.

Some of the registers are reserved in each mode for the specific use of the core. The reserved registers are

  • Stack Pointer (SP).
  • Link Register (LR).
  • Program Counter (PC).
  • Current Program Status Register (CPSR).
  • Saved Program Status Register (SPSR).

The reserved registers are used for specific functions. The SPSR and CPSR contain the status control bits which are used to store the temporary data. The SPSR and CPSR register have some properties that are defined operating modes, Interrupt enable or disable flags and ALU status flag. The ARM core operates in two states 32-bit state or THUMBS state.

ARM-Cortex Microcontroller Programming

In the present days, the microcontroller vendors are offering 32-bit microcontrollers based on ARM cortex-m3 architecture. Many embedded system developers are starting to use these 32-bit microcontrollers for their projects. The ARM microcontrollers supports for both low-level and high level programming languages. Some of the traditional microcontroller architectures are made with many limitations therefore, difficult to use the high level programming language.

ARM-Cortex Microcontroller Programming

For example the memory size is limited and performance might not be sufficient. The ARM microcontrollers runs at 100Mhz frequency and higher performance, therefore it supports the higher level languages. The ARM microcontroller is programmed with different IDES such as keiluvision3, keiluvision4, coocox and so on. A 8-bit microcontroller use 8-bit instructions and the ARM cortex-M uses a 32-instructions.

The ARM Microcontroller Assembly Level Programming:

The ARM cortex microcontroller is a 32-bit microcontroller therefore all instructions are 32-bit long which is executed in a single cycle. It consists of an instruction set to perform the arithmetic, logical and boolean operations. The ARM is a load-store architecture, then instructions are executed conditionally.

Syntax: Load a // a obtained the value from the place called a //
ADD12 // 12 is added to the load value a //
Store a // final value is stored in the variable a//

The assembly language programming is developed by the mnemonics such as ADD, SUB, MUL so on but for ARM programming, some extra instructions added such as ADCNES and SWINE, etc.

EX: 1. ORG 0000h
MOV r1, #10
MOV r2, #15
ADD r3, r2, r1 // r3=r2+r1 and the final value stored in r3 register//

2.ORG 0000h
MOV r1, #10
MOV r2, #15
SUB r3, r2, r1 // r3=r2-r1 and the final value stored in r3 register//

The ARM Coretex-M3 Microcontroller Embedded C Level Programming:

WAP to toggle the single LED through Embedded C language using ARM cortex microcontroller.

#include “stm32f10x_gpio.h”
#include “stm32f10x_rcc.h”

GPIO_InitTypeDef GPIO_InitStructure;
int i;
#define LED_PORT GPIOB
Void binky();
Void main()
{
Void binky();
}

void binky(void)
{
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE); //enable the PORTB pins//
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;   //set the port frequency//
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;   //set the PORTB in output//
GPIO_InitStructure.GPIO_Pin   = GPIO_Pin_All ; //enabled all PORTB pins//
GPIO_Init(GPIOB, &GPIO_InitStructure); //initialize the PORTB pins//

while(1){
GPIO_WriteBit(LED_PORT,GPIO_Pin_8,Bit_SET);
for (i=0;i<1000000;i++);
GPIO_WriteBit(LED_PORT,GPIO_Pin_8,Bit_RESET);
for (i=0;i<1000000;i++);

GPIO_WriteBit(LED_PORT,GPIO_Pin_9,Bit_SET);
for (i=0;i<1000000;i++);
GPIO_WriteBit(LED_PORT,GPIO_Pin_9,Bit_RESET);
for (i=0;i<1000000;i++);

GPIO_WriteBit(LED_PORT,GPIO_Pin_10,Bit_SET);
for (i=0;i<1000000;i++);
GPIO_WriteBit(LED_PORT,GPIO_Pin_10,Bit_RESET);
for (i=0;i<1000000;i++);
}

}

This is about the ARM microcontroller architecture with neat sketches and arm programing with example programs.


Related Solutions

1. Give around 7 examples of where you would find embedded computers. These can be at...
1. Give around 7 examples of where you would find embedded computers. These can be at home or at school even work. 2. Say you are a CIO of some sort of firm, what factors would you consider when you are selecting secondary storage media for your companys records? 3. Which is faster and why? CPU to Cache communication or CPU to RAM communication
What are the components of the nursing health history and give 2 specific examples of the...
What are the components of the nursing health history and give 2 specific examples of the information that could be obtained during that portion of the interview.
Explain about teleology and deontology theories and give some examples
Explain about teleology and deontology theories and give some examples
1. Please describe and give examples of some claims that may be settled with something other...
1. Please describe and give examples of some claims that may be settled with something other than cash 2. Define and explain what you understand by the depreciation expense and accumulated depreciation. On which statement are they reflected?
1. Describe the difference between a unilateral and multilateral trade agreement. 2. Give 2 examples of...
1. Describe the difference between a unilateral and multilateral trade agreement. 2. Give 2 examples of a multilateral trade approach. 3. How is NAFTA classified ?  
1. Describe what is meant by a prior period adjustment, and give 2 examples. 2. List...
1. Describe what is meant by a prior period adjustment, and give 2 examples. 2. List and explain the advantages of a corporation. 3. List and explain the disadvantages of a corporation.
1. What is cybercrime? What are some examples of it? 2. What is malware? Describe and...
1. What is cybercrime? What are some examples of it? 2. What is malware? Describe and differentiate between viruses, worms, Trojan horses, logic bombs, time bombs, spyware, etc. 3. What are security patches and antivirus software? How do they fit in to modern methods of combatting malware? 4. What are hacking, Webjacking, and DoS attacks? The essay should be at least 300 words and not copied, the words should be self written.
Describe the process of priming. Give examples of mood congruence and context effects and describe some...
Describe the process of priming. Give examples of mood congruence and context effects and describe some common sources of retrieval cues.
Problem 2. Interrupt-driven I/O (20 pt.) Consider a system employing interrupt-driven I/O for a particular device...
Problem 2. Interrupt-driven I/O (20 pt.) Consider a system employing interrupt-driven I/O for a particular device that transfers data at an average of 2000 bytes/sec on a continuous basis. a. Assume that interrupt processing takes about 200 usec (i.e., the time to jump to the interrupt service routine (ISR), execute it, and return to the main program). Determine what fraction of processor time is consumed by this I/O device if it interrupts for every byte. b. Now assume that the...
1. Describe the Pharmacovigilance system. 2. Who are the key stakeholders in pharmacovigilance system? 3.Give the...
1. Describe the Pharmacovigilance system. 2. Who are the key stakeholders in pharmacovigilance system? 3.Give the responsibility and function of stakeholders. 4. Enumerate the guidelines of good pharmacovigilance practice. 5. What is the correlation between pharmacovigilance and antimicrobial stewardship program?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT