Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Bare-Metal Embedded C Programming
Bare-Metal Embedded C Programming

Bare-Metal Embedded C Programming: Develop high-performance embedded systems with C for Arm microcontrollers

Arrow left icon
Profile Icon Israel Gbati
Arrow right icon
€31.99
Paperback Sep 2024 438 pages 1st Edition
eBook
€17.99 €25.99
Paperback
€31.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Israel Gbati
Arrow right icon
€31.99
Paperback Sep 2024 438 pages 1st Edition
eBook
€17.99 €25.99
Paperback
€31.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€17.99 €25.99
Paperback
€31.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Table of content icon View table of contents Preview book icon Preview Book

Bare-Metal Embedded C Programming

Setting Up the Tools of the Trade

In the world of embedded systems, crafting efficient firmware begins with a clear comprehension of the tools available. This chapter will guide you in establishing a robust development environment, ensuring that you are equipped with all the necessary tools for a comprehensive firmware development experience.

Central to our discussion is the concept of datasheets. Consider these as the detailed blueprints for any microcontroller, encompassing its capabilities, specifications, and intricate details. However, the challenge often isn’t merely understanding a datasheet but also sourcing the correct datasheets tailored to your specific microcontroller. To address this, I will assist you in pinpointing and understanding both datasheets and user manuals important to our chosen microcontroller.

As we progress, we’ll delve into the intricacies of setting up our Integrated Development Environment (IDE) and acknowledging its critical function within the development life cycle. Furthermore, you’ll gain insights into configuring the GNU Arm Embedded Toolchain and OpenOCD. These tools will later empower us to craft our firmware, bypassing the need for an IDE altogether.

In this chapter, we will explore the following main topics:

  • Essential development tools for microcontrollers
  • The development board
  • Datasheets and manuals – unraveling the details
  • Navigating the STM32CubeIDE

Essential development tools for microcontrollers

In this section, we will explore the essential tools that form the backbone of our development process. Understanding these tools is important, as they will be our companions in transforming ideas into functioning firmware.

When selecting tools for firmware development, we have two primary options.

  • IDEs: An IDE is a unified software application offering a Graphical User Interface (GUI) tailored to crafting software – in our context, firmware. Popular IDEs for microcontroller firmware development include the following:
  • Keil uVision (also known as Keil MDK): Developed by ARM Holdings
  • STM32CubeIDE: Developed by STMicroelectronics
  • IAR Embedded Workbench: Developed by IAR Systems

    These IDEs boast a GUI-centric design, enabling users to conveniently create new files, build, compile, and step through code lines interactively. For the demonstrations and exercises in this book, we’ll use the STM32CubeIDE. It has all the requisite features and is generously available for free, without any code size constraints.

  • Toolchains: At its core, a toolchain is a cohesive set of development tools, sequenced in distinct stages, to produce the final firmware build for the target microcontroller. This approach bypasses the comfort of a GUI. Instead, firmware is written using basic text editors such as Notepad or Notepad++, with the command line used to execute the various phases of the build process –commands such as assemble, compile, and link are often used. In this book, we’ll use the open source GNU Arm Embedded Toolchain. Based on the renowned open source GNU Compiler Collection (GCC), this integrates a GCC compiler tailored for ARM, the GNU Debugger (GDB) debugger, and several other invaluable utilities.

In the following section, we will carefully go through the process of setting up our preferred IDE, the STM32CubeIDE.

Setting up the STM32CubeIDE

Throughout this book, we’ll use both the STM32CubeIDE and the GNU Arm Embedded Toolchain to develop our firmware. Leveraging an IDE such as STM32CubeIDE enables us to easily analyze and compare the linker script and startup files, autogenerated by the IDE, against those we’ll construct from the ground up.

Let’s start by downloading and installing STM32CubeIDE:

  1. Launch your web browser and navigate to st.com.
  2. Click on STM32 Developer Zone, and then select STM32CubeIDE.
Figure 1.1: The home page of st.com

Figure 1.1: The home page of st.com

  1. Scroll down to the All software versions section of the page and click on Download Software. You’ll need to log into your ST account before proceeding with the download.
Figure 1.2: The All software versions section of the stm32cubeide page

Figure 1.2: The All software versions section of the stm32cubeide page

  1. If you don’t have an account, click on Login/Register to sign up. If you already have one, simply log in.
  2. Complete the registration form with your first name, last name, and email address.
  3. Click on Download to start the download process. A .zip file will be downloaded into your Downloads folder.

