博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Developing for nRF52810(转载)
阅读量:4959 次
发布时间:2019-06-12

本文共 5311 字,大约阅读时间需要 17 分钟。

Table of Contents

Introduction

Starting from version 14.1.0, this SDK supports developing for the nRF52810 SoC on the PCA10040 board, which uses nRF52832. The nRF52810 IC is a subset of the nRF52832 with smaller RAM and flash, and with less peripheral resources. Therefore, you can use nRF52832 to emulate the functionality of nRF52810.

For detailed information on the SoC, see .

See  for a detailed comparison of the features of the various nRF52 Series chips.

You can use the SDK to develop your own applications for nRF52810. A dedicated development kit for nRF52810 is not available, but this SDK provides you with emulated projects, located in the 'pca10040e' folder. You can run these projects on an nRF52832 based PCA10040 and use them as a starting point for nRF52810 development. The emulated projects are available for the following examples:

  • Hardware peripheral examples:
    • UART
    • SAADC
  • Most BLE peripheral examples
  • Direct Test Mode (DTM)

You can also create a similar emulated project for any other example, as long as it is compatible in terms of used peripherals. See .

Additionally, in some cases, a small hardware modification might be required on the PCA10040 board. See .

This approach has certain limitations, as some features cannot be effectively emulated in this way. See .

Hardware emulation of nRF52810

Due to a slightly different architecture of the COMP module, in special cases it is necessary to introduce a manual hardware change before using PCA10040 for nRF52810 development. If you want to use VDD/2 as analog input on the AIN7 pin of nRF52810, you must create a voltage divider and set it up according to the following figure.

nrf52810_voltage_divider.svg
Recommended setup of the voltage divider circuit

Limitations

The following features of nRF52810 cannot be fully emulated using an nRF52832 Development Kit (PCA10040) with this SDK:

Differences nRF52832 nRF52810
SPIM: RXD.MAXCNT 8-bit 10-bit
SPIM: TXD.MAXCNT 8-bit 10-bit
SPIS: RXD.MAXCNT 8-bit 10-bit
SPIS: TXD.MAXCNT 8-bit 10-bit
TWIM: RXD.MAXCNT 8-bit 10-bit
TWIM: TXD.MAXCNT 8-bit 10-bit
TWIS: RXD.MAXCNT 8-bit 10-bit
TWIS: TXD.MAXCNT 8-bit 10-bit
UARTE: RXD.MAXCNT 8-bit 10-bit
UARTE: TXD.MAXCNT 8-bit 10-bit

Software emulation of nRF52810

All SDK examples for nRF52810 are configured to be run on the nRF52 Development Kit, which uses nRF52832 (PCA10040). These examples use an emulated project that is stored in the 'pca10040e' folder. All examples that are hardware compatible can be set up to emulate nRF52810 on nRF52832, even though the emulated project is not available for all of them. Hardware compatibility means that a project uses only the resources present in nRF52810, including peripherals and memory.

Note
The example projects located in the 'pca10040e' folder include all Errata workarounds for nRF52832.

Creating your own emulated project——这一条很重要!

If the emulated project is not available for the example you need, then complete these steps to emulate the nRF52810 SoC.

pca10040topca10040e.svg
Converting a standard PCA10040 project to an emulated project
  1. Open the example project for your IDE.
  2. In the project settings, change to device "NordicSemiconductor->nRF52810_xxaa".
  3. In the C/C++ preprocessor settings, remove the defines "NRF52" and "NRF52832_XXAA".
  4. Add the preprocessor define "NRF52810_XXAA".
  5. In the linker script settings, adjust the linker script to match the maximum RAM and flash size of nRF52810.
    • ROM END: 0x2FFFF
    • RAM END: 0x20005FFF
  6. Remove the following files from the project: <compiler>_startup_nrf52.s and system_nrf52.c.
  7. Add the following files to the project: <compiler>_startup_nrf52810.s and system_nrf52810.c.
  8. Add the DEVELOP_IN_NRF52832 define to the compile flags. Adding this define will add extra code in SystemInit handling the Errata workarounds needed for nRF52832. This will result in an increase in flash usage and a longer startup time.

Transferring the project to nRF52810 hardware

If you have already developed your application starting from the standard PCA10040 project, follow this procedure to reconfigure your project before it can be transferred and run natively on nRF52810.

Note
As part of this procedure, you must change the BSP to the one matching your custom board. See  .
pca10040tonrf52810.svg
Transferring a PCA10040 project to nRF52810 SoC
  1. Open the example project for your IDE.
  2. In the project settings, change to device "NordicSemiconductor->nRF52810_xxaa".
  3. In the C/C++ preprocessor settings, remove the defines "NRF52" and "NRF52832_XXAA".
  4. Add the preprocessor define "NRF52810_XXAA".
  5. In the linker script settings, adjust the linker script to match the maximum RAM and flash size of nRF52810.
    • ROM END: 0x2FFFF
    • RAM END: 0x20005FFF
  6. Remove the following files from the project: <compiler>_startup_nrf52.s and system_nrf52.c.
  7. Add the following files to the project: <compiler>_startup_nrf52810.s and system_nrf52810.c.

Transferring emulated project

pca10040etonrf52810.svg
Transferring an emulated project to the nRF52810 SoC

If you have developed your application using the emulated project as a starting point, there is only one step you need to perform before you can run it natively on nRF52810: In your IDE, remove the DEVELOP_IN_NRF52832 define from the compile flags.


 |   |   | Updated 2018-11-16
 
转载自:https://www.nordicsemi.com/en/DocLib/Content/SDK_Doc/nRF5_SDK/v15-2-0/nrf52810_user_guide

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

你可能感兴趣的文章
1039 到底买不买 (20 分)
查看>>
关于CentOS下 yum包下载下的rpm包放置路径
查看>>
centos下添加epel源
查看>>
在SQLServer 2005附加SQLServer 2008数据库异常处理
查看>>
网易新闻侧滑抽屉效果(利用父子控制器实现)
查看>>
Ceph:pg peering过程分析
查看>>
4.高级特性(1)
查看>>
table添加正确的样式
查看>>
求斐波那契数列的第n项
查看>>
一些程序的整理
查看>>
Ubuntu 10.04 compiz的安装
查看>>
angular项目引用第三方公共js文件
查看>>
内置函数
查看>>
JAVA时区处理(转)
查看>>
sqlserver 字符串相关函数
查看>>
C#_02.10_基础一_.NET框架
查看>>
apk编译/反编译工具baksmali… 分类: Android安装及...
查看>>
递归趣文【Matrix67】
查看>>
转载: android 学习架构
查看>>
POJ-3176 Cow Bowling
查看>>