nPZero Configurator
Introduction
The nPZero Configurator is a desktop tool that can be used to evaluate, develop and test applications based on the nPZero platform. The current version supports the following devices:
- nPZero G1S
- nPZero 2100
The application can be downloaded here: nPZeroConfigurator_v2.1.0.zip
To install it simply unzip the content to any local folder, and run setup.exe. If you have an earlier version installed please un-install it before installing the new version.
The installer can also be downloaded from the Github installer repository
When automatic updates are enabled, every time the program is launched it will look online for a newer version, and if one is found it will request whether or not the new one should be installed. You can also check manually at any time with Help → Check for Updates.
System requirements
- 4 GB of RAM
- 40 MB of disk space
- Windows 10 or later
- .NET 8.0
First launch
The first time the program is launched a welcome window is shown, where the following settings can be chosen:
- Default device - The device (nPZero G1S or nPZero 2100) that the Configurator starts with. You can switch device at any time from the Device menu.
- Automatically check for updates - Look for a newer version every time the application is launched (enabled by default).
- Send anonymous usage statistics - Help improve the application. No personal information or workspace content is sent (disabled by default).
Click Get started to open the main window. The welcome window can be opened again at any time from Help → Show Welcome Screen to change these settings.
Getting started
A typical workflow in the nPZero Configurator looks like this:
- Select the device you are working with from the Device menu in the top right corner of the window.
- Configure the device in the Configuration section, starting with the global parameters at the top, then the GPIOs and the peripherals you want the nPZero to manage. For the nPZero 2100, a tested configuration can be applied directly from the Peripheral Presets.
- Check the system in the Hardware Visualizer (nPZero 2100 only), where the schematic shows how the external devices are connected, and the logic view simulates how the nPZero behaves over time.
- Check the result in the Registers section, where every change is instantly reflected in the device registers, and fine-tune individual register fields if needed.
- Generate code in the Generated Code section by picking a template, and save the code to a C source or header file that can be included in your host MCU project.
- Save the workspace (Ctrl+S) so the configuration can be reloaded or shared later.
Description
The pictures below show the main interface of the nPZero Configurator, for the nPZero G1S and the nPZero 2100:
The tool consists of the following main sections, most of which can be shown/hidden through the View menu. The sections can also be resized by dragging the dividers between them.
| Section | Description | Shortcut |
|---|---|---|
| Registers | Register map of the selected device | F2 |
| Configuration | Graphical configuration of the selected device, including the peripheral presets for the nPZero 2100 | F3 |
| Generated Code | Code generated from the current configuration | F4 |
| Hardware Visualizer | Application schematic and logic view simulation (nPZero 2100 only) | F5 |
| Messages | Log of application events, warnings and errors | F6 |
For the nPZero 2100 the Registers and Generated Code sections are stacked in the left column, followed by the Configuration section (with the Peripheral Presets below it) and the Hardware Visualizer to the right.
Selecting a device
The device currently being configured is shown in bold in the right side of the main menu, for example Device -> nPZero G1S. Click it to switch between the nPZero G1S and the nPZero 2100.
Each device has its own layout and its own workspace, and both are kept in memory at the same time. Switching device does not reset or change the configuration of the other device, so it is possible to switch back and forth between the two without losing any work.
If you load a workspace that was saved for the other device, the Configurator will automatically switch to that device before loading it.
Main Menu
- File
- Reset Workspace (Ctrl+R) - Resets the workspace of the selected device to default values. Note: This will delete any configuration changes from the application.
- Load Workspace (Ctrl+O) - Load a workspace from file.
- Save Workspace (Ctrl+S) - Save a workspace to file.
- Save Workspace As (Ctrl+Shift+S) - Save a workspace to a new file.
- Exit (Alt+F4) - Exits the application.
- View
- Registers (F2) - Show/hide the Registers section.
- Configuration (F3) - Show/hide the Configuration section.
- Code Generator (F4) - Show/hide the Generated Code section.
- Schematic & Logic View (F5) - Show/hide the Hardware Visualizer section (nPZero 2100 only).
- Messages (F6) - Show/hide the Messages window.
- Recent Workspaces - Load one of the last 10 recently saved or loaded workspaces. The four most recent can also be opened with Alt+1 to Alt+4.
- Help
- Open User Folder - Will open a Windows Explorer window in the user folder, where user presets and workspaces are stored by default.
- Check for Updates - Will manually trigger a check for application updates.
- Open Online Documentation (F1) - Opens this page in your web browser.
- Show Welcome Screen - Opens the welcome window again, to change the default device, automatic updates and usage statistics settings.
- About - Display application information and support links.
- Device - Select which nPZero device to configure (see Selecting a device).
Workspaces are stored as .xml files, and contain the full configuration of the selected device. For the nPZero 2100 the workspace also holds the battery settings of the schematic and the simulation settings of the logic view.
Configuration
The Configuration section breaks down all the configuration parameters of the nPZero device in a graphical way, and provides tooltips and descriptions to make the various parameters more intuitive to understand. Hover the mouse over any parameter to see its tooltip, which shows the name of the setting and a description of what it does.
Any change to the parameters in the Configuration section will be instantly reflected in the Registers, Generated Code and Hardware Visualizer sections.
Some options are only shown or enabled when they are relevant. For example, the peripheral parameters are hidden until a power mode other than Disabled is selected, the wake-up threshold of an ADC channel is only shown once the channel is enabled, and the SPI chip select pin assignment of a peripheral is disabled (greyed out) while it uses I2C.
Time parameters, such as polling periods and timeouts, are set with a slider combined with two text fields: the raw register value, and the resulting time in a readable format. Either text field can be edited directly. Thresholds are set with a range slider, where the lower and upper threshold can be dragged, or typed into the text field below it.
nPZero G1S
At the top you will find global configuration parameters, which include all the parameters not directly related to connected peripherals: host power switch mode, system clock source and divider, ADC clock divider, the internal and external (ADC_IN pin) ADC channels with optional wake-up thresholds, wake-up on any or all triggers, host wake-up timeout, interrupt pin pull-ups, IO output strength, internal I2C pull-ups and clock out configuration.
These are followed by peripheral configuration for the 4 available peripherals of the nPZero G1S. The peripheral configuration parameters are hidden as long as the power mode of the peripheral is set to Disabled, but will appear once a different power mode is selected.
Each peripheral can be given a Name, and has the following parameters: peripheral on in standby mode, power mode, wake on peripheral, sensor type (I2C or SPI), polling mode, power switch mode, interrupt pin mode, comparison mode, sensor data type, multi byte transfers, wake up on NAK, swap registers, SPI mode, polling period, sensor init and read sequences, number of bytes, I2C address, peripheral value register address, retries after I2C NAK, data threshold, and the pre-/post-init delays (see Pre-init and post-init delays).
Energy analysis - By entering the Boot energy (charge in C needed to boot and initialize the peripheral), the Poll energy (charge in C needed to read it) and the Sleep current of the peripheral when it is not power gated, the Average current analysis shows the resulting average current with and without the nPZero, and the relative savings for the selected polling period.
Data conversion - An optional Data conversion formula (with the raw value as X) and Data unit can be entered, so the data threshold is shown in physical units rather than raw register values.
Configuration presets - Peripheral presets can be saved and loaded using the Load, Save and Clear buttons next to Configuration preset. This allows easy sharing of peripheral configurations that have been tested, and the tool comes pre loaded with a set of presets for sensors that have been tested internally (for example the AS6212, HDC2080 and LIS2DW12, as well as generic active high and active low interrupt pins).
nPZero 2100
The nPZero 2100 configuration is split into three parts.
nPZ2100 Global Configuration
| Parameter | Description |
|---|---|
| System clock source | Low-power oscillator or Crystal oscillator (external 32.768 kHz crystal on XTAL1/XTAL2). Both give a 16 Hz system clock, so polling periods and timeouts are the same for both. |
| ADC clock divider | System clock (16 Hz), or the crystal oscillator clock divided by 512 (64 Hz), 128 (256 Hz) or 32 (1024 Hz). The divided clocks need the external crystal. |
| ADC channels 1-3 | Enable the ADC1 pin, ADC2 pin and internal reference channels, use them as a wake-up source, and set their wake-up threshold window. |
| Wake up on any or all triggers | Wake the host when Any trigger or only when All triggers are met. |
| Global timeout extension / period | The global timeout wakes the host periodically. It is set in steps of 1/16 s, or in steps of 2 s when the extension is enabled, to allow for much longer periods. |
| Watchdog timer | Enable the watchdog and set its timeout (2 s steps). |
| Global counter / alarm | The 16 Hz global counter, with an optional alarm. |
| Power-aware (PA) mode | Enable power-aware mode, optionally disable wake-up while in PA mode, and select the PA activation source (INT1-INT4 or ADC1-ADC3). |
| Peripheral logging | Enable logging of peripheral values, optional log rotation, and the log start address. |
| Event counter | Enable the event counter, select its source (INT1-INT4 or SW_LP1-SW_LP4) and set the trigger value. |
The settings of the watchdog, global counter alarm, power-aware mode, logging and event counter only appear once the feature is enabled.
GPIO Configuration
| Pin | Settings |
|---|---|
| All | Power switch slew rate (slow or fast rise time), IO output strength (normal or high) |
SW_HP | Power Switch Mode, Logic output (High when host enabled) or Logic output inverted (Low when host enabled) |
SW_LP1-SW_LP4 | Mode: Switch w/rise detect, Switch, Logic Output High or Logic Output Low. Standby: Disabled in standby or On in standby |
SDA/SCL | Internal I2C pull-ups: Disabled, Always on or Auto (disabled in idle) |
INT1-INT4 | Mode: Input High, Input Low (interrupt inputs), Trigger High or Trigger Low (peripheral trigger outputs). Pull-up: Disabled, Low Strength or High Strength |
The same pin settings can also be changed by clicking the pin in the schematic (see Pin popups).
Peripherals 1-6
The nPZero 2100 can manage up to 6 peripherals. Several peripherals can share the same physical sensor, for example to read and compare different values from it. Each peripheral has the following parameters:
| Parameter | Description |
|---|---|
| Power mode | Disabled, Periodic power-on or Always on. All other settings are hidden while the peripheral is disabled. |
| Wake on peripheral | Use the peripheral as a wake-up source for the host. |
| Sync ADC to peripheral | Synchronize an ADC channel to the polling of this peripheral. |
| Sensor type | I2C or SPI communication interface. |
| Polling mode | Periodic initialization, read data and compare against threshold; periodic initialization, wait for interrupt, read data and compare; periodic initialization and wait for interrupt; or wait for asynchronous interrupt. |
| Comparison mode | Default or Inverted threshold comparison. |
| IO assignments | The power switch (SW_LP1-SW_LP4), interrupt pin (INT1-INT4) and SPI chip select (CSN1-CSN4) used by the peripheral. The chip select is disabled in I2C mode. |
| Sensor data type | 16-bit unsigned, 16-bit signed or 8-bit unsigned integer. |
| Multi byte transfers, wake up on NAK, swap registers, I2C read-only | Bus transfer options. |
| SPI mode | Clock polarity and phase (SPI only). |
| Polling period | Time between polls, in steps of 1/16 s. |
| Sensor init / read sequence | The commands written to the peripheral when it is initialized and read (see SRAM handling). Invalid sequences are highlighted in orange. |
| Number of bytes, I2C address, peripheral value register address, retries after I2C NAK | Bus settings. |
| Data threshold | Threshold window the peripheral value is compared against. |
| Logging mode / frequency | Log the value (Enabled or Enabled w/timestamp), on every, every 2nd or every 4th read, or when the value crosses the threshold. Shown when peripheral logging is enabled. |
| Pre-/post-init delay | See Pre-init and post-init delays. |
| Power-aware polling frequency | No change, 2x or 4x polling period, or polling disabled while in PA mode. Shown when power-aware mode is enabled. |
When a preset has been applied to a peripheral, its name is shown below the peripheral header, marked (modified) once the configuration is changed.
For details on the individual parameters please refer to the nPZero 2100 datasheet.
Pre-init and post-init delays
The Pre-init delay (after the peripheral is powered, before it is initialized) and the Post-init delay (after it is initialized, before the value is read) can each be Disabled, Short or Long. Both use the same Delay time slider, which has 256 steps:
- Short delay - 0.64 ms per step, up to 163.2 ms.
- Long delay - 10.24 ms per step (16 times the short delay), up to 2.611 s.
The Short/long delay field below the slider shows both resulting delays, for example 32 ms / 512 ms. The field can be edited directly, for both the nPZero G1S and the nPZero 2100:
- Edit either the short or the long part, and the slider is set to the nearest valid value. The other part is updated to match.
- A single value is used as the short delay, or as the long delay if it is longer than the maximum short delay.
- Values without a unit are in ms. The units
us,ms,sandmincan also be used, for example1.5 s. - Press Enter or move the focus away to apply the value, or press Esc to discard it.
SRAM handling
The sensor init and read sequences are stored in the SRAM of the nPZero. The Configurator places the sequences of the enabled peripherals one after the other in peripheral order, and updates the SRAM_xx registers in the Registers section and the generated code automatically.
Only enabled peripherals (power mode Periodic power-on or Always on) use SRAM. When a peripheral is disabled its SRAM is freed and the layout of the other peripherals is recomputed, so disabled peripherals never take up space or end up in the generated code.
The nPZero 2100 has 256 bytes of SRAM, split into two banks of 128 bytes which are selected through the SRAM_BANK register (0x7F). The nPZero G1S SRAM starts at address 0x80.
Peripheral presets (nPZero 2100)
The lower part of the Configuration section holds the Peripheral Presets view, a library of tested configurations for sensors and other peripherals. Drag the bar between the configuration and the presets to change how much space each of them gets.
Presets are grouped by part number, with the generic presets last. Click a part to show or hide its presets, or use the buttons above the list to show or hide the presets of all parts. Each preset documents the device it was made for:
| Field | Description |
|---|---|
| Name | What the preset does, for example Periodic read with wake-up |
| Part | Part number of the sensor (empty for generic presets) |
| Manufacturer | Manufacturer of the sensor |
| Category | For example Environmental, Movement or Light level |
| Interface (IF) | I2C or SPI for peripherals, Analog for sensors connected to an ADC pin |
| Description | How the sensor is configured, and anything worth knowing when using it |
| Data unit / conversion formula | Used to show the thresholds in physical units (the raw value is X, for example (X/65536)*165-40.5) |
| Datasheet link, author | Optional |
The list can be filtered by typing in the search box (name, part, manufacturer, category and description are searched) and by selecting a category or an interface. Click a column header to sort the list, and right-click a header to show or hide columns (for example Source and Modified). Select a preset to see its details below the list.
- Apply - Select the peripheral (I2C/SPI presets) or ADC channel (analog presets) in Apply to and click Apply, or double-click the preset. The configuration of the peripheral is replaced by the preset, except for its IO assignments (power switch, interrupt pin and chip select), which are kept.
- Save... - Saves the current configuration of the peripheral or ADC channel selected in Save from as a new preset, after asking for the preset information.
- Edit... - Edits the information of the selected preset. Built-in presets are saved as a new user preset.
- Delete - Deletes the selected user preset. Built-in presets can't be deleted.
- Folder / Reload - Opens the folder where user presets are stored, and reloads the presets from disk (for example after copying preset files into the folder).
Group presets configure several consecutive peripherals that read the same sensor, for example one peripheral per axis of an accelerometer. They are marked with the number of peripherals they use, for example (3 peripherals), and are applied starting at the peripheral selected in Apply to.
The Configurator comes with built-in presets for the following parts:
| Part | Manufacturer | Interface | Presets |
|---|---|---|---|
| AS6212 | ams OSRAM | I2C | Temperature, periodic read with wake-up |
| HDC2080 | TI | I2C | Temperature, humidity, or temperature and humidity (group of 2), periodic read with wake-up |
| LIS2DW12 | ST | I2C, SPI | Polled or data-ready interrupt, wake on X, Y or Z axis, or on any axis (group of 3) |
| Generic | - | I2C | Wake-up on interrupt pin |
| Generic | - | Analog | Wake-up outside window |
User presets are listed in bold, and are stored as .xml files in the user_presets\nPZ2100 folder of the user folder (Help → Open User Folder), so they can easily be shared.
Registers
The Registers section breaks down all the registers of the selected nPZero device, and shows how the parameters input in the Configuration section are reflected in the device registers. All the registers and fields listed in the datasheet are available, including the SRAM registers, and by mousing over the various fields a tooltip will pop up detailing the legal values for the field, and a description of the various values.
Each row shows the register address (Addr), the register name (Name), the current register value (Val) and the individual register fields (Fields).
When a parameter is changed in the Configuration section, the register list automatically scrolls to the first affected register, and the changed fields blink briefly.
Register values can be changed directly by modifying the value field on the left side of the register fields. Values can be input in decimal, hexadecimal (use the 0x prefix) or binary (use the b prefix) format.
Fields can also be modified by clicking them. 1-bit fields will simply toggle state when clicked, while for larger fields a popup will appear where a new value can be selected from the list of legal values, or entered directly.
Changes made in the Registers section are reflected back in the Configuration section, so both views always stay in sync.
Hardware Visualizer (nPZero 2100)
The Hardware Visualizer shows an application schematic of the nPZero 2100 together with a logic analyzer style timing view (the logic view). Both are updated automatically whenever the configuration changes. Drag the divider between them to change how much space each of them gets. The logic view sizes itself to the number of signals in use.
Application schematic
The schematic shows the nPZero 2100 pinout and the external devices the current configuration connects to it:
- Host (MCU) - Always shown, powered through
SW_HPand connected to the I2C bus (SCL/SDA), which it uses to configure the nPZero 2100 in Standby. - Peripherals - Each enabled peripheral is connected to its power switch (
SW_LP1-SW_LP4), to the I2C bus or to the SPI bus (MISO,MOSI,MCLKand its chip selectCSN1-CSN4), and to its interrupt pin (INT1-INT4) if it waits for an interrupt. Peripherals are assumed to be separate devices, except when they use the same power switch and the same I2C address (or the same SPI chip select), in which case they are drawn as one device (for example Peripherals 1, 3). - Battery - Connected to
VBAT(see Battery). - External load switches - In front of devices whose power switch pin is in a logic output mode (see External load switches).
- External crystal - On
XTAL1/XTAL2when the crystal oscillator is used (see External crystal).
The pins of the nPZero 2100 show the current configuration:
- Direction - The direction symbol of the
INT1-INT4pins follows their mode: input when configured as an interrupt input, output when configured as a peripheral trigger output.XTAL1/XTAL2are shown as not connected unless the crystal oscillator is enabled. - Power switches - The direction arrows on
SW_HPandSW_LP1-SW_LP4are drawn in the VBAT colour when the pin is in power switch mode (the pin outputs VBAT), and in the normal colour when it is a logic output, so a power switch is easy to tell from a regular output. - Internal pull-ups - When the internal pull-up of
INT1-INT4,SDAorSCLis enabled, a resistor-to-supply symbol is drawn inside the package next to the pin, with its value beside it. On theINTpins the line weight shows the pull-up strength (100 kΩ for low strength, 50 kΩ for high strength). The I2C pull-ups (2 kΩ) are drawn dashed with an A when set to Auto (disabled in idle). Hover the pin to see the pull-up setting and value.
Wires are colored by type (host power, peripheral power, battery, I2C, SPI and interrupt), and the labels of connected pins take the color of their wire. Dots mark where wires are connected; wires crossing without a dot are not connected. Hover a device to see the configuration of the peripherals behind it, or a wire to see which devices it connects.
The schematic can be zoomed with the scroll wheel (around the mouse pointer) and panned by clicking and dragging. Double-click the background to show the whole schematic again.
Pin popups
Click a pin with configuration settings to open a popup with its settings:
| Pin | Settings in the popup |
|---|---|
SW_HP | Mode |
SW_LP1-SW_LP4 | Mode, Standby |
INT1-INT4 | Mode, Pull-up |
SDA, SCL | Pull-up (shared by SDA and SCL) |
XTAL1, XTAL2 | External crystal |
VBAT | Battery settings |
The settings in a popup are linked to the same settings in the Configuration section, so a change in either place updates the other, as well as the registers and the generated code. Pins without settings are not clickable.
Battery
A battery symbol is drawn to the left of the chip, wired to VBAT, with its voltage range and capacity beside it. Click the battery or the VBAT pin to change the battery settings:
- Min. voltage - Nominal voltage of an empty battery (end of life).
- Max. voltage - Nominal voltage of a fresh battery.
- Capacity - Battery capacity, in mAh or Ah. Changing the unit converts the value.
The default is a CR2032 coin cell (2.0-3.0 V, 230 mAh). A warning is shown in the popup and on the schematic label if the minimum voltage is above the maximum voltage, if the capacity is not above zero, or if the voltage range is outside the nPZero 2100 VBAT operating range (1.7-3.6 V). The battery settings are saved in the workspace.
External load switches
When SW_HP or one of SW_LP1-SW_LP4 is set to a logic output mode, it no longer powers the device directly. Instead the schematic shows an external load switch in front of the device: IN connects to VBAT, EN is driven by the nPZero pin, and OUT powers the VDD pin of the device.
For Logic output inverted (SW_HP) and Logic Output Low (SW_LP), the EN label is drawn with an overline to show that the enable is active low. Hover the switch to see how it is connected.
The load switch is an external component, and is not part of the nPZero 2100.
External crystal
When the crystal oscillator is used, either as the system clock source or for the ADC clock divider, the schematic shows a 32.768 kHz crystal with its two load capacitors to ground on XTAL1/XTAL2. The value of the load capacitors depends on the load capacitance of the crystal, see the nPZero 2100 datasheet.
Click the crystal or one of the XTAL pins to enable or disable the external crystal. Enabling it selects the crystal oscillator as system clock source. Disabling it selects the low-power oscillator, and also sets the ADC clock back to the system clock.
Logic view and configuration simulation
The logic view displays the state of the nPZero 2100 pins over time, along with a mode bar showing which system mode the device is in (Standby, Idle or Poll[1]-Poll[6]).
When Simulate configuration is checked (default), the logic view shows a simulation of how the nPZero 2100 behaves with the current configuration. The simulation is updated automatically whenever the configuration changes.
- Duration sets the total simulated time (default 1 min). Pick one of the presets (10 s, 1 min, 10 min, 1 h or 24 h) or type a value such as
500 ms,30 sor2 h(max 24 h). - Host on-time sets how long the host stays awake (Standby) after a wake-up before it sends the nPZero back to Idle (default 1000 ms).
Invalid values are shown in red. The simulation settings are saved in the workspace.
The simulation shows only the signals in use:
- SW_HP - The host is powered at start-up and each time the global timeout expires.
- SW_LP1-4 - Only the power switches used by an enabled peripheral. Periodic peripherals are switched on every polling period. The on-time is the pre-init delay, the init commands, the post-init delay (or interrupt wait) and the data read. Always-on peripherals keep their switch on while the device is in Idle. Pins in a logic output low/inverted mode are shown with inverted levels.
- I2C / SPI - The init and read commands of each peripheral on the bus it is configured for, decoded as hex values. Bytes returned by the peripheral are unknown and shown as
??. The bytes holding the peripheral value are labelled Value (8-bit data) or Value LSB / Value MSB (16-bit data, in the order they are received, which follows the swap registers setting). Between transactions the I2C bus is shown as high when the internal pull-ups are always on, and as high impedance otherwise. - INT1-4 - The interrupt pins of peripherals that wait for an interrupt. The wait window is shown as undefined.
When a peripheral is delayed because another peripheral is being polled, all its later polls are delayed as well, just as in the device, since the polling period restarts when a poll finishes.
The simulation is an approximation. Sensor values and interrupts are unknown, so threshold and interrupt wake-ups are not simulated: interrupt waits always run until the post-init delay timeout, and only the global timeout wakes the host. Very dense configurations are truncated to keep the view responsive; the status text next to the settings shows the number of polls and wake-ups, and any warnings, for example an invalid polling period.
Uncheck Simulate configuration to show example data instead.
The logic view can be navigated with the mouse and keyboard:
| Action | Mouse | Keyboard |
|---|---|---|
| Zoom in/out | Scroll wheel over the plot | + / - |
| Pan left/right | Click and drag in the plot | ← / → |
| Fit all data in view | Double-click in the plot, or the Fit button | Home |
| Zoom to a poll or standby period | Double-click the period in the mode bar (idle periods are skipped) | - |
| Scroll through signals | Shift + scroll wheel, or scroll over the signal names | - |
Generated Code
The Generated Code section converts the nPZero configuration from the previous sections into code that can be used directly on the host MCU.
Select the code template from the Template dropdown below the code view, and use the Save and Save As buttons to export the code. Code is saved as a C source file (.c), or as a C header file (.h) when a RegMap template is selected. The generated code includes the Configurator version and the date and time it was generated.
nPZero G1S templates
For the nPZero G1S the generated code is compliant with the nPZero Driver API. This allows the configuration to be easily tested on a target system that combines the nPZero device with one of the supported host MCU families (currently STM32, nRF52 or PIC24/32).
| Template | Description |
|---|---|
| Default (STM) | Full example application for STM32 host MCUs |
| Default (nRF52) | Full example application for nRF52 host MCUs |
| Minimal (STM) | Minimal example for STM32 host MCUs |
| Minimal (nRF52) | Minimal example for nRF52 host MCUs |
| RegMap | Register address/value array (see below) |
The Hide Zero Fields option skips the assignment of struct fields that are 0, giving more compact code.
nPZero 2100 templates
| Template | Description |
|---|---|
| RegMap | Register map array in a complete C header file (saved as npz2100_regmap.h by default) |
| RegMap Verbose | Same as RegMap, but with comments describing the register contents |
RegMap
Code can also be exported to a regmap, which is a simple array of register values, allowing the nPZero to be configured from the host in a highly code efficient way.
- nPZero G1S - The array contains register address/value pairs for the configuration registers that differ from their default values, followed by the SRAM contents. The status and reset registers (0x00-0x03) are skipped. All the host has to do is to loop through the array, and write each register value into the corresponding register address.
- nPZero 2100 - The array is split into blocks, each starting with its length and start address, followed by the values of consecutive registers, so each block can be written in a single I2C transfer. Blocks are only included when they are in use: the global configuration (always), the global counter, watchdog and power-aware registers, one block per enabled peripheral (selected through the
P_BANKregister), the ADC configuration, the logging and event counter configuration, and the SRAM contents (the init and read sequences of the enabled peripherals, one block per SRAM bank selected through theSRAM_BANKregister).
In addition to reducing code size this method can also be used to add support for MCU families not covered by the other templates, or adding support for software frameworks not based on C/C++.
Messages
The Messages window at the bottom of the application lists events such as loaded and saved workspaces and presets, along with warnings and errors. Each message is timestamped, color coded by severity, and tagged with the device it relates to (for example [2100]).
Support
If you have questions or run into problems using the nPZero Configurator, please contact support@nanopowersemi.com.