Let’s install the STM32CubeIDE:

  1. Unzip the downloaded package.
  2. Double-click the st-stm32cubeide file to initiate the installer.
  3. Retain default settings by clicking Next throughout the setup process.
  4. On the Choose Components page, ensure that both SEGGER J-Link drivers and ST-LINK drivers are selected. Then, click Install.
Figure 1.3: The installer showing the Choose Components page

Figure 1.3: The installer showing the Choose Components page

Having successfully installed STM32CubeIDE on our computer, we will now proceed to configure our alternate development tool, the GNU Arm Embedded Toolchain.

Setting up the GNU Arm Embedded Toolchain

In this section, we will go through the process of setting up the GNU Arm Embedded Toolchain – an important tool for developing firmware for ARM-based microcontrollers:

  1. Launch your web browser and navigate to https://developer.arm.com/downloads/-/gnu-rm.
  2. Scroll down the page to find the download link appropriate for your operating system. For those of you using Windows, like myself, opt for the .exe version. For Linux or macOS users, choose the corresponding .tar file for your operating system.
  3. After the download completes, double-click the installer to begin the installation process.
  4. Read through the license agreement. Then, choose to install in the default folder location by clicking Install.
Figure 1.4: The GNU Arm Embedded Toolchain installer

Figure 1.4: The GNU Arm Embedded Toolchain installer

  1. When the installation is complete, ensure that you check the Add path to environment variable option.

Figure 1.5: The installer showing the Add path to environment variable option

Figure 1.5: The installer showing the Add path to environment variable option

  1. Click Finish to finalize the setup.

Setting up OpenOCD

For firmware development with the GNU Arm Toolchain, OpenOCD plays an integral role, facilitating both the downloading of firmware into our microcontroller and the debugging of code in real time.

Let’s set up OpenOCD:

  1. Launch your web browser and navigate to https://openocd.org/pages/getting-openocd.html.
  2. Scroll to the section titled Unofficial binary packages.
  3. Click on the link for multiplatform binaries.
Figure 1.6: The Unofficial binary packages section

Figure 1.6: The Unofficial binary packages section

  1. Identify the latest version compatible with your operating system. For an exhaustive list, click on Show all 14 assets.
Figure 1.7: The OpenOCD packages

Figure 1.7: The OpenOCD packages

  1. For Windows users, download the win32-x64.zip version. For Linux or macOS users, download the corresponding .tar file for your operating system.
  2. Once downloaded, unzip the package.
  3. Navigate to the extracted folder, and then the bin subfolder. Here, you’ll find the openocd.exe application. This is the application we shall call in the command prompt together with the specific script of our chosen microcontroller, in order to debug or download code onto the microcontroller.

Within the xpack-openocd-0.12.0-2 | openocd | scripts directory structure, you’ll find scripts tailored for various microcontrollers and development boards.

Next, we need to add OpenOCD to our environment variables:

  1. Begin by relocating the entire openocd folder to your Program Files directory.
Figure 1.8: OpenOCD moved to Program Files, showing the path to the bin folder

Figure 1.8: OpenOCD moved to Program Files, showing the path to the bin folder

  1. Copy the path to the openocd bin folder.
  2. Right-click on This PC, and then choose Properties.
  3. Search for and select Edit the system environment variables.
Figure 1.9: The This PC properties page

Figure 1.9: The This PC properties page

  1. Click the Environment Variables button in the System Properties pop-up window.
Figure 1.10: The System Properties pop-up window

Figure 1.10: The System Properties pop-up window

  1. Under the User variables section of the Environment Variables popup, double-click the Path entry.
Figure 1.11: The Environment Variables popup

Figure 1.11: The Environment Variables popup

  1. In the Edit environment variable popup, click on New to create a row for a new path entry.
  2. Paste the previously copied OpenOCD path into this new row.
  3. Confirm your changes by clicking OK on the various pop-up windows.
Figure 1.12: The Edit environment variable popup

Figure 1.12: The Edit environment variable popup

Finally, we have successfully completed the setup process. We have configured two essential, standalone tools to develop firmware for STM32 microcontrollers – the STM32CubeIDE for an IDE, and the GNU Arm Embedded Toolchain, complemented by OpenOCD, to develop and debug our firmware without an IDE.

Next, we will turn our attention to our development board.

The development board

In this segment of the chapter, we will delve into the specifications and features of the development board selected for this book.

Understanding the role of a development board

