NRF52 Series
Multiprotocol Bluetooth 5.3 SoC supporting Bluetooth Low Energy, Bluetooth mesh, NFC, Thread and Zigbee
It provides substantial RAM and Flash memory availability, which are necessities for such demanding workloads. The nRF52840 has full protocol concurrency and is completely multiprotocol capable. It has 2.4 GHz proprietary stacks and protocol support for Bluetooth LE, Bluetooth mesh, Thread, Zigbee, 802.15.4, and ANT.The 32-bit ARM® CortexTM-M4 CPU, with a floating point unit operating at 64 MHz, is the core of the nRF52840. For use in streamlined pairing and payment systems, it has an NFC-A Tag. The on-chip ARM TrustZone® CryptoCell cryptographic unit offers a wide variety of cryptographic choices that operate very quickly without the need for the CPU.
It has a wide range of digital peripherals and interfaces, including full-speed USB devices for data transfer and power supplies for battery recharging, high-speed SPI and QSPI for connecting to external flash and displays, PDM and I2S for digital microphones and audio, and many others. A smart on-chip adaptive power management technology is used to achieve exceptionally low energy consumption.
NOTE: Required Voltage for the PIN D0-D10 is 3.3v Logic, If you using a development board release by NORDIC, ADAFRUIT, SPARKFUN, OR SEEDUINO, should be run through using a regulator. Thus, any supply over 3.3v should run also through the 5V PIN, moreover, any sensor utilizing the use of I/O pins must be operated by 3.3v.
NORDIC – nRF52840 Dongle
SEEED – Seeed Studio XIAO nRF52840
- Seeed Studio XIAO nRF52840 PinOut Diagram
- nRF52 support requires at least Arduino IDE version 1.8.15! Please make sure you have an up to date version before proceeding with this guide!
- Download the older Release version of Arduino : https://www.arduino.cc/en/software/OldSoftwareReleases (1.8.15)
- Add the following board package link: https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json
ADAFRUIT – NRF5240 (Adafruit nRF52840 Feather)
- AdaFruit nRF52840 Feather PinOut Diagram
- nRF52 support requires at least Arduino IDE version 1.8.15! Please make sure you have an up to date version before proceeding with this guide!
- Download the older Release version of Arduino : https://www.arduino.cc/en/software/OldSoftwareReleases (1.8.9)
- Add the following board package link: https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
SPARKFUN – SparkFun Pro nRF52840 Mini
- SparkFun Pro nRF52840 Mini PinOut Diagram
- nRF52 support requires at least Arduino IDE version 1.6.12! Please make sure you have an up to date version before proceeding with this guide!
- Download the older Release version of Arduino : https://www.arduino.cc/en/software/OldSoftwareReleases (1.6.12)
- Add the following board package link: https://github.com/adafruit/arduino-board-index/blob/gh-pages/package_adafruit_index.json
Required Components
- Arduino IDE | PlatformIO
- Test Boards : Nordic NRF5208 Development Board | Adafruit nRF5280 Feather | SparkFun Pro nRF52840 Mini | SeeedDuino – Seed Studio XIAO nRF52840
- USB Cable (C or Micro) if your are building your own nRF52X board please refer to the download section.
Test Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
/* * This example demonstrates how to use the Bluefruit * library to both send and receive data to the * nRF52840 via BLE. * Using a BLE development app like Nordic's nRF Connect * https://www.nordicsemi.com/eng/Products/Nordic-mobile-Apps/nRF-Connect-for-Mobile * The BLE UART service can be written to to turn the * on-board LED on/off, or read from to monitor the * status of the button. * */ #include <bluefruit.h> BLEUart bleuart; // uart over ble // Define hardware: LED and Button pins and states const int LED_PIN = 7; #define LED_OFF LOW #define LED_ON HIGH const int BUTTON_PIN = 13; #define BUTTON_ACTIVE LOW int lastButtonState = -1; void setup() { // Initialize hardware: Serial.begin(9600); // Serial is the USB serial port pinMode(LED_PIN, OUTPUT); // Turn on-board blue LED off digitalWrite(LED_PIN, LED_OFF); pinMode(BUTTON_PIN, INPUT); // Uncomment the code below to disable sharing // the connection LED on pin 7. //Bluefruit.autoConnLed(false); // Initialize Bluetooth: Bluefruit.begin(); // Set max power. Accepted values are: -40, -30, -20, -16, -12, -8, -4, 0, 4 Bluefruit.setTxPower(4); Bluefruit.setName("SparkFun_nRF52840"); bleuart.begin(); // Start advertising device and bleuart services Bluefruit.Advertising.addFlags(BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE); Bluefruit.Advertising.addTxPower(); Bluefruit.Advertising.addService(bleuart); Bluefruit.ScanResponse.addName(); Bluefruit.Advertising.restartOnDisconnect(true); // Set advertising interval (in unit of 0.625ms): Bluefruit.Advertising.setInterval(32, 244); // number of seconds in fast mode: Bluefruit.Advertising.setFastTimeout(30); Bluefruit.Advertising.start(0); } void loop() { // If data has come in via BLE: if (bleuart.available()) { uint8_t c; // use bleuart.read() to read a character sent over BLE c = (uint8_t) bleuart.read(); // Print out the character for debug purposes: Serial.write(c); // If the character is one of our expected values, // do something: switch (c) { // 0 number or character, turn the LED off: case 0: case '0': digitalWrite(LED_PIN, LED_OFF); break; // 1 number or character, turn the LED on: case 1: case '1': digitalWrite(LED_PIN, LED_ON); break; default: break; } } // If our button state has changed: int buttonState = digitalRead(BUTTON_PIN); if (buttonState != lastButtonState) { lastButtonState = buttonState; // Write the new button state to the bleuart TX char bleuart.write(!buttonState); } } |
Flashing CircuitPython
nRF52840 UF2 Bootloader, which is already available on your device, just copy and phase, USB device and can be used to flash CircuitPython firmware onto your nRF52840 Board. First thing first you need to set your nRF52840 bootload state, by double pressing the reset button or holding the PIN-13 down while clicking the reset button. you pc should look for an NRF52BOOT device that is similar to a USB thumb drive or removable USB drive. Just simply COPY & PHASE the UF2 file into NRF52BOOT then you may get a warning the file is too large just press the cancel button. Moreover, after the firmware is installed, a new drive will show on your PC should be CIRCUITPY, then just copy and phase CircuitPython files with the file extension of: BLICK.PY / blink.py to run your application.
NORDIC – nRF52840 Dongle
SEEED – Seeed Studio XIAO nRF52840
ADAFRUIT – NRF52840 (Adafruit nRF52840 Feather)
SPARKFUN – SparkFun Pro nRF52840 Mini
Circuit Python Test Code
1 2 3 4 5 6 7 8 9 10 11 12 |
import time import board from digitalio import DigitalInOut, Direction, Pull led = DigitalInOut(board.P0_07) led.direction = Direction.OUTPUT while True: led.value = False time.sleep(0.5) led.value = True time.sleep(0.5) |
NRF Connect Application for | Android App | iOS App Store |
Downloads
- Download Nordic – nRF52840 USB Dongle Schematics
- Download SparkFun Pro nRF52840 Mini Schematics
- Download Adafruit nRF52840 Feather Development Board Schematics
- Download Microsoft UF2 Component
For more reference
- Arduino
- Arduino Core GitHub Repository — Home base for all of the core source, examples, and tools.
- SparkFun Board Definitions – SparkFun board definitions for the SparkFun Pro nRF52840 Mini.
- adafruit-nrfutil GitHub Repository — adafruit-nrfutil is the tool required to upload Arduino sketches to your nRF52840 via the bootloader. This is where the source code is stored and developed-upon.
- CircuitPython
- CircuitPython API Reference — Exhaustive documentation hub for all CircuitPython API.
- CircuitPython GitHub Repository — Home base for all CircuitPython-related source and tools. Make sure to check out the ports/nrf directory for info specific to the nRF52840.
- Building CircuitPython Tutorial — If you want to build a CircuitPython variant of your own, give this a read.
Components
- NORDIC nRF52840 Datasheet
- AP2112 – 600mA – CMOS Low Drop Out Regulator
- DMG2305UX – P Channel Enhance Mode MOSFET
- GD25Q16 – 16Bit Dual & Quad SPI Serial Flash
- MBR120VLSFTI – Schottky Power Rectifier
- MCP73831 – Miniature Single Cell Charge Management Controller
- BQ25101-250mA Single Cell Li-Ion Battert Chargers
- P25Q16H – Ultra Low Power, 16mBit Serial Multi IO Flash Memory
- LSM6DS3TRC – iNEMO Inertial Module 3D Acceleration Gyroscope
감사합니다. 하지만 NRF52 오류 BLEUart bleuart에 문제가 있습니다.
NRF52 라이브러리를 살펴보십시오.