An embedded system is one with computing hardware that has software “embedded” in it as one of its core components. We are surrounded by embedded systems that add luxury to our lives like mobile handsets, washing machines, microwaves, ATM machines, and air conditioners, to name just a few. Because of certain application requirements, engineers have to approach embedded design in a different way than other types of designs.
The following offers a brief step-by-step approach to follow while designing an embedded system:
1. Proposal: – An innovative idea or system that makes life easier and/or reduces the amount of human effort required to complete a task.
2. Definition: – Next, the whole system needs to be designed, including what it will do under all possible sets of input conditions. This definition is perhaps the most critical part, as any error here will affect the working of whole system.
I. I/O Considerations: – Defines that for a particular input, what the output of the system will be, considering the system as a black box.
II. Mathematical Modeling: – Design the algorithm for the system to work as desired.
III. Functional Modeling: – Design the functions of the system which will accept input and produce the desired output.
3. Technology Selection: – Based on the above points, designers then review available technology and select which devices will fulfill all the requirements while balancing efficiency, cost, and time-to-market.
4. Integration & PCB design: – List all the components, which you need to implement your functions and design their placement on the PCB. Traces and all other paths must have the least possible electromagnetic interference (EMI) and should be free from various errors. While designing the PCB, special attention must be given to the ground as well as all the components on the PCB that use ground.
5. Firmware Development & Debugging: – Since hardware needs instructions to execute the way we want, we need to write the code for every component used by the hardware. This is exactly what is done by the firmware i.e. the application code. Firmware should be of minimum complexity. Moreover, as we write the code, we face many errors or bugs and for this we need a proper debugging protocol.
6. Testing: Debugging tests the piece of code but in testing we test the whole system i.e. hardware as well as the software that drives that hardware.
7. Documentation: Anyone who accesses your complete application should never ask you “what does this mean?” or “How does this thing work?” and for this we need to document everything.
Problems with Current Design Processes:
While developing embedded applications, we need to understand different chips, their capabilities, and their complex architectures before creating the system design flow. After this, we need an application that provides functionality to our product and its components; and for this, we have to write the code. But while writing the code, system requirements keep on changing, and designers need tools that support for different debugging protocols. We may not are not able to reuse our code and we want to encapsulate multiple features into a single system. With all these issues, embedded system design demands consideration of factors such as Price, Performance, Reduce time to market, Size, Power dissipation, Maintainability, Safety, Memory etc of the complete system. Also, developers of embedded system wants to implement programmable analog and digital peripheral on a single chip, thus, developing system on chips (SOCs) is a highly tedious task for developers.
As the rising complexity in embedded systems mandates the need for programmability in almost everything circumstance, designers need tools which can handle this painful job for us, and provide a user-friendly environment in which to develop the application. Even though we have some market based SOCs aligned tools, we are not completely aware of those tool’s functionalities. Also, the tool must be able to utilize the features of the product to its maximum potential. To illustrate this, we can take an example of chips that come with complex architecture, combining almost all the analog and digital peripherals with programmability on a single chip. We may not find it easy to read and understand the associated configuration register and other low level aspects to use the device. This is where an intuitive system design tool that hides lower level information and concentrates more on the system application comes in.
In short, we need a tool that reduces our time to market and takes care of all the developmental considerations that too intuitively and efficiently. Also it should be cost-effective by allowing our project to migrate from one chip to another depending upon the change in the requirement.
PSoC Creator:
Programmable system on chip (PSoC) manufacturers have recognized this need for developers to have a complete system on a single chip which has both digital and analog functionality and that too is completely programmable. In order to develop the embedded application that works on these chips and provide solution to all the stated problems, Cypress Semiconductor offers PSoC Creator. With its unique schematic-based format, PSoC Creator allows designers to develop applications without having to manually mange the architecture or configuration registers. Now, what exactly we have to do is to think of the design and just draw that design by dragging the components either from the Cypress component library or from our own component library and then drop them to design schematic. It is just like drawing the block diagram of a system, independent of the device being used. This is possible because the revolutionary graphical design editor enables a unique powerful hardware/software co-design environment. Note that this tool is not only about combining software development environment with an intuitive graphical design editor, but also enabling immediate testing of new ideas, rapid response to hardware changes, creating libraries of sharable design elements, custom peripherals, error-free interaction with the peripherals on-chip, and complete design realization using the built-in debugger.
PSoC Creator
PSoC Creator combines C-based development flow with automatically generated component APIs in your design. It allows seamless migration from one device, say 8-bit to 32-bit, if requirements change at later stage. While migrating from one device family to other, we do not need to think about the memory map, mnemonics etc. One unique advantage here is that the design can be developed without keeping in mind the target chip family since designers can change the device any time during the development cycle without modifying anything in the project.
Now let us take an example project to clearly understand the functionality and usability of PSoC Creator while developing embedded application in real time environment. The example project shows how to control the LED intensity using Pulse Width Modulation (PWM).
Schematic view, which is formed after dragging and dropping the required components i.e. PWM, Input Pin, Output Pin and Clock from component window. Thus, accessing the component is simplified. Moreover, developers can create their own components. Creating new components is as easy as drawing the design and having the tool to generate a symbol for it. Place this component into a library and it is ready for reuse. Any design project that references the library will see the new component in the catalog and can use it just like any other in-built component. By leveraging design reuse within the PSoC Creator, developers can quickly build libraries of designs so that with each new project they take on, the focus is always on the innovation and not the legacy functionality.
Component configuration wizard which appears by right-clicking the component. The wizard allows us to set the parameters of the component. For example, in the case of a PWM, we can set the parameters such as number of bits, period, compare value etc. Similarly, each and every component has its own parameters, which we can set according to the application. Also there is a component datasheet associated with each component, which describes the functionality, parameters, electrical specifications, APIs etc of the component. Similarly we also have APIs and datasheet for custom component and we can configure them the same way we configure the built-in component.
Now we need to configure the mapping of the pins used in application and the pin diagram (shown in Figure 4) changes according to that configuration. On the bottom of the diagram there are tabs for various configurations such as clocks, DMA, interrupts, system etc. The built-in configuration tool maps the design into the device and calculates the clock setup and routing automatically which makes the task very easy for the developers.
Where we write application code to perform the required functionality. It also shows the breakpoint analysis which helps in debugging by providing the value of the variables, register, memory etc. at runtime. In the code we call the built in APIs to communicate with the components at runtime. The APIs reduce coding errors and ensure correct interaction with the peripherals so the whole software development is faster, easier and less error prone.
Debugging is the most important phase of the product development lifecycle. When it comes to debugging the application, PSoC Creator has all the modern features of a cross-debugger plus a unique peripheral debug window that shows the status of the internals of the on-chip components. It also supports JTAG and SWD debugging modes. Other useful features include the “hover” function that shows us the type, address, and value of any variable it hovers over with the mouse. In addition, developers are able to design a complete project without bothering much about the registers, memory, debugging protocols, power dissipation, chip selection, function calling etc.
Since designing embedded system itself is a complex process, putting both analog and digital functionality on the same chip makes the job very tedious. Moreover, developers also want easy migration of design between chips at any stage of design, maximum utilization of the available resources intuitively. We then studied a software tool PSoC Creator that solves these problems with its unique features such as API support for all the components, flexible debugging support, custom and reusable component creation as well as modifying existing library component based upon application requirement etc. In short, if we want to make some digital blocks work as timer, then Counter, then DAC according to requirement that too dynamically i.e. at runtime, then PSoC Creator is the tool for us as it provides Universal Digital Block (UDBs) that can be configured the way we want.
Source:http://www.eetimes.com/design/industrial-control/4238084/Seven-steps-to-embedded-designs-made-easier-with-PSoC-Creator