Elektor 2101IND-EN
Elektor 2101IND-EN
Elektor 2101IND-EN
com
EMBEDDED
Electr
o
challe nics in
ng
times ing
TOO QUICK
TO CODE
and Too Slow
to Test?
37
SECURE BOOT
SOLUTION FOR
RASPBERRY PI
Retrofit Security at a
Reasonable Price
20
INTERVIEW
embedded world
Director Benedikt
Weyerer on the
Digital Events
12 60 27 10
The Elektor web archive from 1974! An online Elektor LABs account, with
6x Elektor magazine (Print) access to more than 1000 Gerber files
9x Digital (PDF) including and a direct line of communication with
Elektor Industry (EN) magazine our experts!
A 10% discount in our web shop and Bring a project to publication or even sell
exclusive offers it in our shop
Elektor’s annual DVD-ROM
www.elektor.com/member
Foreword
By Jens Nickel
Editor-in-Chief
Digital Opportunities
Even in this foreword, I cannot avoid mentioning the troublesome have to be mutually exclusive. A digital trade show in addition
virus. The COVID-19 crisis still has a tight grip on the electronics to a “real” exhibition can help you get the information you need
sector. And it primarily affects those who are on the front line faster and improve your own network with the right contacts.
throughout the industry: product managers, marketing specia-
lists, buyers. Anyone who offers platforms for the exchange of During his visit to embedded world DIGITAL, my colleague
information — for example, trade fair organizers and the trade Mathias Claußen discovered many interesting products, gathe-
magazines — also face an uphill battle. Visible signs were the red information and used the opportunity to video chat with
closed doors of the Nuremberg trade fair, where embedded world other engineers. His (by no means complete) overview of new
would normally have taken place. However, like Messe München controllers, software tools and more can be found on page 6. The
at electronica, Nürnberg Messe also took the opportunity to move MAX78000 presented there — a SoC with an integrated Cortex-M4
the important event to the Internet. The whole thing is not just arm, a RISC-V core, and an AI accelerator — won the trade fair’s
born of necessity. Such virtual events are also test balloons for “embedded award.” My colleagues in the Elektor Lab have already
the trade fairs. The experiences gained can help to develop new worked with the MAX78000. In fact, the MAX78000 AI Design
business opportunities. (Read the interview with Benedikt Weyerer Contest is now underway. Head over to www.elektormagazine.
on page 10.) In the foreseeable future, nothing will be able to com/ai-contest-max78000 to learn more about it.
replace an event where people meet in person. But the two don’t 210204-01
www.we-online.com/webinars
Focus
EMBEDDED
&TOOLS
embedded world DIGITAL Special
Interview
Edition 1/2021 including productronica
Embedded & Tools (Munich), electronica (Munich),
© 2021 and Embedded World
Matthew Stewart
www.elektormagazine.com (Nuremberg).
62
redaktion@elektor.de Copyright Notice
The content of this magazine
Editorial Team is for educational use only. All
C. J. Abate, Stuart Cording, drawings, photographs, printed
Robert van der Zwan circuit board layouts, and
article texts published in this
Advertising & Sponsoring magazine (other than third-party
30
Printer this publication is stored in a
Pijper Media, Stettinweg 15, retrieval system of any nature.
9723 HD Groningen Patent protection may exist
in respect of circuits, devices,
Mission components etc. described in
Next Edition
Elektor Industry offers this magazine. The Publisher
electronics engineers, does not accept responsibility
innovators, and start-up for failing to identify such
companies essential information patent(s) or other protection.
Edition 2/2021 of Elektor Industry magazine will cover and insights into the latest The Publisher disclaims any
sensors as well as equipment and methods for test and products, research and responsibility for the safe and
measurement, with contributions from companies, industry intelligence from the industry. proper function of reader-
specialists, Elektor editors, and free-lance authors. assembled projects based upon
Distribution and Supply or from schematics, descriptions
The issue will be available to Elektor GOLD Members in print, Elektor Industry appears or information published in or in
and Elektor GREEN and GOLD Members as a PDF download synchronously in English and relation with Elektor Industry.
at www.elektormagazine.com. German and is supplied free to
Elektor Magazine Gold members © Elektor International Media b.v.
Energy Harvesting
data over a single pair of twisted wires. By eliminating the need for
additional protocols, gateways and cables for higher-bandwidth
communications, designers can simplify network management
while improving system control and interoperability in long-dis-
tance applications.
Semtech’s LoRa Edge LR1110 Asset Management
Platform is an ultra-low-power platform that integrates
a long-range LoRa transceiver, multi-constellation
scanner and passive Wi-Fi AP MAC address scanner RockTouch show their first full round TFT with touch for outdoor
targeting asset management applications. The LR1110 and automotive application. Build for outdoor and harsh environ-
solution utilizes Semtech’s LoRa Cloud geolocation capabilities, ment, with 3-mm Cover Glass it can operate from -30° to +85°C.
to significantly reduce power consumption by determining asset With a resolution of 1540×1540 pixel at 9.5 inch, this offers new
location in a Cloud-based solver. design possibilities for upcoming hardware designs.
210193-01
WEB LINKS
[1] Discussion on Teensy using a i.MX RT1170: https://forum.pjrc.com/threads/57842-Future-Teensy-features-amp-pinout
[2] C. Valens, “AI at the Edge: Get Started with the Maxim Integrated MAX78000FTHR,” 3/5/2021, ElektorMagazine.com :
www.elektormagazine.com/articles/ai-edge-get-started-maxim-max78000fthr
[3] Microsoft Azure RTOS on GitHub: https://github.com/azure-rtos/threadx/
[4] Microsoft Azure RTOS licensed devices: https://github.com/azure-rtos/threadx/blob/master/LICENSED-HARDWARE.txt
Elektor: Please tell us a bit about embedded world this year. Elektor: How was the transition from live to digital received?
Weyerer: embedded world 2021 DIGITAL provided the embedded Weyerer: The feedback we’ve received in numerous talks with
community with its own platform to connect. This year the event was customers is that the market needs embedded world — especially
completely virtual and took the place of embedded world in Nurem- in times of a pandemic. The virtual format offered new opportunities
berg. Matchmaking and networking in the community was a priority from which exhibitors and participants benefit. For example, we offered
on the digital platform, and beginning March 1, we offered five days special time slots in the agenda for participants located in the USA
for this instead of the usual three. and China to accommodate the different time zones. This most likely
would not have been possible at the in-person event.
Together with the embedded world Conference DIGITAL and the
electronic displays Conference DIGITAL, the virtual exhibition presented Elektor: The charisma of the staff at an exhibition stand — and, of
the entire range of topics related to the development of embedded course, the presentation of the stand — can massively determine how
systems — from components, modules and complete systems to operat- many walk-in customers approach the company. What could made
ing systems, hardware, software and services. Around 300 exhibi- up for this in 2021?
tors, including leading industry giants as well as innovative start-ups,
presented themselves on the digital platform where the virtual exhibi- Weyerer: With four exhibitor packages, we offered tailored solutions
tion and top-class conferences complemented each other perfectly. that met the different requirements of participating companies. The
key to a successful participation, however, is active involvement before,
In addition to company and product presentations, participants could during, and after the event — even if the event is held virtually. Our
attend expert talks in the Exhibitor’s Forum. The highlights of the trade participation options, such as presentations in the Exhibitor’s Forum,
fair included expert panels on the topics of “Embedded Artificial Intelli- the matchmaking function, as well as various lead generation options,
gence,” “Safety and Security,” “Embedded Vision,” “Connectivity in IoT,” offered the best conditions for this.
and diversity as a success factor for innovations. The accompanying
conferences provided a first-class lecture program, top keynotes and
renowned speakers.
Elektor: Now embedded world 2021 has come to an end. How did Weyerer: We received a great deal of positive feedback for embed-
it go? How do you feel? ded world 2021 DIGITAL; however, we were also frequently told that if
conditions permit, the industry needs a place for personal exchange.
Weyerer: 301 exhibitors and more than 13,400 trade visitors used the How a face-to-face event will be received will, of course, very much
platform to exchange information about trends, products and solutions. depend on the conditions prevailing at the time. We are optimistic that
embedded world DIGITAL has thus underlined the importance of the these will allow for an on-site event in a year’s time.
event for the embedded community — especially in these special times.
I am very pleased that embedded world DIGITAL was so well received Elektor: The embedded awards were presented for the 17th time.
in the industry. For us, this is both a confirmation and an incentive. Who were the big winners this year?
Elektor: Are there any lessons learned that you were able to draw Weyerer: This year, there were two winners who convinced the jury
from embedded world 2021? of experts with their outstanding innovative performance: The embed-
ded award went to Maxim Integrated with its MAX78000 product,
Weyerer: For starters, the fact that the industry was so willing to while the embedded Start-up award went to Kudan for their Kudan
use the previously unknown digital format for knowledge transfer. Visual SLAM software.
Of course, we did everything we could; however, no one could have
predicted this with any certainty because there simply was no prior Elektor: Before embedded world 2021 we asked you what you
experience. We are therefore all the more pleased that the program thought about the future of in-person trade fairs. What is your impres-
and formats offered were so well received. We also realized, however, sion after the digital event?
that a virtual event cannot function the same way as an on-site event.
Exhibitors’ sales and marketing teams face different challenges when Weyerer: embedded world 2021 DIGITAL has shown us that it is
it comes to online communication and individual participants must also possible to transfer knowledge and connect embedded experts
use a different approach to planning their “trade fair visit.” Participants from all over the world using a digital format. Preparing such an event,
are required to actively use the communication tools to get the most however, requires that everyone involved adapts their way of thinking.
out of a trade fair visit. In my opinion, the most difficult thing is to implement characteris-
tic elements that a trade fair experience offers. Personal encounters,
Elektor: Were you able to mobilize visitors from non-EU countries constructive interaction in technical discussions at trade fair booths
because of the fact that it was 100% online only? or the inspiration that visitors experience during a spontaneous stop
at an exhibitor’s booth can only be offered by live events. So, let’s look
Weyerer: Overall, we were pleased to see a large number of inter- forward to embedded world 2022 in Nuremberg!
national participants. The share was higher than at the already very 210215-01
international event in Nuremberg. embedded world DIGITAL welcomed
participants registered from more than 100 countries, including a large
proportion from the USA and Asia.
Elektor: More than 96% of trade fair visitors were satisfied with the
embedded world trade fair in 2019 and around 97% of trade visitors WEB LINK
said they would also like to visit the trade fair next year. What is the
status after this very uncertain year? [1] embedded world Website: www.embedded-world.de/en
Hardware for the evaluation Figure 2: Both IoT WA Development Boards unboxed.
boards
The power section features an MCP73871
Li-Ion/LiPo charging IC with power path
capabilities supported by an MIC33050
buck converter with integrated inductor.
This set of ICs itself is a nice combination, as
it provides charging capabilities of a lithium
cell with 4.2 V cell voltage (be careful to use
suitable cells) and a DC/DC converter that
can deliver up to 600 mA current.
Also, note that the charging IC’s power
path works as an ideal diode, preventing
current flow from the battery back to the
USB port. But this is just the power supply.
There is more on the board that deserves
a closer look. Moving a bit to the left, we
can see two ICs and a light sensor. One is
an MCP9808 temperature sensor and the
other is an ATECC608A cryptographic Figure 3: Debugger and power section. Figure 4: The ATWINC1510.
co-processor. The latter can be used here
for securing communications between this
device and the AWS IoT Core services. The AVR one. The ATmega can be clocked up you to add additional sensors and devices
ATECC608A cryptographic co-processor to 20 MHz and offering 20 MIPS with an to the board from the range or mikroBus
is not limited to the AWS IoT Core but can enhanced set of peripherals and options compatible devices, like 3D motion detec-
be used to secure communications to with to save power. tion.For the pins and functions on the board
various cloud based services. it is enough to just flip it. The available
Finally (Figure 4) further left we can find connections are marked with their name
In the center you will find the microcon- the ATWIN1510 Wi-Fi module, enabling and pin as shown by Figure 6. For those that
troller of choice, depending on the variant. network communication. It supports are interested in more details for the boards,
The PIC24FJ128GA705 offers in this variant IEEE 802.11 b/g/n network access as single like schematics, Microchip will provide nice
128 KB of ECC Flash and 16 KB of RAM. band 2.4 GHz network controller that can crafted starting guides for both boards, not
Running at 32 MHz, this chip can achieve be accessed through SPI. The ATWINC1510 only telling you what is on those boards but
16 MIPS and is offering a nice set of periph- is more than just a Wi-FI network card; you also give you schematics and a quick-start
erals while also providing low power mode can consider it to be a network coprocessor guide on how to connect with them to AWS.
to minimize energy consumption. For that can lift the heavy task of traffic encryp-
the ATmega4808, being one of the newer tion and TCP/IP packet handling from your Preloaded software
members of the AVR family of chips, this MCU inside the ATWIN1510. For both boards, they will come with prein-
one provides 48 KB of Flash and 6 KB of stalled sample applications allowing a direct
RAM. For the peripherals present, this The connector at both sides (Figure 5) are out-of-the-box test for the AWS IoT Core
one is more an XMEGA chip than a classic mikroBus Click board connectors that allow utilizing a Microchip account. At this point
Figure 6: The backside of the IoT WA Development Board showing pin labels. What’s next?
The little button below our sensor values
will guide us through the next steps —
the first of which is setting up MPLABX
a word of warning, which is also to be found not be updated by the MCU firmware, it may (Figure 9). After the Microchip-Atmel
in the quick-start guide. Data sent to this contain outdated firmware or certificate merger, the MPLABX development environ-
account will be available to all that have information. If you have trouble connect- ment, formally dedicated to PIC develop-
the credentials, meaning in this case that ing your board to the AWS IoT core have a ment, added AVR and SAM device support.
it can be considered public. Integrating look at the textbox “Something not yet in While you do not have the look and feel of
this device into your existing networks is the manual,” as this will update all compo- an Atmel Studio (a Visual Studio-based
a straightforward task. Connect the board nents on the board to the latest version. For environment), you will love the fact that you
of your choice to your computer and a new the update, drag the downloaded .hex file to are no longer bound to Windows. Users of
mass storage drive called CURIOSITY will the drive. After you drag and drop the file Mac OS and Linux will also be able to start
appear. In the root directory it contains a on the CURIOSITY drive, the new firmware AVR-based projects on their AMD64-ca-
CLICK-ME.HTM file that can be opened in a will be flashed and the MCU will reboot. pable machines. Those of us running only
browser and guide you through the config- on a 32-bit-capable CPU or using a 32 bit
uration steps. First, we need to upgrade the Getting the device into your Wi-Fi network operating system will be out of luck with the
firmware to the latest version; otherwise, we is also just a matter of a few clicks.The latest version of MPLABX. MPLABX is based
will get into trouble configuring the Wi-Fi CLICK-ME.HTM in the root of our CURIOS- on Netbeans, a development environment
network. As you can see in Figure 7, you ITY drive allows you to enter your Wi-Fi started as an IDE for Java and over time
will be guided first to download the latest credentials and will generate a WIFI.CFG file extended to other languages and was later
firmware for your board. This update for you. This generated WIFI.CFG you can adapted by Microchip to become MPLABX.
will bring the MCU to the latest released drag and drop onto the CURIOSITY drive to At the time I write this article, version 5.45
firmware. As the onboard security chip will store the Wi-Fi credentials inside the MCU is the current release and will be used on a
#include „mcc_generated_files/
application_manager.h“
int main(void)
{
application_init();
while (1)
{
runScheduler();
}
return 0;
}
The initialisation of all components is
handled inside application_init() . This
function can be found inside the applica-
tion_manager.c where most of the high
level functions can be found. The code uses
the runScheduler() function to serve all
tasks that need to be done and coordinate
Figure 9: AVR GNU Toolchain setup.
them in a timely manner. From runSched-
uler() we have a function called timeout_
callNextCallback() that actually will
execute tasks that are due and is shown in
the following listing.
inline void
timeout_callNextCallback(void)
{
if (executeQueueHead == NULL)
return;
bool tempIE = (IEC0bits.T1IE
== 1?1:0);
IEC0bits.T1IE = 0;
timerStruct_t *callBackTimer =
executeQueueHead;
// Done, remove from list
executeQueueHead =
executeQueueHead->next;
// Mark the timer as not in use
Figure 10: MPLABX project and documentation overview.
callBackTimer->next = NULL;
if(tempIE)
{
with the Amazon Web Services. als, and also a bit more RAM (see Figure 14).
IEC0bits.T1IE = 1;
}
PIC-IoT WA Development Board Also notice that the PIC offers more break-
uint32_t reschedule
Like with the AVR, the PIC-IoT WA Applica- points in hardware for debugging your
tion must be downloaded and can be found software and data watchpoints compared = callBackTimer->
at [5]. The code can be opened in MPLABX to the AVR with a less efficient instructions callbackPtr(callBackTimer->
and has the same structure as the one for per clock than found on the AVR. If you payload);
the AVR. The tutorial works the same as want to explore a bit more of the provided // Do we have to reschedule
with the AVR one, except that the PIC offers code, you someone will likely wonder about it? If yes then add delta
a lot more Flash, some advanced peripher- the main.c as the code is really short as the to absolute for reschedule
Easy entry
With the given price point and software
support both boards offer, there is
Figure 16: Select your target.
nothing to worry about. Combined with
the well-equipped documentation and
debugging facilities, the boards offer an
easy entry into connected devices that run
on restricted power. The included lithium
battery circuit offers flexibility beyond
just the workbench, and the mikroBus
connector gives you instant access to a lot
of additional hardware for your projects.
You can stay with your preferred MCU archi-
tecture with these boards, or you can use
the chance to get used to the other side
and experience what these will offer you.
In combination with the onboard debug-
ger, provided on both boards and a cross
platform solution for all three major operat-
ing systems, this is a more than complete
solution.
200567-01
WEB LINKS
The ubiquity and simplicity of the The Raspberry Pi itself does not provide Swissbit AG
Raspberry Pi have made it very popular any support for a trusted secure boot. Thus, The company headquarters of Swissbit AG
and not just with hobbyists. Over the the average user can remove your SD card, [1] are in Switzerland and, until 2001, it was
years, and thanks to the introduction of make a copy of it, and investigate the files, part of Siemens AG. Specializing in memory
the Raspberry Pi Compute module, it has firmware, and any user data collected. To and storage products, and with production
also found its way into industrial applica- tackle this, Swissbit developed a solution facilities in Berlin, Germany, they can create
tions. However, equipment based on this that encrypts the data inside the SD card and manufacture unique storage solutions
approach has suffered from a significant and integrates the authentication infra- using their in-house design capabilities.
Achilles’ heel: the primary mass-storage structure required to offer a secure-boot Their Secure Boot Solution for Raspberry Pi
solution — namely, SD cards — lack any solution. is one such product that has resulted from
form of data protection. this unique set of capabilities.
USB Policy
Figure 7: Secure boot using a USB token. The USB Policy enables an unattended
secure boot. This works by adding a Swiss-
bit PU-50n DP USB stick as a security token
(Figure 3). The system is set up according
to [8], where the SD card and the PU-50n DP
USB stick are prepared with the same
PIN. The PU-50n DP has the same secure
firmware installed as the PS-45u DP. After
the Raspberry Pi has been booted with the
PS-45u DP SD card, a challenge-response
authentication takes place and, if the PIN
inside the PU-50n DP matches that inside
the PS-45u DP, the boot process continues.
A Raspberry Pi with this setup is shown in
Figure 7. In Figure 8, a successful boot with
an attached PU-50n DP USB stick is shown.
NET Policy
While PIN Policy and USB Policy allow
for easy security retrofitting for stand-
Figure 8: USB authentification using the PU-50n. alone devices without network access,
NET Policy is available for wired network
devices. This requires the implementa-
tion of a license server inside the network
that a Raspberry Pi with a PS-45u DP can
use to unlock the SD card. A readymade
Raspberry Pi image is provided for the
license server and can be written to a
standard 16 GB SD card. The license server
runs on Raspberry OS and features a web
interface for device configuration. The
setup process is described in [9].
After boot up, the desktop starts and a
connection can be made via a browser
to https://localhost/NetPolicyServer/. This
brings up the configuration webpage
(Figure 9). To add a device to the license
Figure 9: Net Policy Server user interface. server, the UID of the SD card you are
WEB LINKS
[1] Swissbit: https://www.swissbit.com/en/
[2] PS-45u DP “Raspberry Edition”: www.swissbit.com/en/products/security-technology/security-products/secure-boot/
[3] PS-45u DP “Raspberry Edition” 8 GB at Mouser.com: https://bit.ly/359jFpO
[4] PS-45u DP “Raspberry Edition” 32 GB at Mouser.com: https://bit.ly/3hNyAeq
[5] PU-50n USB-Stick at Mouser.com: https://bit.ly/3nht3xu
[6] PU-50n USB-Stick: www.swissbit.com/en/products/security-technology/security-products/pu-50n/
[7] Swissbit S-50u at Mouser.com: https://bit.ly/2L4xbnx
[8] Swissbit SecureBoot SDK RPi User Manual:
www.swissbit.com/files/public/data/security/raspberry-edition/Swissbit_SecureBoot_SDK_RPi_User_Manual_v2.0.pdf
[9] Swissbit NetPolicyServer User Manual:
www.swissbit.com/files/public/data/security/raspberry-edition/Swissbit_NetPolicyServer_User_Manual_v2.6.pdf
That hasn’t always been so easy. Previously, it was usually much more Figure 1: Congatec carrier board for SMARC modules.
difficult to use the latest processor technology from the Arm environ-
ment as a finished system than to implement the x86 environment.
This is because, as a result of the historically large range of individu-
ally tailored custom designs used in large quantities, the ecosystem
of system platforms is not that extensive. However, with the modular
approach based on the SMARC computer-on-modules specification,
it is now also possible to obtain standard form factors from the x86 box
PC range with ARM processors. For example, the embedded comput-
ing specialist congatec offers a 3.5-inch board that can be equipped
with modules from its SMARC 2.1 platform as required (Figure 1).
With each launch of a new SMARC module, the portfolio of possible
configurations is automatically expanded with a slight time lag. The
latest flagship processor is the new NXP i.MX 8M Plus processor
(Figure 2), which congatec will officially launch on SMARC at the
virtual Embedded World 2021 and for which the official support of
the 3.5-inch carrier is expected to be fully completed in the summer. Figure 2: Congatec SMARC module with NXP i.MX 8M Plus processor.
Attractive Features
Technical highlights of the new SMARC module with i.MX 8M Plus here is gesture-based control systems, e.g., enabling touchless login
processor are the four powerful Arm Cortex-A53 processor cores with into medical applications on intensive care computers for adjusting
the additional neural processing unit (NPU), which adds up to 2.3 TOPS the administration of infusions. In addition, the multimedia functions
of AI computational power. Thanks to the integrated image signal cover 3D/2D graphics acceleration as well as video decoding and
processor (ISP), they have been developed specifically for AI inference encoding including H.265 so that camera streams can be sent directly
and machine learning applications and can process the data of the two to the network. High resolutions are becoming increasingly import-
integrated MIPI CSI interfaces very efficiently. A key application field ant both in inspection and in monitoring systems for enabling better
evaluation of details. The NPU can help with the pre-processing so interface and extended multimedia functions for increasingly immer-
that the raw data does not overload the network. High-quality DSP for sive experiences, in low-power and mobile device areas too. Support
audio and voice functions is also interesting. Through the combination of up to three independent displays also makes the new processor
with the arithmetic logic units, user-specific speech recognition with module predestined for multidomain applications. The NXP i.MX 8M
around 40,000 different words is possible, for example. And that, unlike Plus processor platform is thus a perfect replacement for all exist-
commercial solutions such as Alexa, Google, or Siri, purely locally and ing i.MX6 applications that are getting on in years. It also scales the
completely without any cloud connection, which can be very useful SMARC-based AMD and Intel portfolio from congatec towards more
for contactless voice commands. energy-efficient, compact, and mobile solution platforms. Added to
that are mobile handheld devices and in-vehicle applications. Thanks
In addition, real-time control is possible via the Cortex-M7. And via to the camera and AI integration, the modules are also suitable for a
Gigabit Ethernet with time-sensitive networking (TSN). For the first multitude of different vision applications, for which congatec and its
time, high data security and reliability are ensured by the in-line ECC partner Basler offer extended services.
function of the processor, which can implement error correction code
based on LPDDR4 memory for up to 6 GB of capacity. The Cortex-M7 Industry 4.0 Applications With Real-Time
can also be used as a fail-safe unit, which is crucial for customer Networking
applications to be designed with fault tolerance in accordance with The new SMARC modules with processors from the i.MX8 M Plus
IEC 61508/IEC61511. If you look at this all-round service package and platform offer numerous attractive features for real-time control of
implement further application-specific functions via PCIe Gen 3 as safety-critical applications and networked Industry 4.0 systems
well as 2x USB 3.0 and 2x SDIO, you have a highly reliable and robust such as robots or autonomous logistics vehicles. These begin with
Linux, Android, or FreeRTOS platform, which, depending on the variant, the integrated watchdog, which can be used for failure detection in
can even be used in the industrial temperature range of -40°C to redundant machine control systems. Distributed edge systems with
85°C. Incidentally, the BSP primarily supported by congatec is based real-time synchronization can also be established via the real-time
on the Yocto framework. The low energy consumption of 2..6 W and clock and the TSN-capable Gigabit Ethernet port. For example, in
the onboard eMMC with storage capacity of 128 GB and ability to be networked manufacturing cells or the process industry. The NXP Trust-
operated in robust pSLC mode to extend the service life of the robust Zone offers a secure execution environment for enhanced protection
memory even more are other attractive highlights (Figure 3). against cyberattacks, the risk of which increases through networking.
This is based on an encryption module (CAAM) for hardware-accel-
Diverse Application Areas erated ECC and RSA encryption, the Resource Domain Controller
The new SMARC modules with i.MX 8M Plus platform are thus focused (RDC) for the isolated execution of critical software, and the secure
on reliable industrial applications in combination with embedded vision, High Assurance Boot mode, which prevents execution of unautho-
machine learning, and AI as well as advanced multimedia applications. rized software during the boot procedure.
They thereby target Industry 4.0/IIoT, visual inspection and monitoring
systems, and smart infrastructures and smart cities. Other applications Embedded Vision Systems a Focus Market
can be found in agriculture and construction as well as in building The availability of the SMARC modules with i.MX 8M Plus is thus
automation and measurement technology. The target markets are thus another milestone in the company’s solution platforms for embedded
extremely diverse. One of the largest application fields is in the wide vision systems. Congatec already created a proof of concept for retail
range of HMIs because virtually every device today has a graphical user deep learning applications with Basler and NXP Semiconductors in
Figure 4: Congatec will now also equip its application-ready embedded Table 1: All SMARC modules of Congatec.
vision kit with the new SMARC 2.1 conga-SMX8-Plus module with i.MX 8M
Plus processors.
SMARC Module ARM x86
conga-SMX8M-Plus i.MX 8M Plus Quad –
i.MX 8M Plus Quad
2019. Integrated AI software, with which automated cash systems can with NPU
be realized in retail, runs on this platform. With the growing popular-
ity of contactless technologies as a result of the pandemic, this kit is
now more relevant than ever and the NXP i.MX 8M Plus processor
with the new NPU and the powerful image signal processor for even conga-SMX8 NXP i.MX8 Quad Max –
more powerful AI-based image evaluation in real time offers an even NXP i.MX8 QuadPlus
more attractive feature set for such applications (Figure 4). The ISP
can process video streams of 375 megapixels per second (MP/s). This
corresponds to 180 Full HD images per second with, for example, image
contrast optimization or lens distortion correction. With the integrated
neural processor and the support for OpenGL ES 3.1, Vulcan VX exten- conga-SMX8X NXP i.MX8 QuadX- –
sions, OpenCL 1.2 FP, and OpenVG 1.1, vision applications receive a Plus
uniquely high processing performance. NXP i.MX8 DualXPlus
When it comes to connecting power And what needs to be considered on the time and cost factor every time the current
connectors to the PCB, many users have cable side for currents above 10 A? Higher intensities increase? No!
two options in mind: classic, automated currents result in increased heat genera-
SMT assembly and manual THT assembly. tion, which has to be handled with a larger Anybody who needs to apply up to 85 A
There are good reasons why surface mount cable cross-section. As a result, the mechan- (at 20°C) to the PCB can stick to classic
technology and through-hole technol- ical load on the PCB connection increases. SMT assembly with the REDCUBE SMD
ogy are so well known and popular. For The SMT connection cannot withstand this. product family in order to connect single
connections in the low voltage and mA That is why many are switching to through- wires to the PCB. In addition, those who
range, SMT assembly is and remains the hole assembly. do not want to do without the mechani-
most effective and cost-efficient method cal load capacity of THT components for
(Figure 1). In the fully automated assembly The Square Thing Must Go Into small and medium currents do not have
process, the components are placed by pick the Round Thing to deviate from the reflow process. Power
and place onto the printed circuit board, THT connectors are leaded components, connectors with THR (through hole reflow)
which is already covered with solder paste. with small connection pins that are later connections can be assembled together
In the subsequent reflow process, the solder inserted by hand through a through-hole with SMT components in the same reflow
is liquefied — hence the name reflow — in the PCB and connected to the board process. In reflow soldering, the compo-
to bond the components to the PCB. The using wave soldering. The THT assem- nents are exposed to higher temperatures
special feature of this process is that both bly takes place after the SMT production. than in wave soldering, however. For this
sides of the PCB can be processed in the This means that both sides of the board are reason, both connectors and pin contacts
same process. usually already assembled and the risk of must be adapted to THR assembly in terms
damaging components that have already of design and material. The design modifi-
While SMT assembly was the domain of low been soldered on during wave soldering is cations can be found on the underside of
currents, it has now also established itself in often high. Therefore, manual soldering the housing: Spacer pins create space for
the midfield. Wire-to-board connectors with or selective soldering must often be used. the solder paste and promote airflow under
currents of around 5 A are already standard. These additional production steps cause the housing so that the soldering tempera-
SMT connections are also gaining ground corresponding additional costs in produc- ture can be evenly distributed in the PCB.
for terminal blocks up to 10 A. tion. But do you really have to deal with this The contact pins must also feature the
correct length for the THR technology, so No Soldering! Press-In! processed. In order to make the advantages
that neither the stability of the contact pin So how can connections be made on a of connection by press-fit technology avail-
in the through-hole is impaired nor solder printed circuit board that are required to able to a wide range of applications, Würth
paste is pressed through the through-hole carry an even higher current and whose Elektronik offers the REDCUBE Press-Fit
and causes solder beads. All these adjust- connection must be mechanically much Terminals made of brass with a tin-plated
ments and the additional cost of tape and more stable and reliable over a long period surface in different variants: Internal thread
reel packaging result inevitably in a higher of time, for example in wind turbines, than (two-row, circumferential or full-surface),
price for the THR elements. But therefore a soldered connection can ever achieve? external thread full-surface, 90° two-row
switch to the conventional THT assembly? This is where press-fit technology comes in. or full-surface as well as two-part as basic
Particularly when THT components are only and support element.
used in isolated cases, the THR process is Pressing the pins into the PCB, a high
noticeably more cost-effective in terms of friction between pin and plated through- For anyone looking for a quick and easy way
its overall cost. In addition, significant space hole generates a homogeneous cold-weld- to implement a wire-to-board high-cur-
savings on the board can be achieved with ing between materials (Figure 3). This rent connection, Würth Elektronik offers
this process. results in a gastight, strong mechanical the REDCUBE Plug, the latest addition to
connection with contact resistance less the series (Figure 4). This connector also
Whether it is a forklift, elevator or simply than 200 μΩ. No other technology transfers comes with all the advantages of press-fit
a battery charging connection, high vibra- power up to 500 A at this low heat develop- technology and completely without washers
tion resistance is a key requirement for ment. In principle, the vias are produced in and nuts/screws. The small red cube made
power connectors in applications where the same way as the holes for accommodat- of glass-fiber-reinforced plastic is capable
they are subject to regular movement or ing THT components. Consequently, there is of accommodating four different plug-in
many mating cycles. REDCUBE THR power no need for any changeover in PCB produc- connections ranging from 50 to 120 A. The
connectors are particularly suitable for such tion. The main difference to THT assembly, screwless connection is made by manually
applications because their contact pins are on the other hand, is that soldering does not actuating the housing from above and
rigid rather than flexible, unlike those of guarantee the solder introduced into the inserting the corresponding plug. By means
other power connectors (Figure 2). Note holes will also rise up the entire sleeve. Not of spring force, the plug is automatically
that the pin geometry also plays an import- only will this affect the mechanical stabil- locked in the housing. The connection
ant role in the THR process, as it must be ity but also the long-term reliability if the can also be released again in this way. The
taken into account when calculating the sleeve is not filled to 75%. This also results REDCUBE Plug is pressed in according to
solder paste volume. There is a simple in much higher contact resistances. Press- the same principle as the REDCUBE Press-
formula for determining the required solder fit terminals are different: If a solid press- Fit. On the cable side, the cable connec-
paste volume: fit pin on a 2.4 mm thick PCB is bonded to tor and cable, with cross-sections of 4,
the sleeve at each corner with more than 6, 10 or 16 mm2, are connected together
(volume of through hole - pin volume 3° after the press-fit process, the press-fit using a hexagonal crimp. This releasable,
in via) x 2. zone has a lower electrical resistance than multi-pluggable wire-to-board and board-
the brass pin itself and therefore does not to-board connection is particularly suitable
The factor 2 is necessary because only 50% represent an electrical or thermal bottle- for installation in small spaces or in hard-to-
of the solder paste is metallic and additives neck. Normally, the tether angle is many reach places, as no tools are required. For
such as flux vanish in the process. Optimal times higher, providing a high safety buffer use in chargers, REDCUBE Plugs can be
is a filling level of 100% — according to to the electrical connection. Another advan- supplied in other colors making them easier
IPC-A-610D a more than 75% filled solder tage over soldering is that printed circuit to distinguish.
joint is acceptable. boards with a thickness of up to 3.2 mm
and high copper occupancy can be easily 210067-01
Tracking Down
Microcontroller
Buffer Overflows with
By Stuart Cording (Elektor) 0xDEADBEEF
Software development on microcontrollers can be a real challenge at times. Sometimes the
code just doesn’t function as planned, but you can’t really figure out why. In such cases, it is
time to approach the challenge like Columbo, Jessica Fletcher, or (insert your super sleuth
here), do some investigative research, and find out who the culprit is! And for that, you may
need to lay a trap using dead beef (0xDEADBEEF).
Code sometimes stops working as expected for seemingly no rhyme Laying a trap with dead beef
or reason. Perhaps some data changes unexpectedly, the program just One way of checking whether arrays are being written beyond their
seems to “stop,” or the microcontroller resets unexpectedly. The first bounds is to fill them with a known pattern before they are used.
thing to do is to admit that there is most likely a programming problem. Because hexadecimal includes the letters A to F, simple words can
Microcontrollers only do what we tell them to do, so we must have, be formed that provide easy to recognize patterns. One of these is
inadvertently, put it in a position to do the unexpected. Such issues 0xDEADBEEF.
may also arise because we do not fully understand how the compiler
and linker functions. One way to do this is through the IDE and debugger being used to
develop the code for your microcontroller (Figure 1). The first step is
to determine the start and end address of the array. Then, using a view
Make the error reoccur of the memory (RAM), it is usually possible to write such a pattern
The first step in your investigation, if the error is sporadic, should be to from the start address to the end address.
determine how to make the error reoccur. Only by invoking the error
repeatedly are you able to undertake further tests to see whether you The best approach to this debugging method is to download the code
can make it “go away.” However, you need to make sure the cause is to the microcontroller and allow the code to run until main() has been
clear so that you can be sure that whatever you changed actually reached (set a breakpoint at main() or use a “run to cursor” feature).
resolved the error and didn’t just shift the problem elsewhere! Determine the start/end address of your array, write the pattern, and
then allow the code to execute for a while. Pause code execution and
It is tempting to add extra “test code” and variables to help in this then check the memory location you filled with your 0xDEADBEEF
process. If such a change makes the error “disappear,” it could be that pattern. If none of the pattern can be found, this may be because data
a memory problem is the cause of the issue. These can be the result has been written beyond the end of the array at some point. All that
of buffer overflows or an overflow of the stack. is left is to determine when and why.
Buffers are typically implemented as arrays on microcontrollers in C Note: Your development environment (IDE) may not allow the full
and will be defined with a fixed length. Less used on microcontrol- 0xDEADBEEF pattern to be written. In the examples included here using
lers, but also possible, is an array that is allocated at run-time using MPLAB X, only 16-bit patterns can be written into the memory of the
“alloc” (such as malloc or calloc). These are known as dynamically PIC24F (as it is a 16-bit microcontroller). Here we chose to just use
allocated arrays. Either way, the C language makes it very easy for 0xBEEF, which is also easily recognizable. Alternatively, you may be
programmers to write code that accesses memory beyond the defined able to write your pattern into an ASCII file, save it to your hard drive,
bounds of an array. The result: writing to an array could accidentally and then load it into memory.
overwrite neighboring variables.
Did my memory change? If your 0xDEADBEEF pattern is completely gone, it will be difficult to
Another helpful feature of most debuggers in such investigations is know how far the erroneous code has written beyond the bounds of
that they highlight memory locations that have changed in a specific the array. In such cases, try defining additional arrays as a “buffer”
color, such as red, when the microcontroller is halted. If you halt code before and after the array being examined (Figure 3). This is a little
execution with the memory region you are examining in view, any tricky in C/C++ as, without some extra code, you cannot define the
bytes that have changed in value in the meantime will be shown in this address to which variables are allocated. However, generally speaking,
different color (Figure 2). This can be especially helpful if any third- variables defined after one another in code appear after one another
party functions or libraries were called that may have overrun a buffer. in memory too. This means that if you declare some “extra buffer”
Figure 2: Since the MCU was last halted the memory location circled in orange has changed, as its contents are highlighted in red. Black values denote no
change. If you weren’t expecting these values to change, you may be on your way to finding your software bug.
arrays, one before and one after the array you are investigating, you’ll y++;
probably find they are allocated directly before and after that array if (y >= 4) {
in memory. Simply fill all arrays with 0xDEADBEEF, execute the code, y = 0;
then check to see if the pattern in all array is intact. }
}
}
Debugging real-time code }
Many real-time applications, such as those controlling motors, or
implementing interfaces like USB or Ethernet, cannot be stopped and The code can be allowed to execute in its entirety until it either stops
debugged line by line as this would stop them working completely. This due to the error, or the microcontroller is halted by the developer.
means that we cannot stop the code to write the 0xDEADBEEF pattern When this occurs, the memory can be analysed using the IDE. Even
into memory using the IDE. Instead we need to do this in software. if the error caused the microcontroller to reset this does not clear the
This is simple to implement using a short array that is pre-filled with memory (unless some start-up code clears it all to zero) as long as it
0xDEADBEEF and a bit of code that copies it into the array(s) your are remains powered on. This means the debugger can still access the
investigating (Figure 4). RAM in the state it was in before the reset and you can search for
any buffer overruns that have overwritten your 0xDEADBEEF patterns.
/* Example code that writes 0xDEADBEEF pattern into an
array on a Microchip PIC24F microcontroller */
Filling the stack with 0xDEADBEEF before main()
#define ARRAY1_SIZE 16 Another possible issue is that the stack is being written beyond its limits.
uint8_t deadbeef[] = {0xDE, 0xAD, 0xBE, 0xEF}; Many microcontrollers have hardware detection for stack overruns.
uint8_t array1[ARRAY1_SIZE]; However, such a feature may not be available, or you may have defined
the use of RAM differently. The stack can, of course, be filled using the
int16_t main() { IDE as already mentioned. However, you may need to fill this space
uint8_t x = 0; with your 0xDEADBEEF pattern before your code executes (i.e., before
uint8_t y = 0; main() is reached).
while(1) Microcontrollers have quite a bit to do before main(), more than we
{ have time to cover here, but they include some hooks allowing user
y = 0; code to be executed before the CPU jumps to main(). This capability
for (x = 0; x < ARRAY1_SIZE; x++) { can be used to fill the stack with 0xDEADBEEF.
array1[x] = deadbeef[y];
The method for doing this varies from microcontroller to microcontrol- The optimal approach to discovering buffer and
ler, but can typically be broken down into the following steps: stack overflows
Probably the most important thing to remember is that, if the code
> Determine the start of the stack. on a microcontroller doesn’t work as expected, it is probably because
> Determine the end of the stack. of a programming error. Try to determine what causes the problem
> Fill this region with 0xDEADBEEF. so that it can easily replicated. From this point it will then be easier
to determine which code changes you have made are resolving the
The example in Listing 1, written in C, is for a Microchip PIC24F 16-bit issue and what the ultimate cause may be. If buffer or stack overflows
microcontroller, implementing the user_init function (search the are suspected, try to 0xDEADBEEF them using one of the approaches
compiler documentation [2] for more details) that will be called once discussed here.
the device is initialized but prior to main().
200722-01
Knowing that the stack pointer is stored in a specific register, in this
case WREG15, the address to which it is pointing is stored in a pointer
variable. In this architecture, this is pointing to the current return address
for the function currently being executed, so we need to avoid overwrit-
ing it. Therefore, we increment the pointer by two bytes (this is a 16-bit
device) so we can start writing the 0xDEADBEEF pattern from the next
word-addressable location in memory. The remainder of the code writes
the pattern, stopping when the end of the stack is reached. This limit
WEB LINKS
is determined by using the content of the stack limit register SPLIM
(another a register unique to this processor architecture). [1] Elektor articles about microcontrollers:
www.elektormagazine.com/tags/microcontroller
This approach can be adapted for most other microcontrollers quite [2] Microchip Technology, “MPLAB C Compiler for
easily, but will probably require some in-depth reading of the documen- PIC24 MCUs and dsPIC DSCs User’s Guide,” 2008:
tation for the microcontroller and the compiler tool chain. https://bit.ly/3btCHec
Quick to Code
Too
and Too Slow to Test?
By Stuart Cording (Elektor)
Embedded software developers seem very “If carpenters made buildings the way firmware could not be updated without
keen to get on with the business of coding, programmers make programs, the first an expensive jaunt into the field where
eschewing discussions of software architec- woodpecker to come along would destroy the equipment was installed. Despite this
ture, abstraction, and modeling and simula- all of civilization.” inherent lack of room for error, the estab-
tion. Since embedded software, tradition- lished approach to code development
ally, has had no way of updating released This slightly modified version of Weinberg’s by some embedded software developers
code, there has never really been any room Law [1] really struck a chord. Why weren’t remained unchanged.
for error. So why, with a plethora of model- embedded software developers drawing
ing and simulation tools available, do we upon computer science research and build-
still rush to code and wait so long before ing their code with an appropriate archi- Is there ROOM for a new(er)
starting testing? tecture or using modeling and simulation? development approach?
While the code executing on microcontrol-
lers past could often be implemented using
The dangers of woodpeckers Too quick to code? a simple state machine, the challenges
It was one of those moments that, quite One answer is that it could be a result of being tackled today are genuinely multi-di-
literally, generated an “aha moment” the generation of the engineers concerned. mensional. Today it is not unusual for a
in my head. Researching background Having grown-up with resource-limited, microcontroller to commutate an electrical
material for the development of a train- 8-bit microcontrollers and mastered how motor using field-oriented control (FOC) as
ing course, I wondered why embedded to squeeze every ounce of performance out well as hosting a number of other tasks. Just
software developers seemed so reluctant of them in assembler, abstraction and the determining the rotor angle and, from this,
to use concepts and methodologies that thought of tool-generated code implied the next commutation point in real-time
were becoming commonplace in other code bloat and an inevitable loss of control. is a significant undertaking, even if the
branches of software development. I had Even the move to C had been a challenge required software is already available.
regularly encountered engineers who for some, despite its closeness to the under-
had not introduced coding standards, lying hardware. When this is built into a house-
despite multiple people working on the hold washing machine, IEC 60730 [2]
development of software for a microcon- Another aspect is how C is typically taught, (Automatic electrical controls — Part 1:
troller-based project. None of them had focusing on the “grammar” rather than how General requirements) also needs to
defined any development design rules that best to use it. However, just like a spoken be considered. Most microcontroller
would allow for portable, reusable code. language, competence in grammar does vendors will offer a “Class B” library [3]
And object-oriented design, modeling, and not make the student an eloquent orator. that executes a variety of tests, cover-
simulation weren’t on the radar. It was at ing CPU registers, program counter and
this point that this, seemingly pertinent, Until the emergence of Internet of Things memory integrity, as well as testing the
quote appeared: (IoT) applications, a microcontroller’s clock. This code needs to be executed
“in parallel” to real-time motor control. the application code, is known as a phase
Additionally, there are likely to be commu- discontinuity [5]. Ideally, any modeling Why so slow to test?
nication interfaces in use that must also approach should resolve this which is After rushing to start coding, many embed-
respond in a timely manner, along with the case with the Real-Time Object-Ori- ded development teams seem to be very
a human-machine interface. While an ented Modeling (ROOM) domain specific reluctant to begin testing until a good
embedded software developer can be sure language (DSL) [6]. Designed specifically for portion of application development is
all these features operate in isolation, what the needs of those developing event-driven, complete. The reasons for this are diverse
will happen when they are all integrated? real-time systems, it supports modeling and complex. They start with the misguided
and simulation while also being capable view that testing is expensive and has to be
One option is to use the Unified Modeling of generating code that can be used on the done by a testing team or department. Lack
Language (UML) and simulate a model of the target hardware. of clear, testable requirements for individ-
application. But here, there is often signif- ual software modules is also an issue. And,
icant push-back from embedded software It describes software systems along the perhaps, the availability of powerful debug-
developers. One of the primary concerns is three-dimensions of structure, behavior, gers for our chosen development IDE gives
that it is a waste of time. After all, if you’re and inheritance. Structures can be repre- us the feeling that we checked everything
going to go to the trouble of building a model sented by diagrams containing actors that as we wrote the code.
of the application, you may as well be coding communicate with each other via ports.
it. Also, UML has been given a bad name Messages passing between them are The results of coding mistakes are humor-
due to misuse as people have attempted to handled by runtime libraries that provide ously discussed in Lisa Simone’s book, If I
apply it to every part of a system [4]. This the services required to support this. The Only Changed the Software, Why is the Phone
abstracted way of working also requires a behavior of actors are described using on Fire? [9]. In one example, an error in a
different development methodology, and hierarchical finite-state machines that can temperature control algorithm is the result
trying to convince a team of developers to also be generated as diagrams. Entry and of an inappropriately chosen data type. While
adopt new methods is challenging. exit code can be defined for the states in Simone excellently describes the debugging
the target language of the code generator process to find such issues, they should have
This concern regarding coding everything being used (C compiler for a microcontrol- been detected through unit testing.
twice, once as a model and then again as ler). State transitions occur upon receipt
Figure 8: The Inchron Tool-Suite places timing, rather than functionality, in focus through modeling, simulation, and analysis. Here an event chain is analyzed
(Source: INCHRON AG).
WEB LINKS
[1] Weinberg’s Law: http://bit.ly/2WBOeiU
[2] IEC 60730-1:2013: http://bit.ly/37Bq8Lw
[3] Hitex Class B Library: https://bit.ly/2KorSz5
[4] A. E. Bell, “Death by UML Fever,” ACM QUEUE, April 2004: https://bit.ly/3auSCsv
[5] B. Selic, G. Gullekson, P. Ward, Real-Time Object-Oriented Modeling, Wiley, 1994: http://bit.ly/3mJdJtC
[6] Real-Time Object-Oriented Modeling - Wikipedia: http://bit.ly/34xxLkq
[7] eTrice: http://bit.ly/3mGWk4p
[8] Astade: http://bit.ly/34vLxnG
[9] L. Simone, If I Only Changed the Software, Why is the Phone on Fire?, Newnes, 2007: http://bit.ly/3my2nIx
[10] testIDEA - iSYSTEM: http://bit.ly/3rh2BHS
[11] Feabhas Ltd, “A Quick Guide to ISO 26262,” 2016: https://bit.ly/3nHMeSk
[12] MBTsuite: https://mbtsuite.com/
[13] Enterprise Architect: https://sparxsystems.com/
[14] CaGe User Manual: http://bit.ly/3h8ht6M
[15] Jenkins: https://www.jenkins.io/
[16] Infographic: How Many Millions of Lines of Code Does It Take?: http://bit.ly/37BS4iH
[17] INCHRON Test-Suite: https://www.inchron.com/
[18] Vector TA Tool Suite: http://bit.ly/3mBMocF
Embedded applications
A1
%
Accountancy and consultancy firm PwC did substantial research
on the way automation and AI affects the global labour force. It is
of existing jobs at potential risk of automation
difficult to say whether tasks carried out by embedded systems
Wave 1 Low education will take away jobs or will, on the whole, create them. One thing is
(to early 2020s) Medium education certain, however. The level of education matters, certainly when
High education embedded computing and AI meet each other. The first wave in the
Wave 2
(to late 2020s) early 2020s still leaves opportunities for any kind of job. From 2030
onwards, embedded AI really takes hold, especially in the sectors
Wave 3 of transportation and manufacturing.
(to mid-2030s)
0 10% 20% 30% 40% 50% (Source: PwC, based on OECD/PIAAC data)
How to Make
Design for Manufacturing
Contributed by Eurocircuits
Easy
Design for Manufacturing (DFM) offers decisive advantages: it reduces costs in prototype
and series production, increases the quality and reliability of assemblies and conserves
valuable resources. Eurocircuits’s freely available Visualizer makes DFM possible: fast,
easy, and right first time.
Figure 1: The Eurocircuits Visualizer can be used to validate design parameters or to find more cost-effective options.
When designing a PCB, the first thing that nents and considered as early as possible The layout of a PCB and which components
comes to mind is, of course, the electrical in the design process. As most of the series are used helps to determine the production
functionality. However, the PCB must be production costs are determined during the cost and reliability of the hardware. There-
manufactured and populated with compo- prototype phase. fore, it is important to have a cost optimised
Figure 2: Eurocircuits Online tools support the optimal design flow with the aim of getting it right first time (Right First Time for Manufacture).
WEB LINK
[1] Eurocircuits Website : www.eurocircuits.com
Operating in conjunction with Silicon Labs’ triggering when a mobile node moves compiled data can be transferred back to
Thunderboard 2 sensor module and the outside/into a given area. This could be the cloud via either its wireless (Wi-Fi) or
Raspberry Pi 3B+ (which is pre-loaded with used to keep forklift trucks within prede- wireline (Ethernet) connectivity options.
Yocto Linux), UrsaLeo’s cloud-based analy- termined confines on the factory floor, or Depending on the application scenario, the
sis software follows this tactic. It enables in fleet management and livestock track- hardware may be powered by USB or using
captured data to be actioned by applying ing applications. Furthermore, if a captured a Li-Ion coin cell battery.
a tree-based rule structure for pattern data value is unusual (e.g., it remains the
matching, rather than having to refer time same constantly or is permanently at zero), The tree-based methodology employed
and again to a lookup table. This ensures then it may suggest that the sensor is not means that this system is fully scalable,
that better-informed decisions are made operating correctly, and this can then be with the ability to attend to any prospec-
without adding unwanted latency to the flagged so that an engineer can be sent out tive number of connected IoT nodes within
system. Customized dashboards displaying into the field to undertake any necessary a network, rather than being limited to a
the compiled datasets can be accessed and repairs. certain quantity. As a consequence, it will
triggers set up to alert operatives if certain be possible for hundreds of thousands of
events occur for which human intervention A Wealth of Different Sensors events/alerts to be dealt with every second.
will be required. The Thunderboard 2 module can acquire Even with a medium-sized server, the
environmental data from the wealth of system can process 500,000 messages per
By using the intuitive visually-based editor different sensors that have been incorpo- second, and this could be pushed up to 1-2
tool, a set of rules can be established that rated — covering ambient light, air quality, million with a high capacity server.
fully align with the particular application barometric pressure, relative humidity, and
requirements. A trigger can be set every temperature, as well as having scope for Through the combination of highly
time a message is received, or conversely adding in gas detection functions. A 6-axis optimized cloud-enabled hardware and
if a message has not been received within inertial sensor (for space orientation) and a superior algorithms, the way that IoT data
a specified period. Alternatively, a trigger Hall effect sensor (for geographical orien- is handled can be made considerably more
can be initiated at regular intervals (after tation) are also encompassed. The accom- time efficient than it is today. This will
an hour, a day or a week has elapsed), panying Raspberry Pi board serves as an facilitate the ramp-up of IoT deployments
for long-term monitoring purposes. A IoT gateway (interfacing directly with the to a point where there are hundreds of
geo-fencing rule can also be defined — Google Cloud platform). Through it, all the thousands of connected nodes involved —
allowing the true benefits of this technology
to be realized across all manner of different
Even with a medium-sized server, the system can process
industry sectors.
500,000 messages per second. 21036-01
Embedded System
Development with
RISC-V Processors
A Brief Introduction and Market Overview
By Allan He (Embedded System Association, China) on processor instructions; in fact, it is not even a complete instruction
set. RISC-V originated from the University of California, Berkeley. In the
This article introduces the origin and summer of 2010, Professor Krste Asanovic launched a three-month
development of the RISC-V ISA. It briefly research project with his students Andrew Waterman and Yunsup
Lee. The goal was to develop an open ISA in order to work around the
describes the technical characteristics and technical complexity and IP complications of x86 and ARM.
selection guidelines of various RISC-V CPU
cores and SoC design platforms. We will also The RISC-V Foundation was established as a non-profit organization in
2015. The foundation’s board consists of representatives from Bluespec,
have a look into the features of the RISC-V Google, Microsemi, NVIDIA, NXP, UC Berkeley, and Western Digital, and
instruction extensions and the open-source chaired by Professor Krste Asanovic. The foundation establishes standards
and commercial software development and contributes to the building of the ecosystem of RISC-V cores; the
standards are public and open for download. There are more than 300
tools. The article finally looks forward to the paid members of the foundation, including Qualcomm, NXP, Alibaba and
trend of RISC-V in education and industry Huawei. Members are authorized to use RISC-V trademarks. RISC-V is
development. licensed under the open-source BSD license, any company, institution, and
individual can design a CPU with RISC-V architecture manuals. Last year,
the RISC-V Foundation was renamed to RISC-V International Association,
In the past two decades, ARM has achieved milestones in mobility and and moved its headquarters from the USA to Switzerland; the association
embedded system areas. Today, we are observing ARM establishing completed its registration in Switzerland in March 2020 [1].
its market leadership in IoT, while witnessing the demise of commer-
cial processor architectures like MIPS. After ARM entered the PC and After a decade of development, RISC-V has logged significant achieve-
server markets that were previously dominated by x86, it has placed a ments in CPU IP core, platform, SoC, and application. To name a few
fair amount of pressure on Intel. Right at this moment, the rise of RISC-V example applications of RISC-V cores: Western Digital’s SSD and
has attracted the attention of the industry. IT giants have been searching HDD controllers that sport SweRV cores, Shenzhen Bluetrum’s TWS
for an alternative to ARM; the openness of RISC-V ISA means they have Bluetooth headset, China Canaan Creative’s K210 AIoT SoC chips,
found a viable option. In the academia, RISC-V is now replacing MIPS and Bluetooth/generic 32bit/high-speed MCUs from Nanjing Qinheng
and x86 as the architecture of choice in textbooks at a break-neck pace. Microelectronics.
With governments and enterprises adopting RISC-V as the standard,
we are seeing a blowout of new CPU and SoC designs, a growing RISC-V’s Instruction Set
ecosystem, and an ever more engaging development community. The instruction set of RISC-V uses a modular design to organize instruc-
tions, with one English letter representing a module. The most basic
What Is RISC-V? and required instruction set in RISC-V is the integer set, signified by
An Instruction Set Architecture (ISA) refers to the instructions and the letter “I”. Even with just one set, one can implement a complete
their bytes encoding supported by a CPU; it is the bridge between software compiler. Other instruction sets are electable modules, a few
computer software and hardware. CPU families, like x86, PowerPC, notable examples are M/A/F/D/C. If a RISC-V cure is RV32IMAC, it
and ARM, have their own individual ISAs; RISC-V is currently the only means it implements I/M/A/C instruction sets. The 32I and 64I sets
open-source ISA. RISC-V is an open-source ISA, which means it is not in RISC-V are already frozen, so are MAFDQC extensions; 32E, 128I,
an actual CPU chip, but a collection of specifications and standards JBJTPV, and ZAM atomic access extensions are still under develop-
NXP played an important role in the early market cultivation of RISC-V > Embedded system and IoT developers will benefit from choos-
by sending out development boards [7] and holding competitions/ ing RISC-V SoC chips. For instance, GD32VF103 series MCU has
hackathons in China. numerous development boards available and supports multiple
toolchains; AIoT applications can go with K210, which is accom-
Microchip PolarFire SoC is a low-cost, multi-core SoC FPGA; it consists panied by a mature SDK and support of both FreeRTOS and bare
of four 64-bit RV64GC RISC-V application cores, and one RV64IMAC metal. Recently, Linux 5.8 added support of K210 RISC-V to the
core for real-time and monitoring tasks. PolarFire SoC is capable to mainline release. K210 has been successfully adopted in machine
run Linux and is particularly suitable as a development platform for vision/hearing applications like face recognition and intelligent
industrial control and IoT applications. energy meter-reading.
> Universities and research institutions can elect open-source
Choosing Between RISC-V Core, SoC Platform, RISC-V core on FPGA to teach and research in areas like
and Chip computer architecture, OS, compiler, and embedded system.
To the increasing number of practitioners that have started to partic- As an example, Arty FPGA development board that implements
ipate in RISC-V research, development, and education, I have the SiFive open-source Freedom E310 MCU (as shown in Figure 3) is
below recommendations: a mature platform with good software toolchain support [8].
> Chip designers can opt to use RISC-V cores and SoC platforms RISC-V’s Advantages in Embedded Systems
to construct their own chips. For example, one can use PULPino Apparently, embedded system, IoT, and AIoT are RISC-V’s most
platform to develop SoC, and adopt RI5CY and Zero-riscy cores; active application markets. RISC-V brings quite a few advantages
a number of companies and universities in China are using them to the embedded system ; they can be summarized in three major
in business/research projects. points.
related product
> A. He and L. He, Embedded Operating System: Otto-Roehm-Str. 69
64293 Darmstadt
History and Future in the Internet of Things, Elektor 2020. Germany
Phone:+49 6151 8173-20
www.elektor.com/embedded-operating-system Fax: +49 6151 8173-29
info@peak-system.com
Solutions for
Touchscreen Applications
with High EMC Requirements
Contributed by SCHURTER
Touch panel products for the European market must comply ics. By choosing the right components and
filter elements, these emissions are effec-
with European directives and be CE certified. An essential tively combated at source.
requirement is that these products meet the requirements
for electromagnetic compatibility (EMC). Emission Source Controller
The touch screen controller chip used
But which are these? by SCHURTER is a potential source of
emissions if not properly wired. By design-
ing an optimised, customised PCB layout
Other electrical devices in the immediate that all specific requirements are recorded in cooperation with the customer and the
vicinity of a touch panel must not affect the at an early stage and included in the design. chip manufacturer, the emission is kept
operation of this device. The touch panel as low as possible. Consideration is given
must therefore have high immunity to Clever Design to correct routing, filtering of signal lines,
interference. Conversely, the panel must Emitted interference (emission) and demarcation of supply lines and place-
not interfere with other products, so its own immunity are not only determined by the ment of ground planes in the PCB. A multi-
emissions must be low. The EMC require- electronic circuits and their components, layer design provides additional shielding
ment classes vary depending on the appli- but also by the mechanical construction, the against high-frequency interference signals.
cation area of the application. For example, positioning of the electronic assemblies, the As the capacitive touch screen is located
medical devices require a higher interfer- choice of materials and the cable routing. on the outside of the end product, it can
ence immunity for safety reasons. Since SCHURTER takes these influences act as a transmitting antenna for higher
into account in the early design phase, EMC frequencies. For these frequencies and
EMC Specialist problems are avoided (Figure 1). Subse- their harmonics it is sometimes neces-
EMC specialist SCHURTER has decades of quent, costly modifications after comple- sary to integrate an internal shielding of
experience in the field of EMC. This can be tion of the product are therefore avoided. the electronics in the form of metal foil or
seen in the fact that the EMC properties of a complete metal housing.
both the touch screens and the end product Low Emissions
are already taken into account at the design Many electronic devices nowadays work High Interference Immunity
stage. To achieve a well thought-out design with highly integrated, high clocked A PCAP touchscreen must never trigger an
in the field of EMC, SCHURTER engineers circuits, which are often the cause of action if it is not touched (a so-called ghost
are often involved in the project right from emitted interference signals. Furthermore, touch). A touch screen can be disturbed by
the start. Preferably a joint development these signals often have a very high edge high-frequency energy from outside. This
team is put together. This has the advantage steepness, which leads to further harmon- can be conducted or radiated disturbing
Conducted Interference
Immunity
The developers at SCHURTER have profes-
sional test equipment at their disposal
to determine the conducted immunity
(Figure 2). Already with the first proto-
Figure 1: Conducted immunity EMC test setup for touchscreens.
types, the immunity is verified at the level
of pre-compliance tests in official test
laboratories. If interference is detected
during such a test, the engineer will adjust
the correct parameters in the controller
firmware while in progress and fine-tune
the optimal functionality.
Touchless Automation
The Rise of
Contactless
Manipulation
Manipulating objects without touching them has ogy, manufacturing still copes with multiple
always been one of the most widely used magic tricks. challenges. The operations of picking the
components from adhesive tape, manipu-
Unfortunately, these tricks cannot be used in industrial lating them or bonding them to a substrate
environments to produce actual products. The ability of are still creating surface imperfections that
manipulating components without touching them would sometimes require cleaning, sometimes affect-
ing the component functionality for good. Here,
be especially useful for very delicate or fragile components contactless manipulation comes in to play.
like microstructures, thin dies or photonics. The latter is
especially important because almost every component that Contactless handling is a reality
Touchless Automation has been focusing on
deals with the interaction between light and matter needs to providing contactless manipulation solutions
have an almost perfect surface. since its birth. The company is located in
Bienne, a small town in Switzerland famous
for being the center of the Watch Valley. Start-
Manufacturing these components is cumber- photonics components. ing from the need of watchmakers to have
some and many producers report double-digit Photonics has been rising and gaining impor- perfect surfaces for their high-end parts,
defect rates. At the same time, the implemen- tance but, unlike standard semiconductors, the company perfected this manipulation
tation of such components in multiple fields the heart of its R&D and production still lies and launched a line of industrial machines
has been steadily growing in recent years. within western countries. A document issued dedicated to Photonics components.
In 2010, only top level smartphones had two earlier this year by the European Commis- The last product, Levio, has been presented
cameras and the sensors were just check- sion (“A New Industrial Strategy for Europe”, at SPIE Photonics West in San Francisco in
ing if your phone was close to your ear. Now, 10.03.2020) clearly puts Photonics as one of 2019 and it’s already at work on customer
the top smartphones can have more than six the Key Enabling Technologies for the future applications. This machine is able to pick
cameras and a whole set of sensors that can and promises further investments in the field. up from adhesive tape, visually inspect the
do a wide range of tasks such as facial recog- These efforts are particularly effective also components and sort them according to
nition or 3D imaging. But it’s not just commer- thanks to multiple initiatives at European level the results of the inspection. As of today, the
cial electronics that have implemented these such as the European Photonics Industry largest amount of customer requests have
changes. Telecommunications is every day Consortium, EOS and many more local ones, come from laser diodes, micro lenses and
more optical oriented and the upcoming wave such as SwissPhotonics or Photonics France. optical filter producers. But the technology has
of autonomous driving cars will heavily rely on Despite the wide spread of the technol- already proven useful in a multitude of other
What Is
tinyML?
Questions by C. J. Abate (Elektor)
A subcategory of artificial intellience, learning was piqued by taking the introductory data science course
at Harvard during the first year of my PhD work, which was when I
machine learning (ML) has applications realized the huge potential of machine learning both generally and
in a wide range of fields, including atmo- also specifically for atmospheric research.
spheric science and computer vision. As
Abate: What led you to Harvard University?
Harvard PhD candidate Matthew Stewart
explains, tinyML is an emerging disci- Stewart: Well, the obvious response is that Harvard is one of the
pline for developing “fast, low-resource, top research institutions in the world and studying here is the goal of
many passionate and hard-working students. I was also drawn by the
and power-efficient implementations of research interests of my supervisor, who studies the tropical Amazonian
machine learning algorithms that can be rainforest using drones. I became interested in pivoting to environmental
operationalized on resource-constrained science through the course of my mechanical engineering degree as it
became more clear to me that most of the defining engineering problems
microcontrollers.” of the modern age will be environmental problems, namely climate
change, energy security, and sustainability. This work on drones in the
Amazon rainforest seemed ideal based on my interests and engineer-
C. J. Abate: Let’s start with your background. When did you first ing background and was the main stimulus for coming to Harvard.
become interested in machine learning [1]? Did you come at the field
due to a background in programming or hardware design? Abate: As an environmental scientist, how do you keep yourself
educated about embedded systems and programming? It must be
Matthew Stewart: For my undergraduate degree, I studied difficult to stay on top of all the new developments in the AI field, as
mechanical engineering, so this gave me some experience in program- well as innovations in sensor technology, embedded systems, and
ming and mechatronics. However, I was not introduced to machine so on. What’s your approach to staying informed about these various
learning until starting at Harvard University. My interest in machine subjects?
Stewart: Yes, that is essentially the goal. tinyML is not a specific the keyword, wakes up the CPU, verifies that it was said by a known
technology or set of principles, exactly, it is more of a proto-engineer- speaker, and then waits for additional voice input.
ing discipline involving synergy of the fields of computer architecture,
performance engineering, and machine learning. The overarching Another example exists in smartphones that helps to detect when a
goal is to develop fast, low-resource, and power-efficient implemen- user picks up their phone. Data from the onboard inertial measure-
tations of machine learning algorithms that can be operationalized on ment unit and gyroscope are continuously monitored, and when a
resource-constrained microcontrollers. This can also involve the devel- user picks up their phone the set of signals informs the device of this
opment of bespoke hardware for specific tasks, the development of new and subsequently wakes up the CPU.
algorithms specifically designed for resource-constrained applications,
or new tools to port algorithms or optimize their performance across Another useful example is person detection, where a microcontroller
a wide range of hardware architectures. A useful guideline has been connected to a camera can detect the presence of an individual. This
proposed referring to tinyML as the application of machine learning can be adapted to, for example, detect whether a user is wearing a
to microcontrollers with less than 1 MB of random access memory mask, which is particularly useful during the current pandemic. Anomaly
and power consumption less than 1 mW, but this is by no means a detection will likely become an important use-case in industry, where
rigorous or exhaustive definition. signals from heavy machines can be continuously monitored to detect
abnormalities for predictive maintenance purposes.
Abate: And just to be clear: we aren’t talking about devices like
the NVIDIA Jetson and Raspberry Pi. The focus is on much more Abate: In 2019 you published a fascinating article, “The Machine
resource-constrained devices (i.e., less than 1 mW and kilobytes rather Learning Crisis in Scientific Research,” [3] which addressed the issue
than megabytes), right? of whether machine learning is contributing to a “reproducibility crisis”
in science. For instance, if a scientist uses a “poorly understood” ML
Stewart: Correct. Devices like the Raspberry Pi and NVIDIA Jetson algorithm in an experiment, it might mean that other scientists cannot
are not the focus of tinyML, nor are technologies related to applica- reproduce the original research results. Even non-scientists can see
tions such as self-driving cars, which often have access to consider- the problem there. I assume the debate — machine learning vs tradi-
able computational resources. The key word is “resource-constrained”, tional statistics — has only intensified over the past year. What are
which almost suggests we are playing a zero-sum game. In tinyML, your thoughts now?
we must make informed decisions on how best to optimize the perfor-
mance of our algorithm in terms of application- and hardware-spe- Stewart: I think this is still an important issue in academia. My article
cific constraints. on this subject was in response to the reproducibility crisis which first
surfaced over the controversy of some work done on the topic of power
poses by Amy Cuddy, a former Harvard Business School professor.
• •
mouser.co.uk/price-availability-assistant
Raspberry Pi Pico
Microcontroller Board
Price: €4.95
www.elektor.com/19562
Price: €89.95
Member Price: €80.96
www.elektor.com/19564
Hightech PCB Precision SMD-Stencil All from one source • Ultra finest-line
• Filmless laser-direct-imaging (LDI)
• Impedance control, from 4WD
• HDI boards
Inclusive
0.1mm tracks or or 2 layer PCB
• Blind & Buried Vias
• Microvias, also lasered
+ • Via Filling / Via in Pad overplated
0.2mm drills
• Stacked & Staggered Vias
2 layers e.g. 1pc. 80mm x 100mm e.g. 1pc. 100mm x 120mm SMD-Stencil • Plated-through slits
• Countersink holes
UNIT PRICE UNIT PRICE TOTAL PRICE
• Z-axis milling
4 WD € 35, net 00
€ 41,65 gross 1 WD
€ 9, 90
net in 4 WD
€ 44,90 net
€ 53,43 gross
• Plated halfholes
• Sideplating
8 WD
€ 29,80 net €11, 78
gross in 8 WD € 39,70 net
€ 47,24 gross
• Custom layer-buildup
• Thin laminates
€ 35,46 gross incl. German VAT 19% • PCB thickness up to 7mm
• Backplanes, Backdrill
ALREADY INCLUDED ALREADY INCLUDED YOUR ADVANTAGE • PCI cards, Goldfingers
0.1mm tracks & annular ring, Unlimited pads, thickness 100- 2 Layer PCB • Thick copper
0.2mm drills, FR4 1.55mm 35µm 120µm, PCB name half-lasered on • Panel production
together with
Cu, surface HAL lead-free, 2x sol- squeegee side, optional pad reduc- • UL certified (E198312)
der-stop green, 1x legend print tion, finishing treatment deburring on SMD-Stencil
• IPC-A-600
white, E-Test, Design Rule Check both sides, axial tolerance only ±2µm Only 1x shipping
Surface finish e.g.:
• HAL lead-free • chem. Gold (ENIG)
SMD-Stencil for €9,90 - Hightech makes it possible: DEBURRING: • ENEPIG, Bondgold. ...
Our high-performance laser systems for SMD stencils meet the highest
quality standards with optimum cutting quality (axial deviation only ± 2µm). Special material e.g.
All common quick clamping frames (for example ZelFlex, Pag- • Rogers • FR4 HTg
gen, VectorGuard, etc.) and aluminum frames are available. All • Alu core (1.0 - 8.0 W/mK)
SMD-Stencils from Multi-CB are deburred on both sides. Addition-
al finishing treatments include electropolishing and nano coating.
Your advantage - Deburring avoids time-consuming reworking.
DISTRIBUTORS wanted
PCBs including 0.1mm Tracks, 0.2mm Drills, 4WD Standard! PCB experts only
Comparing pays off, why pay more for less performance?
High-tech makes it possible without surcharge! ALL-INCLUSIVE Contact England: Contact Germany:
PRICING: Multi Circuit Boards Ltd.
Business Centres, HC
Multi Leiterplatten GmbH
Brunnthaler Str. 2
GB-Poole BH17 7FJ DE-85649 Brunnthal