Tag Archives: protocol

LIN Protocol — One Wire Protocol for Automotive Applications

With the host of protocols available in electronics interfaces, choosing a protocol is a hard job. Some protocols are designed for long distance and reliable communication applications such as RS-485. Others are used for low cost and short range communication such as I2C, and so on.

The backbone car’s network is the Controller Area Network (CAN). CAN is reliable and adopted widely in automotive industry but it’s expensive to embed CAN interface in all aspects of the car’s sub-system. As a cheap alternative, today’s protocol LIN, is designed for low cost and multi-nodes automotive networks. LIN can be used to communicate with non-critical sub-systems such as: door-lock driver and window motors. Moreover, LIN is implemented to be a one wire interface.

LIN stands for Local Interconnect Network. According to the official LIN manual, the main properties of the LIN bus are:

  • single master with multiple slaves concept.
  • low cost silicon implementation based on common UART/SCI interface hardware, an equivalent in software, or as pure state machine.
  • self synchronization without a quartz or ceramics resonator in the slave nodes.
  • deterministic signal transmission with signal propagation time computable in advance low cost single-wire implementation.
  • speed up to 20 kbit/s.
  • signal based application interaction.

The LIN topology consists of one master and several slaves. The master provides the header which consists of a break and sync pattern (0x55) followed by an identifier.

The 0x55 Synch byte helps the slaves to be synchronized with the master clock. All messages are initiated by the master with unique ID; A slave will reply according to a given message identifier.

The identifier specifies the frame type which can be one of the following:

  • Unconditional frame
  • Event triggered frame
  • Sporadic frame
  • Diagnostic frames
  • User-defined frames

The nodes are typically microcontrollers, but as LIN is designed for automotive applications in the first place, some specialized transceivers can be added to the nodes such as Melexis MLX80030 which is basically a level shifter with some add-ons like low drop voltage regulator with some protection features since the available supply voltage in cars are mostly a spiky 12v.

Note: From the schematic above you may see that the MLX80031 has split the one wire (LIN BUS) to RX and TX for the microcontroller.

When it comes to software development, there is a standard API for LIN bus (slave and master) implemented in C language.

To know more about LIN protocol please refer to Hackaday article and to the official LIN manual.

ARM CoreSight SoC-600, The Future of Debug

Debugging is an important part of the design process that is necessary to identify and fix errors. Over the decades, debug tools had evolved providing easier and simpler solutions. Today, ARM introduces CoreSight SoC-600 as the next-generation debug and trace tool that speeds up finding the root of the problem, with less iterations and lower risks.

Addressing the requirements of the increasingly connected world characterized by faster product-development cycles, this new technology offers debug and trace over functional interfaces such as USB, PCIe or wireless, reducing the need for hardware debug probes while increasing data throughput.

Key benefits include:

  • Debug access available and accessible throughout the product lifecycle, from production and manufacture, to remote access in the field
  • Remote debug access (e.g. via Ethernet or wirelessly)
  • Increased data bandwidth for improved system visibility
  • Multiple debug agents can simultaneously access debug memory space (e.g. for concurrent external and self-hosted access)
  • Interface peripherals (such as USB and PCIe) share a common access to APs, together with any existing JTAG DP or resident software
  • Self-hosted, cross CPU debug access

CoreSight SoC-600 comes with a new Debug Access Port (DAP) architecture. It introduces standard APB connectivity between Debug Port (DP) and Access Port (AP), making it possible to have multiple DPs connected to multiple APs.

CoreSight SoC-600 also includes an enhanced Embedded Trace Router (ETR) functionality. In additional to removing the need for a separate Trace Memory Controller (TMC) license, enhancements to the Embedded Trace Router (ETR) configuration make it possible to supply a trace interface with four times the amount of bandwidth previously possible.

There are two approaches to host the link protocol when building a CoreSight SoC-600-based system:

  1. Protocol on dedicated CPU: this approach comes at a cost of additional dedicated resources, however, it is the least intrusive approach and provides bare metal debug capabilities.
  2. Protocol on main CPU: this approach does not require additional hardware, yet it is invasive and relies on CPU not being halted.

For further information and details about SoC-600 you can visit the official page, and the official article on ARM website.

Brillo, the new OS for IoT by Google

Google had launched Brillo, a new Android based OS used for embedded development – in particular for low-power, IoT devices. Brillo brings the simplicity and speed of software development to hardware for IoT with an embedded OS, core services, developer kit, and developer console.

google-brillo-operating-system-for-internet-of-things

Brillo works in conjunction with Weave, an open, standardized communications protocol that supports various discovery, provisioning, and authentication functions. Weave enables device setup, phone-to-device-to-cloud communication, and user interaction from mobile devices and the web. The chief benefit is allowing a “standardized” way for consumers to set up devices.

Brillo Structure
Brillo Structure

The big challenge  is unifying and facilitating the communication among the estimated 200 billion smart devices expected by 2020. Whether you’re looking to build a simple DIY project or implement an enterprise scale m2m (machine to machine) project, Google’s new tools will be a big help.  Fortunately, Brillo appears pretty easy for developers who are already familiar with Android.

Check this video by Google about Brillo and its features, and you can watch another video about Weave

Brillo supports a trio of ARM, Intel, and MIPS hacker SBCs (Single Board Computers) called “ made for Brillo” hardware kits. One of these kits is The Edison kit for Brillo by Intel, that includes an Edison IoT module plugged into a baseboard that offers convenient, Arduino-style expansion compatibility.

Edison for Brillo SBC
Edison for Brillo SBC

One of the great things about Brillo that the security issue with IoT applications is solved by choosing to use secure boot and signed over-the-air updates and providing timely patches at the OS level.

If you are interested in developing Brillo itself you can check the Brillo developer portal where code, development tools, and documentation for the Android-based Brillo embedded OS for Internet of Things devices can obtained. You should ask for an invitation then when you gain access you will get everything needed for your next project.
A high introduction was presented by Intel in the Open IoT Summit  in April 2016, you can check it here.
As Intel, UN and IDC mentioned in their joint report that there will be an average of 26 smart devices for every human in just 5 years, we can predict a rapid growing development and enhancements for IoT systems, devices and protocols.

Basics of the I2C Communication Protocol

Introduction-to-I2C-Single-Master-Single-Slave

circuitbasics.com talks about the I2C protocol, it’s use and it’s advantages and disadvantages.

I2C combines the best features of SPI and UARTs. With I2C, you can connect multiple slaves to a single master (like SPI) and you can have multiple masters controlling single, or multiple slaves. This is really useful when you want to have more than one microcontrollers logging data to a single memory card or displaying text to a single LCD.

Basics of the I2C Communication Protocol – [Link]

Basics of the SPI Communication Protocol

Introduction-to-SPI-Multiple-Slave-Configuration-Separate-Slave-Select

circuitbasics.com talks about the SPI serial communications protocol:

One unique benefit of SPI is the fact that data can be transferred without interruption. Any number of bits can be sent or received in a continuous stream. With I2C and UART, data is sent in packets, limited to a specific number of bits. Start and stop conditions define the beginning and end of each packet, so the data is interrupted during transmission.

Basics of the SPI Communication Protocol – [Link]