Follow our illustrated blog on Embedded Software Architecture

How to build a hybrid solar/wind energy harvester?

The embedded hierarchy — Part 1

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)

Good programming skills is not the only quality a software engineer needs to have in order to write extendable, reusable and manageable software. Understanding the domain is equally important because it enables you to build good abstractions, and to do correct configuration management (version control). This is no different in embedded software: creating or even just using an embedded software platform, requires a solid foundation in embedded hardware (the domain).

Although hardware comes in many forms, this simple hierarchy is sufficient for most embedded software projects:

embedded hw hierarchy

The hardware board is the root node and our starting point. Here is an example of a convenient and affortable low-end prototyping board called ‘STM32VLDISCOVERY’:

board_stm32vl_discovery

We will refer to this board later on.

MCU

If the board is capable of running software then a microcontroller unit (MCU) is a likely choice (other possibilities are ASICs/FPGAs with softcores, DSPs, SoC etc.). Here are some well-known MCU vendors:

Core

Every MCU integrates a core (e.g. ARM core, Power Architecture etc.) and a collection of peripheral controllers such as ETH (network, ethernet) controllers, SPI, I2C etc. MCU pins typically support multiple ‘multiplex’ functions of which GPIO is default.

The core of the aforementioned STM32F100RBT6B is an ARM Cortex-M3.

MCU families

It is important to mention that MCUs are grouped in families (or series). Family members have similar characteristics (e.g. same memory map, same data sheet) but different features (e.g. more CAN ports, less NOR flash etc.). Essentially, an MCU family re-uses the same hardware blocks.

Examples are:

STM32F100_line_LN775

More pins = more available hardware blocks = more (possible) application functions. Not unexpected: ROM and RAM size increases with the number of pins.

Electronic components

Around the MCU, an embedded board is full of electronic components. Following Wikipedia’s file, they can be classified in three main categories:

  • active components
  • passive components
  • electromechanical

A comprehensive overview of these components can be found here. We just highlight the components that might require a software device driver (and as such are very important :-)).

Active components

Most important category. Includes:

Digital ICs such as EEPROMs, SPI/I2C controller chips (to read sensor, to drive motors etc.), FPGAs etc.

EEPROM

Display technologies e.g. LCD.

Passive components

Resistors, capacitors etc. are not really of relevance (except if you want an in-depth understanding of a schematic). Though, it is interesting to know what a voltage divider is.

Electromechanical components

Switches are quite common (typically a GPIO input). STM32VLDISCOVERY has two switches (buttons).

And of course the crystal, heartbeat of your device (while the MCU is the brain). Clocks are very important. They are used to trigger work (digital ICs) and for synchronization/communication (e.g. bit passing) between ICs. The datasheet of the MCU of your choice will tell you at which clock frequency a peripheral runs, and you have to take that into account.

STM32VLDISCOVERY has a 24MHz crystal (note that the MCU can boost this frequency with a PLL).

But how to reflect this embedded hardware hierarchy in our software?

embedded sw platform

This will be explained in Part2.

 

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Share
About rtos.be

rtos.be is a joined initiative from Gert Boddaert and Pieter Beyens.
More info: about us, our mission, contact us.

Speak Your Mind

*