DEVportal
API and Examples for the nPZero
Loading...
Searching...
No Matches
DEVportal

Introduction

Documentation for the nPZero API driver that provides an interface to control and manage the nPZero on a register level, enabling users to efficiently handle power-related functionalities in their applications.

It includes a Hardware Abstraction Layer (HAL) for I2C operations that users can modify to suit their specific hardware configurations.

Hardware requirements

In order to run all the example code you will need the following hardware.

  • nPZero EVB
  • STM32L053C8 Host MCU (Bundled with EVB)
  • Temperature sensor AMS6212 (Bundled with EVB)
  • Segger J-LINK Debugger

Key Features

  • Control and manage power-related operations through a unified interface.
  • Communicate with multiple sensors using I2C and SPI protocols.
  • Facilitate efficient power management and sensor control in embedded systems.
  • Enables the host system to control multiple I2C and SPI peripherals connected to the IC.
  • Allows users to customize the I2C hardware-specific functions to match their system's configurations and peripherals.
  • Includes example code to facilitate a quick start for utilizing the driver and controlling connected peripherals.

Usage

To utilize the nPZero driver effectively, follow these steps:

  • Ensure proper initialization of the Hardware Abstraction Layer (np0_hal.c).
  • Implement necessary configurations for sensor communication over I2C or SPI. See coding examples.
  • Utilize the provided functions to manage power operations and interact with sensors.
  • Refer to the example code file for a quick start and implementation reference.

The provided example code demonstrates how to initialize the driver, configure the nPZero, and control connected peripherals using the driver's functions.

For detailed function usage and guidelines, refer to the function documentation provided in this driver's documentation.

Coding Examples

There are coding examples for the HAL, ADC and different Peripheral Modes for the sensors that are bundled with the EVB. The examples can be found here:

  • np0_hal_read Example: Example of integration with STM32 MCU to read nPZero register throw I2C
  • np0_hal_write Example: Example of integration with STM32 MCU to write nPZero register throw I2C
  • I2C Sensor Control Example: Illustrates how to interface and control a sensor connected via I2C using the nPZero driver.
  • ADC Example: Example to Demonstrate the configuration and set of the threshould for the Internal and External ADC from nPZero.