If you are having issues with the exercises, please create a ticket on DevZone:
Click or drag files to this area to upload. You can upload up to 2 files.

Device driver model

The Zephyr RTOS that the nRF Connect SDK is based on provides a device driver model. This driver implementation is highly decoupled from its API, which allows developers to switch out the low-lever driver implementation without modifying the application on top, because we can use the same generic API.

This decoupling has many benefits, including a high level of portability, as it makes it possible to use the same code on different boards without manually modifying the underlying driver implementation.


The Zephyr device driver model was also covered in Lesson 2 – Device driver model of the nRF Connect SDK Fundamentals course

The Zephyr device driver model is the architecture that defines the association between the generic APIs and the device driver implementations. We can split the model into three different sections, as shown in the image below.

The three sub-categories for the device driver model are

  1. Device driver APIs
  2. Device driver instances
  3. Device driver implementation

The application interacts with the generic type API (see Peripherals for a list of generic APIs available). The generic APIs interface with the device driver instances by obtaining a device pointer for the hardware in question. The structure and content of the device pointer is defined in the device driver implementation, which is the lowest layer of the device driver model.

We will cover these three parts in detail and in the exercise section of this lesson, implement these to construct a device driver of our own.

Register an account
Already have an account? Log in
(All fields are required unless specified optional)

  • 8 or more characters
  • Upper and lower case letters
  • At least one number or special character

Forgot your password?
Enter the email associated with your account, and we will send you a link to reset your password.