Reader small image

You're reading from  Embedded Systems Architecture - Second Edition

Product typeBook
Published inJan 2023
PublisherPackt
ISBN-139781803239545
Edition2nd Edition
Right arrow
Author (1)
Daniele Lacamera
Daniele Lacamera
author image
Daniele Lacamera

Daniele Lacamera is a software technologist and researcher with vast experience in software design and development on embedded systems for different industries, currently working as freelance software developer and trainer. He is a worldwide expert in TCP/IP and transport protocol design and optimization, with more than 20 academic publications on the topic. He supports free software by contributing to several projects, including the Linux kernel, and his involvement within a number of communities and organizations that promote the use of free and open source software in the IoT.
Read more about Daniele Lacamera

Right arrow

Designing low-power embedded applications

In this section, a few design patterns are proposed to achieve a better energy profile on the target device, by evaluating the power demand of all the components and the states of the system we are about to design. Once we know how to measure the values in the target, and the details about the low-power mode in the selected architecture and microprocessor family, the application can be programmed, keeping other parameters in mind, such as the energy efficiency of the software we are writing.

Replacing busy loops with sleep mode

The reason busy loops are very popular among hobbyists is that they are so easy to implement. Suppose that the system needs to wait for a digital input to switch to a low-logic state, and this input is mapped to a certain GPIO. This can be easily done with the following one line of code:

while((GPIOX_IDR & (1 << INPUT_PINX)) != 0)
  ;

While this is perfectly working as expected, it will...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Embedded Systems Architecture - Second Edition
Published in: Jan 2023Publisher: PacktISBN-13: 9781803239545

Author (1)

author image
Daniele Lacamera

Daniele Lacamera is a software technologist and researcher with vast experience in software design and development on embedded systems for different industries, currently working as freelance software developer and trainer. He is a worldwide expert in TCP/IP and transport protocol design and optimization, with more than 20 academic publications on the topic. He supports free software by contributing to several projects, including the Linux kernel, and his involvement within a number of communities and organizations that promote the use of free and open source software in the IoT.
Read more about Daniele Lacamera