Firstly, let’s clarify the concept of a development board. It’s essential to note that a development board is not synonymous with a microcontroller. While a development board might derive part of its name from the microcontroller mounted on it, it would be a misnomer to refer to the board itself as the microcontroller. A development board allows us to validate our firmware on the exact microcontroller variant we aim to deploy in our final product. Consequently, the firmware tested on our development board is assured to operate identically on the microcontroller in the end product. This is why companies such as STMicroelectronics offer a diverse range of development boards, tailored to each microcontroller in their portfolio.

It’s also essential to contrast the role of a development board with prototyping boards, such as Arduino. While prototyping boards (which might not house the microcontrollers intended for the final product) serve as preliminary testing platforms, development boards elevate this process. They enable us to rigorously test concepts and the performance evaluation of our firmware on the designated microcontroller meant for bulk product manufacturing. For the purposes of this book, our focus will be on the NUCLEO-F411 development board.

An overview of the NUCLEO-F411 Development Board

The NUCLEO-F411 development board is equipped with an STM32F411RE microcontroller, capable of a peak operating frequency of 100MHz. It comes with a generous 512 Kbytes of flash memory and 128 Kbytes of SRAM. Furthermore, the board is equipped with several columns of berg pins, allowing us to effortlessly make connections using jumper wires to interface with a variety of modules and components – from sensors and motors to LEDs. For quick and straightforward input/output firmware tests, the board also features a built-in user button and LED, eliminating the immediate need for external components.

Figure 1.13: The NUCLEO-F411 development board

Figure 1.13: The NUCLEO-F411 development board

Now that we’re familiar with the development board, let’s delve into the various types of documentation that are essential for a comprehensive understanding and programming of the development board.

Datasheets and manuals – unraveling the details

Our main objective in this book is to write firmware code that interacts directly with the registers of our microcontroller. This means there’s no abstraction or intermediary library between our code and the target microcontroller. To achieve this, it’s important to grasp the internal architecture of the microcontroller, understand the addresses of each register we interact with, and know the functions of relevant bits within those registers. This is where datasheets and manuals come in. Manufacturers provide these documents for users to understand their products, which in our case refers to the microcontroller core architecture, the microcontroller, and the development board.

Two distinct companies play roles in the making of our development board. The first is ARM Holdings, which licenses processor and microcontroller core architecture designs to semiconductor manufacturing firms such as STMicroelectronics, Texas Instruments, and Renesas. These manufacturers then produce the physical microcontroller or processor based on the licensed designs from ARM, often with their custom additions. This explains why two different microcontrollers from separate manufacturers might share the same microcontroller core. For instance, both the TM4C123 from Texas Instruments and STM32F4 from STMicroelectronics are based on the ARM Cortex-M4 core.

Since our chosen development board, the NUCLEO-F411 from STMicroelectronics, is based on the ARM Cortex-M4 microcontroller core, in the following sections, we’ll delve into the documentation for the board, its integrated microcontroller, and the underlying core.

Understanding STMicroelectronics’ documentation

A significant reason for the popularity of STM32 microcontrollers is STMicroelectronics’ continued commitment to providing comprehensive support. This includes well-organized documentation and various firmware development resources.

STMicroelectronics has a range of documents, each following a specific naming convention. Let’s discuss those relevant to our work:

  • Reference Manual (RM): All RMs start with the letters RM, followed by a number. For instance, the RM for our microcontroller is RM0383. This document details every register in our microcontroller, clarifying each bit’s role and providing insights on register configurations.
  • Datasheet: The datasheet is named after the microcontroller, so for the STM32F411 microcontroller, the datasheet is simply called STM32F411. This document provides a functional overview of the microcontroller, a complete memory map, a block diagram showcasing the microcontroller’s peripherals and connecting buses, as well as the pinout and electrical characteristics of the microcontroller.
  • UM (User Manual): Starting with the letters UM and followed by a number, such as UM1724 for our NUCLEO-F411, this document focuses on the development board. It describes how components on our board, such as LEDs and buttons, are connected to specific ports and pins of the microcontroller.

The generic user guide by ARM

ARM provides documents for every microcontroller and processor core they design. Important to our discussion is the generic user guide for our microcontroller core. As we’re using the STM32F411, which is based on the ARM Cortex-M4 core, we’ll refer to the Cortex-M4 generic user guide.

This means that if we were using an STM32F7 microcontroller, which is based on the ARM Cortex-M7 core, then we would need to get the Cortex-M7 generic user guide. The naming convention of this document is simply the name of the microcontroller core + the phrase generic user guide.

