User Tools

Site Tools


Sidebar

Go Back

Refresh

You are not allowed to add pages

Direct Link

library:nordic:preparekeil

准备nRF52832开发环境

1. 前言

以下是官网的安装参考信息

Nordic的安装指引:https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v13.0.0%2Fgetting_started_installing.html&resultof=%22%64%65%76%69%63%65%66%61%6d%69%6c%79%70%61%63%6b%22%20

Installing the SDK
Before you install the SDK, make sure that you have all required tools installed. See Setting up the development
kit (for nRF52840) or Setting up the development kit (for nRF52832) for more information.

To set up your environment:

    1.Download the repository file nRF5_SDK_x.x.x_xxxxxxx.zip (for example, nRF5_SDK_v13.0.0_1a2b3c4.zip) 
      from developer.nordicsemi.com.
    2.Extract the zip file to the directory that you want to use to work with the SDK.
    3.Install the nRF5 MDK:
         * If you use Keil 5, open an example project. Keil will then prompt you to install the
           nRF_DeviceFamilyPack. If Keil does not prompt you, open the Pack Installer, click the Check For
           Updates button, and install the latest nRF_DeviceFamilyPack.
         * If you use Keil 4, double-click the nRF5x_MDK_x_x_x_Keil4.msi file in the extracted directory to install
           the MDK.
         * If you use IAR, double-click the nRF5x_MDK_x_x_x_IAR.msi file in the extracted directory to install the
           MDK.
         * If you use GCC, the MDK is delivered with the SDK and does not need to be installed separately.

以下设置keil5开发环境,使用nRF5 SDK v15.3.0。

2. 安装开发环境

在uVision V5.30.0.0中安装 nRF SDK V15.3.0,支持对 nRF52832 的软件开发。

2.1 下载SDK包

2.2 打开例子工程

解压SDK包,打开其中一个Example。
按要求安装所需的器件支持包,编译,加载,运行。

Note :

  • Keil不能更新器件支持包(pack)

可直接下载需要的支持包(下载路径https://developer.nordicsemi.com/nRF5_SDK/pieces/nRF_DeviceFamilyPack/NordicSemiconductor.nRF_DeviceFamilyPack.8.35.0.pack
亦可选择合适的pack下载(https://developer.nordicsemi.com/nRF5_SDK/pieces/nRF_DeviceFamilyPack/)。
附:
STM32F1器件包 http://www.keil.com/pack/Keil.STM32F1xx_DFP.2.3.0.pack
STM32F4器件包 http://www.keil.com/pack/Keil.STM32F4xx_DFP.2.15.0.pack

  • 缺少文件nrf_erratas.h (SDK v17.0.2未发现此问题)

编译工程 nRF5_SDK_15.3.0_59ac345\examples\peripheral\blinky\pca10040\blank\arm5_no_packs 时,缺少文件 nrf_erratas.h,
该头文件由 system_nrf52.c 引用,可使用keil提供的同名文件替换工程中的文件,即:
使用 Keil_v5\ARM\Pack\NordicSemiconductor\nRF_DeviceFamilyPack\8.32.1\Device\Source\system_nrf52.c
替换 nRF5_SDK_15.3.0_59ac345\examples\peripheral\blinky\pca10040\blank\arm5_no_packs\RTE\Device\nRF52832_xxAA\system_nrf52.c

  • Keil不能更新CMSIS包(pack)

可直接下载所需的CMSIS包,直接运行,导入
CMSIS包下载地址
网盘提取码:1234


3. nRF52832基础

3.1 相关资料

3.2 通用信息

3.2.1 Softdevice命名规则

  • 规则1

Softdevice包括两种底层协议栈:BLE和ANT,BLE包括两种角色:central(又称master)和peripheral(又称slave),
为此需要给这些不同类型的协议栈进行命名区分。协议栈命名格式为Sxyz,其中:

x – 表示协议栈的类型,1表示BLE协议栈,2表示ANT协议栈,3表示同时支持BLE和ANT
y – 表示BLE角色,1表示从设备,2表示主设备,3表示同时支持主设备和从设备
z – 表示芯片类型,0表示nRF51系列,2表示nRF52系列

例如:

Softdevice 支持协议栈 BLE主从模式 芯片
S110 BLE协议栈 从设备模式 nRF51
S130 BLE协议栈 从设备模式/主设备模式 nRF51
S132 BLE协议栈 从设备模式/主设备模式 nRF52
S212 ANT协议栈 nRF52
S332 BLE协议栈/ANT协议栈 从设备模式/主设备模式 nRF52
  • 规则2

大体上跟命名规则1相同,但是协议栈编号最后2位跟芯片型号一样,比如S140,代表这个协议栈专门用于nRF52840。
由于52840 Flash空间很大,没有必要做各种细分的协议栈,S140协议栈是一个大而全的协议栈,包含蓝牙所有功能。

3.2.2 Softdevice版本编号

从1.0.0开始编号,然后2.0.0,3.0.0,… S110最新版本是8.0.0,S130最新版本是2.0.1,S132/S140/S112最新版本是7.0.0。

3.2.3 芯片Mark

SoC revisions and variants This section shows the package and memory variants for each nRF52832 SoC revision.

nRF52832 SoC revisions and variants

nRF52832 SoC revision Package variant Function Variant Build codes1 Package Flash RAM
Engineering A QFAA AA AA QFN48 512 kB 64 kB
AC
Engineering B QF AA BB QFN48 512 kB 64 kB
CH AA WLCSP
Engineering C QF AA BB QFN48 512 kB 64 kB
CH BA WLCSP
CI BA WLCSP
1 QF AA B20 QFN48 512 kB 64 kB
AB QFN48 256 kB 32 kB
CI AA WLCSP 512 kB 64 kB
2 QF AA E20 QFN48 512 kB 64 kB
AB QFN48 256 kB 32 kB
CI AA WLCSP 512 kB 64 kB

1 Package variant and build code can be read from markings on top of the nRF52 SoC.
2 Production device. The “B/E” represents a Hardware version.

library/nordic/preparekeil.txt · Last modified: 2022/05/02 00:32 (external edit)