Skip to content

Commit

Permalink
doc: add documentation framework
Browse files Browse the repository at this point in the history
Added documentation framework for Zoomin.
Moved the app documentation from the hardware guide.
NCD-683.

Signed-off-by: Grzegorz Ferenc <Grzegorz.Ferenc@nordicsemi.no>
  • Loading branch information
greg-fer committed Feb 5, 2024
1 parent 290394d commit a37ae01
Show file tree
Hide file tree
Showing 20 changed files with 359 additions and 15 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/zoomin-publish-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish documentation to Zoomin dev

on:
push:
branches:
- main
paths:
- doc/docs
workflow_dispatch:

jobs:
create-zoomin-bundle:
name: Create Zoomin bundle
uses: './.github/workflows/zoomin.yml'
publish-zoomin-bundle:
name: Publish Zoomin bundle to dev
needs: create-zoomin-bundle
runs-on: ubuntu-latest
steps:
- name: Get bundle
uses: actions/download-artifact@v3
with:
name: nrf-connect-ppk
- name: Upload documentation
run: |
# trust server
mkdir -p ~/.ssh
ssh-keyscan upload-v1.zoominsoftware.io >> ~/.ssh/known_hosts
# prepare key
echo "${{ secrets.ZOOMIN_KEY }}" > zoomin_key
chmod 600 zoomin_key
# upload bundle:
sftp -v -i zoomin_key nordic@upload-v1.zoominsoftware.io <<EOF
cd /nordic-be-dev.zoominsoftware.io/markdown/incoming
put nrf-connect-ppk.zip
quit
EOF
34 changes: 34 additions & 0 deletions .github/workflows/zoomin-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish documentation to Zoomin

on:
workflow_dispatch:

jobs:
create-zoomin-bundle:
name: Create Zoomin bundle
uses: './.github/workflows/zoomin.yml'
publish-zoomin-bundle:
name: Publish Zoomin bundle
needs: create-zoomin-bundle
runs-on: ubuntu-latest
steps:
- name: Get bundle
uses: actions/download-artifact@v3
with:
name: nrf-connect-ppk
- name: Upload documentation
run: |
# trust server
mkdir -p ~/.ssh
ssh-keyscan upload-v1.zoominsoftware.io >> ~/.ssh/known_hosts
# prepare key
echo "${{ secrets.ZOOMIN_KEY }}" > zoomin_key
chmod 600 zoomin_key
# upload bundle:
sftp -v -i zoomin_key nordic@upload-v1.zoominsoftware.io <<EOF
cd /docs-be.nordicsemi.com/markdown/incoming
put nrf-connect-ppk.zip
quit
EOF
34 changes: 34 additions & 0 deletions .github/workflows/zoomin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Create Zoomin bundle

on:
pull_request:
types: [synchronize, opened, reopened]
paths:
- 'doc/**'
workflow_dispatch:
workflow_call:

jobs:
create-zoomin-bundle:
name: Create Zoomin bundle
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Copy zoomin properties
run: |
cp doc/zoomin/custom.properties doc/ \
&& cp doc/zoomin/tags.yml doc/
- name: Create zip file
run: |
cd doc/ \
&& zip -r ../nrf-connect-ppk.zip \
docs/* mkdocs.yml custom.properties tags.yml
- name: Upload documentation artifact
uses: actions/upload-artifact@v3
with:
name: nrf-connect-ppk
path: nrf-connect-ppk.zip
retention-days: 7
10 changes: 10 additions & 0 deletions doc/docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# nRF Connect Power Profiler

nRF Connect Power Profiler is an app available from [nRF Connect for Desktop](https://nordic-dev.zoominsoftware.io/bundle/nrf-connect-desktop/page/index.html) that you can use to communicate with the Power Profiler Kit II (PPK2) in order to obtain real-time current measurements of your designs.

The PPK measures current consumption for a connected Nordic Development Kit or any external board. It gives a detailed picture of the current profile for the user application.

## Supported devices

- Power Profiler Kit II (PPK2)
- Power Profiler Kit (PPK1)
3 changes: 3 additions & 0 deletions doc/docs/installing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Installing the Power Profiler app

For installation instructions, see [Installing nRF Connect for Desktop apps](https://docs.nordicsemi.com/bundle/nrf-connect-desktop/page/installing_apps.html) in the nRF Connect for Desktop documentation.
79 changes: 79 additions & 0 deletions doc/docs/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Overview and user interface

The nRF Connect Power Profiler app has two views that provide detailed power consumption information.

![nRF Connect Power Profiler default view at startup](./screenshots/ppk2_standard_view.png "nRF Connect Power Profiler default view at startup")

## Select Device

Once you connect a device to the system, it becomes visible and available when you click on the **Select device** drop-down list. You can choose a device from the list of connected devices to perform further actions on the device such as programming.

## Device panel sections

Before you select a device, this section lets you only **Load** a power profiler file.

More options become available after selecting a device.

### Mode

### Sampling parameters

### Display options

## Data logger tab

The data logger view lets you examine the power continuously over a period of time.

![Data logger at work](./screenshots/ppk2_about_tab.png "Data logger at work")

### Chart

### Minimap

### Digital channels

The digital signals are visible in the charting section below the current measurement.

The digital signals are connected to the PPK2's Logic port as described in [Logic port](https://docs.nordicsemi.com/bundle/ug_ppk2/page/UG/ppk/logic_port.html). To view the digital values, enable digital channels and zoom in on the main chart until the values are visible.

### Advanced controls

The advanced control panel gives you access to filter tuning and lets you adjust gains for all individual ranges.

Press **CTRL-ALT-SHIFT-A** to access the advanced control panel.

!!! note "Note"
The settings should only be adjusted by advanced users.

#### Gains

If any of the ranges (see [Measurement resolution](https://docs.nordicsemi.com/bundle/ug_ppk2/page/UG/ppk/ppk_measure_resolution.html#ppk_measure_resolution__table_b3l_3ty_bdb)) has an offset, use these controls to add a positive or negative gain to the calculated measurement values.

#### Spike filter

Whenever a dynamic range switching occurs, induced inductance may cause the first samples to be higher than the actual value.

Use the sliders to set the following:

- Samples to smooth - The number of samples after a dynamic range switch to apply the filer.
- Coefficient for range 1–4 - The magnitude of the spike filter for range 1–4. The higher the value, the more filtering will be applied.
- Coefficient for range 5 - The magnitude of the spike filter for range 5. The higher the value, the more filtering will be applied.

## Feedback tab

The Feedback tab lets you send feedback about nRF Connect Power Profiler application to the application development team.

## About tab

Here you can view application information, restore settings to default, access source code, and documentation. You also can find information on the selected device, access support tools, and enable verbose logging.

![nRF Connect for Desktop Power Profiler About tab](./screenshots/ppk2_about_tab.png "nRF Connect for Desktop Power Profiler About tab")

## Log

The Log panel allows you to view the most important log events, tagged with a timestamp. Each time you open the app, a new session log file is created. You can find the Log panel and its controls, below the main application Window.

- When troubleshooting, to view more detailed information than shown in the Log panel, use **Open log file** to open the current log file in a text editor.
- To clear the information currently displayed in the Log panel, use **Clear Log**. The contents of the log file are not affected.
- To hide or display the Log panel in the user interface, use **Show Log**.
- To freeze Log panel scrolling, use **Autoscroll Log**.
10 changes: 10 additions & 0 deletions doc/docs/revision_history.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Revision history

| Date | Description |
|------------|------------------------------------------------------------------------------------------------------|
| 2024-02-10 | Updated the application documentation for the nRF Connect Power Profiler [v4.0.0-beta7](https://github.com/NordicSemiconductor/pc-nrfconnect-ppk/blob/main/Changelog.md#400-beta7). The application documentation is now separated from the [PPK2 hardware documentation](https://docs.nordicsemi.com/bundle/ug_ppk2/page/UG/ppk/PPK_user_guide_Intro.html). |
| 2022-08-16 | Updated the following topics based on nRF9160 DK v0.9.0 or later:</br></br>- Quick start</br></br>- [Measuring current in Source Meter mode](https://docs.nordicsemi.com/bundle/ug_ppk2/page/UG/ppk/measure_current_source_meter.html)</br></br>- [Measuring current in Ampere Meter mode](https://docs.nordicsemi.com/bundle/ug_ppk2/page/UG/ppk/measure_current_ampere_meter.html) |
| 2021-11-01 | - Updated [Measuring current in Ampere Meter mode](https://docs.nordicsemi.com/bundle/ug_ppk2/page/UG/ppk/measure_current_ampere_meter.html)</br></br>- Editorial changes |
| 2021-06-08 | Updated Pin connections in Ampere Meter mode |
| 2021-02-26 | - Updated [Using the Power Profiler app](using_ppk_app.md)</br></br>- Updated [Measuring current in Source Meter mode](https://docs.nordicsemi.com/bundle/ug_ppk2/page/UG/ppk/measure_current_source_meter.html)</br></br>- Updated [Measuring current in Ampere Meter mode](https://docs.nordicsemi.com/bundle/ug_ppk2/page/UG/ppk/measure_current_ampere_meter.html)</br></br>- Added [Views](overview.md)</br></br>- Editorial changes |
| 2020-12-01 | First release |
Binary file added doc/docs/screenshots/data-logger-ampere-mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/docs/screenshots/ppk1_data_logger_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/docs/screenshots/ppk1_real_time_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/docs/screenshots/ppk2_about_tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/docs/screenshots/ppk2_standard_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/docs/screenshots/real-time-source-mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions doc/docs/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Troubleshooting

Here are some basic troubleshooting steps to help you fix issues you may encounter when using the Power Profiler Kit II (PPK2).

For more information, visit [Nordic DevZone](https://devzone.nordicsemi.com/).

For personalized support from our technical support team, sign up for or sign in to Nordic Developer Zone and enter a private ticket.

## Data loss with PPK2

In some rare cases data loss can happen between the PPK2 firmware and the Power
Profiler app. If this happens, first please check your data by zooming in on the
chart and look for gaps. An occasional gap that lasts a few microseconds
probably does not effect the accuracy of the data. However if significant data
loss is visible please check the following points:

- avoid using USB hubs
- if you can, try changing your USB connection from USB3 to USB2, or other way
around
- update your USB drivers
- change the USB cable


## PPK2 only measuring noise

Make sure you have connected the PPK2 to the Device Under Test (DUT) as described in [Setting up the Power Profiler Kit II](https://docs.nordicsemi.com/bundle/ug_ppk2/page/UG/ppk/setting_up.html).

## Measurements fluctuate when there should be a steady current draw

Your DUT may have a power consumption that is close to a switching point causing rapid switching between the ranges and creating measurement errors/distorted plots.

## Graph response is very slow

Avoid using Universal Serial Bus (USB) hubs and docking stations. Data plotting may consume a lot of CPU resources after some time, so ensure that sufficient resources are available.

## PPK2 not measuring anything

Confirm that the measurement cables are connected correctly because the PPK2 cannot measure negative currents.

## Grounding

Ensure that the DUT ground is connected to the PPK2 even in ampere meter mode.
29 changes: 29 additions & 0 deletions doc/docs/using_ppk_app.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Using the Power Profiler app

The Power Profiler Kit II (PPK2) must be connected to your computer and powered on before the Power Profiler app is started.

1. [Set up the Power Profiler Kit II for measurements](https://docs.nordicsemi.com/bundle/ug_ppk2/page/UG/ppk/setting_up.html).
1. Open the Power Profiler app using [nRF Connect](https://docs.nordicsemi.com/bundle/nrf-connect-desktop/page/installing_apps.html).

![Default window of the Power Profiler app](./screenshots/ppk2_standard_view.png "Default window of the Power Profiler app")

1. Click **Select Device** (in the top left corner) and select the PPK2 from the list.

1. Do one of the following:

- If the PPK2 is set up to measure in Ampere Meter mode (see [Measuring current in Ampere Meter mode](https://docs.nordicsemi.com/bundle/ug_ppk2/page/UG/ppk/measure_current_ampere_meter.html)), select **Ampere meter**.

!!! note "Note"
The power output is enabled by default in the Ampere Meter mode.

- If the PPK2 is set up to measure in Source Meter mode (see [Measuring current in Source Meter mode](https://docs.nordicsemi.com/bundle/ug_ppk2/page/UG/ppk/measure_current_source_meter.html)), select **Source meter**.

!!! note "Note"
You can change the voltage output to the Device Under Test (DUT, a manufactured product undergoing testing) by using the slider or typing the required voltage.

1. Click **Start**.
1. Toggle **Enable power output** to enable power to the DUT.

You can start measuring current when the connection is established.

The Power Profiler app checks if the PPK2 has the required firmware and shows a firmware upgrade dialog if needed.
66 changes: 66 additions & 0 deletions doc/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
site_name: nRF Connect Power Profiler documentation
site_url:
use_directory_urls: false

theme:
name: material
palette:
- scheme: custom-blue
toggle:
icon: material/lightbulb-outline
name: Switch to dark mode
- scheme: custom-blue-dark
toggle:
icon: material/lightbulb
name: Switch to light mode
# logo: assets/logo.png
# favicon: assets/logo.png
features:
- content.code.annotate
- content.tooltips
- content.tabs.link
- navigation.indexes
- navigation.top
- navigation.tracking
- search.highlight
- toc.follow


extra_css:
- stylesheets/style.css

copyright:
Copyright &copy; 2023

markdown_extensions:
- abbr
- admonition
- attr_list
- md_in_html
- meta
- pymdownx.details
- pymdownx.keys
- pymdownx.tabbed
- pymdownx.superfences
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
- toc:
permalink: true
toc_depth: 4

plugins:
- macros
- search


extra:
test: This is a test abbreviation snippet

nav:
- Home: index.md
- Installing the Power Profiler app: installing.md
- Overview and user interface: overview.md
- Using the Power Profiler app: using_ppk_app.md
- Troubleshooting: troubleshooting.md
- Revision history: revision_history.md
15 changes: 0 additions & 15 deletions doc/troubleshooting.md

This file was deleted.

3 changes: 3 additions & 0 deletions doc/zoomin/custom.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
manual.name=nrf-connect-ppk
booktitle=nRF Connect Power Profiler
shortdesc=Documentation for the nRF Connect Power Profiler application.
10 changes: 10 additions & 0 deletions doc/zoomin/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Document tags for Zoomin.

# Tags for all topics:
mapping_global:
- nrf-connect-ppk

# Tags for individual topics:
#mapping_topics:
# - filename.md: ["tag1","tag2"]

0 comments on commit a37ae01

Please sign in to comment.