As the name implies, this document provides information generic to the specific microcontroller core. This means that the information provided in the Cortex-M4 generic user guide applies to all microcontrollers based on the Cortex-M4 core, irrespective of the manufacturers of those microcontrollers. In contrast, the information provided in the STMicroelectronics documentation applies to only STMicroelectronics’ microcontrollers.

Figure 1.14: The relationship between the development board, microcontroller, and microcontroller core

Figure 1.14: The relationship between the development board, microcontroller, and microcontroller core

Why do we need the generic user guide?

The generic user guide provides information on the core peripherals of the processor core. As the term suggests, these core peripherals are consistent across all microcontrollers, based on a specific core. The Cortex-M4 core has five core peripherals – the System Timer, Floating-Point Unit, System Control Block, Memory Protection Unit, and the Nested Vectored Interrupt Controller. When developing bare-metal drivers for these peripherals, the generic user guide is the definitive source for the essential details.

Additionally, the guide provides information on the microcontroller core’s Instruction Set, as well as the Programmer’s Model, Exception Model, fault handling, and power management.

Getting the documents

To obtain the aforementioned documents, you can use the following search phrases on Google:

  • RM: Either STM32F11 Reference Manual or RM0383.
  • Datasheet: STM32F411 Datasheet.
  • UM: Nucleo-F11 User Manual or UM1724.
  • Generic user guide: Cortex-M4 Generic User Guide

Direct links to these documents are also available, in the Technical requirements section of this chapter.

Before analyzing the key areas of the various documents to program our development board, let’s first take a closer look at the STM32CubeIDE we installed earlier. We will familiarize ourselves with its features and functionalities in the next section.

Navigating the STM32CubeIDE

When you launch STM32CubeIDE for the first time, you’ll see the Information Center. This center offers quick access to a number of valuable resources for STM32 firmware development.

To exit the Information Center, simply click the X on its tab. If you wish to revisit it later, simply navigate to Help | Information Center.

Figure 1.15: Information Center

Figure 1.15: Information Center

The STM32CubeIDE is based on the Eclipse framework, and therefore, the layout and elements are similar to those of other Eclipse-based IDEs.

Let’s go through the process of creating a new project:

  1. Either click Create a New STM32 project in the empty Project Explorer pane or select File | New | STM32 Project.
Figure 1.16: A workspace showing an empty Project Explorer pane

Figure 1.16: A workspace showing an empty Project Explorer pane

  1. You will be presented with the Target Selection window to select the microcontroller or development board for your project.
  2. Click the Board Selector tab.
  3. Enter NUCLEO-F411 into the Commercial Part Number field.
Figure 1.17: The Target Selection window

Figure 1.17: The Target Selection window

  1. From the displayed board list, select NUCLEO-F11RE, and then click Next.
Figure 1.18: The board list with NUCLEO-F411 selected

Figure 1.18: The board list with NUCLEO-F411 selected

  1. Give the project a name.
  2. For Targeted Project Type, select Empty.
Figure 1.19: The Setup STM32 project window

Figure 1.19: The Setup STM32 project window

  1. Click Finish to create the project.

You will see the new project, containing all the necessary startup files and linker scripts, in the Project Explorer pane.

Figure 1.20: The Project Explorer pane showing a new project

Figure 1.20: The Project Explorer pane showing a new project

Understanding the control icons

The most frequently used control icons are the New, Build, and Debug icons.

Figure 1.21: The control icons

Figure 1.21: The control icons

Let’s look closely at the functions of these icons:

  • The New icon: This icon allows us to create various files, including source code, header files, projects, libraries, and more. This function is also accessible via File | New.
  • The Build icon: Used for building projects. This functionality can also be accessed by right-clicking on a project and selecting Build Project.
  • The Debug icon: This launches a debug configuration to facilitate project debugging. This functionality is also available by right-clicking a project and selecting Debug Project.

These control icons provide quick access to essential functions, significantly enhancing productivity and streamlining the development process.

Summary

In this chapter, we set out to create a robust environment for embedded firmware development, focusing on the careful selection and setup of essential tools. Each tool we selected plays a crucial role in the efficient development of firmware for microcontrollers. We explored the installation processes of STM32CubeIDE, the GNU Arm Embedded Toolchain, and OpenOCD, laying a solid groundwork for our development activities.

We then introduced the NUCLEO-F411 development board, equipped with an STM32F411RE microcontroller, as our experimental platform, and we spent time identifying some of the components on the board.

We also emphasized the importance of knowing the different types of datasheets and reference manuals, equipping us with the ability to quickly access detailed information about a microcontroller’s architecture and functionalities.

