nRF52-PCA10040——Overview

Overview

Zephyr applications use the nrf52_pca10040 board configuration to run on the nRF52 Development Kit (PCA10040) hardware. It provides support for the Nordic Semiconductor nRF52832 ARM Cortex-M4F CPU and the following devices:

  • NVIC
  • SYSTICK
  • UART
  • GPIO

More information about the board can be found at the nRF52 DK website [1]. The Nordic Semiconductor Infocenter [2] contains the processor’s information and the datasheet.

Supported Features

The nrf52_pca10040 board configuration supports the following hardware features:

InterfaceControllerDriver/Component
NVICon-chipnested vectored interrupt controller
SYSTICKon-chipsystem clock
UARTon-chipserial port
GPIOon-chipgpio

Other hardware features are not supported by the Zephyr kernel. See nRF52 DK website [1] and Nordic Semiconductor Infocenter [2] for a complete list of nRF52 Development Kit board hardware features.

Pin Names

LED

  • LED1 (green) = P0.17
  • LED2 (green) = P0.18
  • LED3 (green) = P0.19
  • LED4 (green) = P0.20
  • LD5 (red/green) = OB LED 1/2

Push buttons

  • BUTTON1 = SW1 = P0.13
  • BUTTON2 = SW2 = P0.14
  • BUTTON3 = SW3 = P0.15
  • BUTTON4 = SW4 = P0.16
  • BOOT = SW5 = boot/reset

External Connectors

Debug IN
PIN #Signal NameNRF52832 Functions
1VDDN/A
2SWDIOSWDIO
3GNDN/A
4SWDCLKSWDCLK
5GNDN/A
6P0.18P0.18 / TRACEDATA[0] / SWO
7Cut offN/A
8Cut offN/A
9GNDN/A
10P0.21P0.21 / RESET
Debug OUT
PIN #Signal Name
1EXT_VTG
2EXT_SWDIO
3GND
4EXT_SWDCLK
5GND
6EXT_SWO
7Cut off
8Cut off
9EXT_GND_DETECT
10EXT_RESET
Shield Debug and Current measurement
PIN #Signal Name
1VDD_nRF
2VDD
3SH_VTG
4SH_SWDIO
5SH_SWDCLK
6SH_SWO
7SH_RESET
8SH_GND_DETECT
Auxiliary
PIN #Signal NameNRF52832 Functions
1P0.00P0.00 / XL1
2P0.01P0.01 / XL2
3P0.21P0.21 / RESET
4P0.05_CP0.05 / AIN3
5P0.06_CP0.06
6P0.07_CP0.07
7P0.08_CP0.08
8P0.09P0.09 / NFC1
9P0.10P0.10 / NFC2

Arduino Headers

P1/P7 Power
PIN #Signal NameNRF52832 Functions
   
1VDDN/A
2VDDN/A
3RESETP0.21 / RESET
4VDDN/A
5V5VN/A
6GNDN/A
7GNDN/A
8VINN/A
P2/P8 Analog in
PIN #Signal NameNRF52832 Functions
1A0P0.03 / AIN1
2A1P0.04 / AIN2
3A2P0.28 / AIN4
4A3P0.29 / AIN5
5A4P0.30 / AIN6
6A5P0.31 / AIN7
P3/P9 Digital I/O
PIN #Signal NameNRF52832 Functions
1D0 (RX)P0.11
2D1 (TX)P0.12
3D2P0.13
4D3P0.14 / TRACEDATA[3]
5D4P0.15 / TRACEDATA[2]
6D5P0.16 / TRACEDATA[1]
7D6P0.17
8D7P0.18 / TRACEDATA[3] / SWO
P4/P10 Digital I/O
PIN #Signal NameNRF52832 Functions
1D8P0.19
2D9P0.20 / TRACECLK
3D10 (SS)P0.22
4D11 (MOSI)P0.23
5D12 (MISO)P0.24
6D13 (SCK)P0.25
7GNDN/A
8AREFP0.02 / AIN0
9SDAP0.26
10SCLP0.27
P5/P11
PIN #Signal NameNRF52832 Functions
   
1D12 (MISO)P0.24
2V5VN/A
3D13 (SCK)P0.25
4D11 (MOSI)P0.23
5RESETN/A
6N/AN/A

System Clock

nRF52 DK has two external oscillators. The frequency of the slow clock is 32.768 kHz. The frequency of the main clock is 32 MHz.

Flashing Zephyr onto nRF52 DK

Flashing the Zephyr kernel onto nRF52 DK requires both the J-Link Software and documentation pack[3] and, the nrfjprog tool, which is part of the nRF5x Command Line Tools.

Installing the nRF5x Command Line Tools

To install the nRF5x Command Line Tools, follow the steps below:

  1. Download the appropriate package from the nRF52 DK website [1].
  2. Depending on your platform, unpack the tarball and copy the contents into a folder whithin your $PATH or run the installer.

Flashing an Application to nRF52 DK

This tutorial uses the sample application shell $ZEPHYR_BASE/samples/shell.

  1. To build the Zephyr kernel, enter:

    $ cd $ZEPHYR_BASE
    $ make -C samples/shell BOARD=nrf52_pca10040 
  2. Connect the micro-USB cable to the nRF52 DK and to your computer.

  3. Erase the flash memory in the nRF52832:

    $ nrfjprog --eraseall -f nrf52
    
  4. Flash the application using the nrfjprog tool:

    $ nrfjprog --program outdir/zephyr.hex -f nrf52
    
  5. Run your favorite terminal program to listen for output.

    $ minicom -D <tty_device> -b 115200
    

    Replace <tty_device> with the port where the board nRF52 DK can be found. For example, under Linux, /dev/ttyACM0.

    The -b option sets baudrate ignoring the value from config.

  6. Press the Reset button and you should see the output of shell application in your terminal.

转载于:https://www.cnblogs.com/CodeWorkerLiMing/p/10369536.html

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值