EasyManua.ls Logo

Nordic Semiconductor nRF52832 - User Manual

Default Icon
5 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
Loading...
nRF52832
Introduction
The example runs on Nordic nRF52832 SoC. The block diagram of this example is as
follows:
In this example, nRF52832 acts as a forwarder, to forward command packets and
return packets between the NSP32 module and the Android phone. The Android app
can wirelessly (through bluetooth) control NSP32 module and get the spectrum data.
Note: This example must run in conjunction with the "Android SpectrumMeter" APK
installed on an Android phone. Please check "NSP32 Java API for Android / desktop"
for getting this Android project and APK.
API Source File Location
1) The API source files are located under
[/examples/nRF52/SpectrumMeter/NanoLambdaNSP32/], along with
nRF52Adaptor.h and nRF52Adaptor.cpp tailored for nRF52.
2) NSP32CWrapper.h and NSP32CWrapper.c are also provided under the same
folder, to enable NSP32 API being called from C source code (i.e. main.c).
Hardware Setup
1) Tested on
nRF52832
Question and Answer IconNeed help?

Do you have a question about the Nordic Semiconductor nRF52832 and is the answer not in the manual?

Summary

Introduction

System Overview

Describes the example's system architecture and the role of nRF52832 as a forwarder.

API Source File Location

Details the location of API source files and wrapper functions for C integration.

Hardware Setup

NSP32 m DBK Development Board Kit

Details hardware connections using the NSP32m DBK Development Board Kit with J3 disconnected.

Manual Configuration

Explains manual configuration of NSP32m with nRF52 using specific pin connections.

Status LED Connection

Instructions for connecting an LED to the nRF52832 for status indication.

Software Setup

Pre-built Hex File

Information on accessing and programming a pre-built hex file for the nRF52832.

Rebuilding Example Code

Steps for rebuilding the example hex file and modifying the source code.

Project Disclaimer

Disclaimer Details

States the origin of the example project and modification approach.

Run the Example

Execution Steps

Instructions on how to program and run the nRF52832 example.

Status LED Behavior

Describes the expected behavior of the status LED during advertising and connection.

Appendix

nRFgo Studio Programming

Guide for programming the nRF52832 using nRFgo studio and SEGGER J-LINK SWD.

J-LINK Physical Connection

Illustrates the physical connection for programming the nRF52832 via J-LINK.

Android API Interaction

Shows an example of the Android application interacting with the nRF52832.

Overview

This document describes the nRF52832, a device designed to act as a forwarder for command and return packets between an NSP32 module and an Android phone. Its primary function is to enable wireless control of the NSP32 module and retrieval of spectrum data via a Bluetooth connection with an Android application. This setup is particularly useful for applications requiring remote monitoring and control of spectral analysis.

Function Description

The nRF52832 operates as a central communication hub, facilitating data exchange between two distinct components: the NSP32 module and an Android phone. The NSP32 module is responsible for generating spectrum data, while the Android phone, running a dedicated application (the "Android SpectrumMeter" APK), serves as the user interface for controlling the NSP32 and visualizing the collected data. The nRF52832 bridges these two, receiving commands from the Android phone via Bluetooth Low Energy (BLE) and forwarding them to the NSP32 module, typically over a Serial Peripheral Interface (SPI) connection. Conversely, it receives spectrum data from the NSP32 module and transmits it wirelessly back to the Android phone. This forwarding capability allows for flexible placement of the NSP32 module, as it doesn't need to be directly connected to the Android device. The system is designed to be robust, ensuring reliable transmission of both control signals and data. The underlying architecture leverages the Nordic nRF52832 System-on-Chip (SoC), which provides the necessary BLE capabilities and processing power for this forwarding task. The example provided in the documentation specifically highlights its use in a spectrum meter application, demonstrating its ability to handle real-time data flow for analytical purposes.

Usage Features

The nRF52832 system offers several features that enhance its usability and integration into various projects.

  • Wireless Control and Data Acquisition: The core usage feature is the ability to wirelessly control the NSP32 module and acquire spectrum data using an Android phone. This eliminates the need for physical wired connections between the measurement device and the control interface, offering greater flexibility in deployment and operation.
  • Android Application Integration: The system is designed to work seamlessly with a dedicated Android application, the "Android SpectrumMeter" APK. This application provides a user-friendly interface for interacting with the NSP32 module, displaying spectrum data, and configuring measurement parameters. The availability of a Java API for Android/desktop further simplifies the development of custom applications.
  • Flexible Hardware Setup: The documentation outlines two primary hardware setup methods. The first involves using the NSP32m DBK Development Board Kit with a disconnected J3, simplifying the initial configuration. The second method allows for manual configuration of the NSP32m with the nRF52, providing greater control and customization for experienced users. This flexibility caters to different levels of user expertise and project requirements.
  • SPI Communication with NSP32: The nRF52832 communicates with the NSP32 module via SPI, a common and efficient serial communication protocol. This ensures high-speed data transfer for spectrum data and reliable command execution.
  • Bluetooth Low Energy (BLE) Connectivity: The nRF52832 utilizes BLE for communication with the Android phone. BLE is known for its low power consumption, making the system suitable for battery-powered applications. The advertising and connection status are indicated by an LED, providing visual feedback to the user.
  • Pre-built Hex File for Quick Deployment: For users who prefer a straightforward setup, a pre-built hex file is provided. This file can be programmed directly onto the nRF52832 using flashers like nRFgo or J-Flash, allowing for quick deployment without the need for recompilation.
  • Software Development Kit (SDK) Integration: The system is designed to integrate with the Nordic nRF SDK 15.2.0. This provides developers with a comprehensive set of tools and libraries for modifying the example code, building custom applications, and leveraging the full capabilities of the nRF52832 SoC.
  • Status LED for Operational Feedback: A status LED is incorporated into the design, providing visual cues about the device's operational state. For instance, the LED blinks when BLE is advertising and remains lit when the Android app is connected. This immediate feedback helps users understand the device's current status.
  • Power Management: The system includes power management features, such as entering a system-off state if the advertising times out (i.e., no Android app connection within 180 seconds). This conserves power, which is crucial for battery-operated devices. The device can be woken up via the reset pin or a power-off/power-on cycle.

Maintenance Features

Maintaining the nRF52832 system involves both hardware and software aspects, ensuring its continued functionality and adaptability.

  • Software Rebuilding and Modification: The documentation provides clear instructions for rebuilding the hex file and modifying the example code. This is crucial for developers who need to customize the firmware, add new features, or fix bugs. The process involves installing Keil5 IDE, downloading the nRF SDK, and organizing the project files within the SDK structure.
  • SoftDevice Management: The nRF52832 requires a Nordic SoftDevice to be present. The documentation emphasizes the importance of programming the "S132 v6.1.0 SoftDevice" (provided with nRF SDK 15.2.0) before programming the application hex file. This ensures the underlying BLE stack is correctly configured. The nRFgo Studio programming guide illustrates the two-step process of programming the SoftDevice first, followed by the application.
  • Hardware Pin Connections: Detailed information on hardware pin connections between the NSP32 and nRF52832 (specifically on the PCA10040 Development Kit board) is provided. This includes GPIO, VDD, and GND connections, which are essential for troubleshooting hardware issues or reconfiguring the setup.
  • J-LINK Programming Support: The nRF52832 can be programmed via J-LINK, a common debugging and programming interface for ARM microcontrollers. The documentation includes a visual guide for connecting the SWD pins (VDD3V3, GND, nRF_SWCLK, nRF_SWDIO) for programming, facilitating firmware updates and debugging.
  • API Source File Accessibility: The API source files for the SpectrumMeter example are located in a well-defined directory structure (e.g., /examples/nRF52/SpectrumMeter/NanoLambdaNSP32/). This organized structure, along with the provision of nRF52Adaptor.h, nRF52Adaptor.cpp, NSP32CWrapper.h, and NSP32CWrapper.c, makes it easy for developers to access and understand the underlying code, enabling easier maintenance and extension.
  • Open-Source Programming and API: The documentation states that programming the nRF52832 is "OPEN to everyone" and that the API is provided. This open approach fosters community support and allows for greater flexibility in maintaining and adapting the system for various applications.
  • Reset and Power Cycle for Recovery: In cases where the nRF52 enters a system-off state (e.g., due to advertising timeout), users can wake it up through the reset pin or by performing a "power-off → power-on" procedure. This provides a simple and effective way to recover the device from certain inactive states.
  • Project Disclamation for Transparency: The project disclamation clarifies that the example is modified from a Nordic demo project. This transparency helps users understand the origin of the code and encourages them to refer to the original source for further information or support, which can be beneficial for long-term maintenance.

Nordic Semiconductor nRF52832 Specifications

General IconGeneral
Maximum Clock Frequency64 MHz
Flash Memory512 kB
RAM64 kB
Bluetooth VersionBluetooth 5.0
Operating Voltage1.7 V to 3.6 V
GPIO Pins32
ADC12-bit
ADC Channels8
ADC Sample Rate200 kSPS
Temperature SensorYes
Operating Temperature-40°C to +85°C
PackageQFN48
Microcontroller ArchitectureARM Cortex-M4
Power Consumption (Sleep)0.4 µA at 3V
SecurityARM TrustZone