Moving on to the next chapter, we will leap into developing our first bare-metal firmware, using only the documentation we have compiled as our guide.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Learn to develop bare-metal firmware for Arm microcontrollers from scratch
  • Understand hardware intricacies to minimize your dependency on third-party libraries
  • Navigate microcontroller manuals with ease and learn to write optimized code
  • Purchase of the print or Kindle book includes a free PDF eBook

Description

Bare-Metal Embedded C Programming takes you on an unparalleled journey to equip you with the skills and knowledge to excel in the world of embedded systems. The author, with over a decade of hands-on experience in engineering, takes a unique, practical approach to teach you how to decode microcontroller datasheets so that you’re able to extract vital information for precise firmware development. Register manipulation will become second nature to you as you learn to craft optimized code from scratch. The book provides in-depth insights into the hardware intricacies of microcontrollers. You'll navigate user manuals and documentation with ease, ensuring a profound understanding of the underlying technology. The true uniqueness of this book lies in its commitment to fostering independent expertise. Instead of simply copy pasting, you'll develop the capability to create firmware with confidence, paving the way for professional-grade mastery. By the end of this book, you'll have honed your skills in reading datasheets, performing register manipulations, and crafting optimized code, as well as gained the confidence needed to navigate hardware intricacies and write optimized firmware independently, making you a proficient and self-reliant embedded systems developer.

Who is this book for?

Whether you're an experienced engineer seeking in-depth expertise in decoding datasheets, precise register manipulations, and creating firmware from scratch, or a software developer transitioning to the embedded systems domain, this book is your comprehensive guide. It equips you with the practical skills needed for confident, independent firmware development, making it an essential resource for professionals and enthusiasts in the field.

What you will learn

  • Decode microcontroller datasheets, enabling precise firmware development
  • Master register manipulations for optimized Arm-based microcontroller firmware creation
  • Discover how to navigate hardware intricacies confidently
  • Find out how to write optimized firmware without any assistance
  • Work on exercises to create bare-metal drivers for GPIO, timers, ADC, UART, SPI, I2C, DMA, and more
  • Design energy-efficient embedded systems with power management techniques
Estimated delivery fee Deliver to Austria

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Sep 30, 2024
Length: 438 pages
Edition : 1st
Language : English
ISBN-13 : 9781835460818
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Estimated delivery fee Deliver to Austria

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Publication date : Sep 30, 2024
Length: 438 pages
Edition : 1st
Language : English
ISBN-13 : 9781835460818
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 93.96 102.97 9.01 saved
RAG-Driven Generative AI
€40.99
Bare-Metal Embedded C Programming
€31.99
Offensive Security Using Python
€20.98 €29.99
Total 93.96 102.97 9.01 saved Stars icon

Table of Contents

20 Chapters
Chapter 1: Setting Up the Tools of the Trade Chevron down icon Chevron up icon
Chapter 2: Constructing Peripheral Registers from Memory Addresses Chevron down icon Chevron up icon
Chapter 3: Understanding the Build Process and Exploring the GNU Toolchain Chevron down icon Chevron up icon
Chapter 4: Developing the Linker Script and Startup File Chevron down icon Chevron up icon
Chapter 5: The “Make” Build System Chevron down icon Chevron up icon
Chapter 6: The Common Microcontroller Software Interface Standard (CMSIS) Chevron down icon Chevron up icon
Chapter 7: The General-Purpose Input/Output (GPIO) Peripheral Chevron down icon Chevron up icon
Chapter 8: System Tick (SysTick) Timer Chevron down icon Chevron up icon
Chapter 9: General-Purpose Timers (TIM) Chevron down icon Chevron up icon
Chapter 10: The Universal Asynchronous Receiver/Transmitter Protocol Chevron down icon Chevron up icon
Chapter 11: Analog-to-Digital Converter (ADC) Chevron down icon Chevron up icon
Chapter 12: Serial Peripheral Interface (SPI) Chevron down icon Chevron up icon
Chapter 13: Inter-Integrated Circuit (I2C) Chevron down icon Chevron up icon
Chapter 14: External Interrupts and Events (EXTI) Chevron down icon Chevron up icon
Chapter 15: The Real-Time Clock (RTC) Chevron down icon Chevron up icon
Chapter 16: Independent Watchdog (IWDG) Chevron down icon Chevron up icon
Chapter 17: Direct Memory Access (DMA) Chevron down icon Chevron up icon
Chapter 18: Power Management and Energy Efficiency in Embedded Systems Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela