u-blox BMD-3, NINA-B40 User Manual

crystal. This application note describes the necessary steps to modify an application project to
RC oscillator configuration for nRF5 open CPU modules
Bluetooth Low Energy
Application note
Abstract
The BMD-3 and NINA-B40 open CPU modules may be used without an external low-frequency
select the internal RC oscillator as the low-frequency clock source.
UBX-20009242 - R02 C1-Public www.u-blox.com
RC oscillator configuration for nRF5 open CPU modules - Application note
u-blox or third parties may hold intellectual property rights in the products, names, logos and designs included in this document. Copying, reproduction, modification or disclosure to third parties of this document or any part thereof is only permitted with the The information contained herein is provided “as is” and u implied, is given, including but not limited purpose of the information. This document may be revised by u documents, visit www.u Copyright © u

Document information

Title RC oscillator configuration for nRF5 open CPU modules
Subtitle Bluetooth Low Energy
Document type Application note
Document number UBX-20009242
Revision and date R02 15-Jan-2021
Disclosure restriction C1-Public
This document applies to the following products:
Product name
ANNA-B112 (open CPU only, see ANNA B1 SIM for u-connect® [1])
BMD-3
NINA-B40
NINA-B306-01B
UBX-20009242 - R02 Document information Page 2 of 10 C1-Public
express written permission of u-blox.
-blox assumes no liability for its use. No warranty, either express or
to, with respect to the accuracy, correctness, reliability and fitness for a particular
-blox at any time without notice. For the most recent
-blox.com.
-blox AG.
RC oscillator configuration for nRF5 open CPU modules - Application note

Contents

Document information ............................................................................................................................. 2
Contents ....................................................................................................................................................... 3
1 Introduction .......................................................................................................................................... 4
2 SDK configuration ............................................................................................................................... 5
2.1 External low-frequency crystal oscillator (LFXO) ................................................................................. 5
2.2 Internal RC low-frequency oscillator (LFRC) ......................................................................................... 5
2.2.1 SoftDevice clock configuration ........................................................................................................ 5
2.2.2 Clock peripheral driver ....................................................................................................................... 6
2.2.3 Legacy clock peripheral driver .......................................................................................................... 6
2.3 Synthesized low-frequency clock (LFSYNT) ......................................................................................... 6
Appendix ....................................................................................................................................................... 7
A Glossary ................................................................................................................................................. 7
Related documents ................................................................................................................................... 8
Revision history .......................................................................................................................................... 9
Contact ....................................................................................................................................................... 10
UBX-20009242 - R02 Contents Page 3 of 10 C1-Public
RC oscillator configuration for nRF5 open CPU modules - Application note

1 Introduction

For applications running on the ANNA-B1, BMD-3 and NINA-B40 series modules, there is a choice of the low-frequency oscillator source. The lowest possible power consumption scenario uses an external crystal and loading capacitors connected to GPIO pins named P0.00 and P0.01. Using the crystal also provides a tighter tolerance which is required for certain protocols, for example ANT+ [3].
The NINA-B306-01B module cannot use an external low frequency crystal oscillator (LFXO), and the application software needs to be configured for the internal RC oscillator clock source.
Certain applications may need to utilize all the GPIO pins, may be size-constrained where the space required for the crystal and capacitors is not available, or extremely cost conscious. For these applications, internal RC oscillator may be selected. Links to the LFCLK product specification sections of the nRF CPUs are in [4], [5], [6], and [7].
Bluetooth® Low Energy applications may use either low-frequency clock source [2].
UBX-20009242 - R02 Introduction Page 4 of 10 C1-Public
RC oscillator configuration for nRF5 open CPU modules - Application note

2 SDK configuration

After making the necessary modifications, recompile the application to apply the changes.

2.1 External low-frequency crystal oscillator (LFXO)

For all of the examples provided by Nordic Semiconductor in the nRF5 SDK, the default is the LFXO. The external crystal and capacitors are provided on the EVKs, so no modifications are necessary.

2.2 Internal RC low-frequency oscillator (LFRC)

Each nRF5 SDK example project is provided with a header file called sdk_config.h. Within this file, three sections need minor modification in order to select the LFRC. The large, and changes with each SDK release, so specific line numbers are not mentioned. A text search will show the necessary sections.

2.2.1 SoftDevice clock configuration

The first section to modify contains four parameters to configure SoftDevice timing. Locate the following section in sdk_config.h:
sdk_config.h file is rather
// </h> //========================================================== // <h> Clock - SoftDevice clock configuration //==========================================================
For each parameter the original value for the LFXO is noted as a comment.
2.2.1.1 SoftDevice Clock source
// <o> NRF_SDH_CLOCK_LF_SRC - SoftDevice clock source. // <0=> NRF_CLOCK_LF_SRC_RC // <1=> NRF_CLOCK_LF_SRC_XTAL // <2=> NRF_CLOCK_LF_SRC_SYNTH #ifndef NRF_SDH_CLOCK_LF_SRC
#define NRF_SDH_CLOCK_LF_SRC 0 // was 1
#endif
2.2.1.2 SoftDevice calibration timer interval
SoftDevice calibration timer interval // <o> NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. #ifndef NRF_SDH_CLOCK_LF_RC_CTIV
#define NRF_SDH_CLOCK_LF_RC_CTIV 16 // was 0 (ignored)
#endif
2.2.1.3 SoftDevice calibration timer interval under constant temperature
// <o> NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under // constant temperature. // <i> How often (in number of calibration intervals) the RC oscillator shall be // calibrated if the temperature has not changed.
#ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2 // was 0 (ignored)
#endif
// <o> NRF_SDH_CLOCK_LF_ACCURACY - External clock accuracy used in the LL to // compute timing. // <0=> NRF_CLOCK_LF_ACCURACY_250_PPM // <1=> NRF_CLOCK_LF_ACCURACY_500_PPM // <2=> NRF_CLOCK_LF_ACCURACY_150_PPM // <3=> NRF_CLOCK_LF_ACCURACY_100_PPM
UBX-20009242 - R02 SDK configuration Page 5 of 10 C1-Public
RC oscillator configuration for nRF5 open CPU modules - Application note
// <4=> NRF_CLOCK_LF_ACCURACY_75_PPM // <5=> NRF_CLOCK_LF_ACCURACY_50_PPM // <6=> NRF_CLOCK_LF_ACCURACY_30_PPM // <7=> NRF_CLOCK_LF_ACCURACY_20_PPM // <8=> NRF_CLOCK_LF_ACCURACY_10_PPM // <9=> NRF_CLOCK_LF_ACCURACY_5_PPM // <10=> NRF_CLOCK_LF_ACCURACY_2_PPM // <11=> NRF_CLOCK_LF_ACCURACY_1_PPM #ifndef NRF_SDH_CLOCK_LF_ACCURACY
#define NRF_SDH_CLOCK_LF_ACCURACY 1 // was 7 (for a 20ppm crystal)
#endif
1

2.2.2 Clock peripheral driver

Newer examples utilize the “NRFX” clock drive for non-radio low-frequency timing (timers, RTC, etc.). Locate the
// <e> NRFX_CLOCK_ENABLED - nrfx_clock - CLOCK peripheral driver //========================================================== #ifndef NRFX_CLOCK_ENABLED #define NRFX_CLOCK_ENABLED 1 #endif
// <o> NRFX_CLOCK_CONFIG_LF_SRC - LF Clock Source // <0=> RC // <1=> XTAL // <2=> Synth // <131073=> External Low Swing // <196609=> External Full Swing #ifndef NRFX_CLOCK_CONFIG_LF_SRC
#define NRFX_CLOCK_CONFIG_LF_SRC 0 // was 1
#endif
nrfx_clock section:

2.2.3 Legacy clock peripheral driver

The legacy clock peripheral driver is also included to provide backward compatibility with older code ported to a newer SDK version: Locate the
// <e> NRF_CLOCK_ENABLED - nrf_drv_clock - CLOCK peripheral driver - legacy layer //========================================================== #ifndef NRF_CLOCK_ENABLED #define NRF_CLOCK_ENABLED 1 #endif // <o> CLOCK_CONFIG_LF_SRC - LF Clock Source // <0=> RC // <1=> XTAL // <2=> Synth // <131073=> External Low Swing // <196609=> External Full Swing #ifndef CLOCK_CONFIG_LF_SRC
#define CLOCK_CONFIG_LF_SRC 0 // was 1
#endif
nrf_drv_clock section:

2.3 Synthesized low-frequency clock (LFSYNT)

The nRF5 CPUs also have a synthesized low-frequency clock option. While it provides the tightest tolerance (<10 ppm), it also uses the most power since the HFCLK must always be enabled. Nordic Semiconductor does not recommend its use with current SoftDevices
2
.
1
Although the nRF52832 product specification calls out ±250 ppm for LFRC accuracy, SDK v16.0.0 suggests using ±500 ppm.
Other nRF52 CPUs specify ±500 ppm for LFRC.
2
See the Nordic Semiconductor SoftDevice release notes contained within the downloaded zip file
UBX-20009242 - R02 SDK configuration Page 6 of 10 C1-Public
RC oscillator configuration for nRF5 open CPU modules - Application note

Appendix

A Glossary

Abbreviation Definition
ANT+ Low power wireless communication standard
ARM Arm (Advanced RISC Machines) Holdings
CPU Central Processing Unit
LFXO Low-frequency crystal oscillator
LFRC Low-frequency RC oscillator
LFSYNT Synthesized low-frequency oscillator
PPM Parts per million
SDK Software Development Kit
SoftDevice Nordic Semiconductor implementation of the Bluetooth communications stack
Table 1: Explanation of the abbreviations and terms used
UBX-20009242 - R02 Appendix Page 7 of 10 C1-Public
RC oscillator configuration for nRF5 open CPU modules - Application note

Related documents

[1] ANNA-B1 system integration manual, UBX-18009821 [2] Bluetooth SIG website [3] ANT+ standard [4] Nordic Semiconductor nRF52810 LFCLK controller [5] Nordic Semiconductor nRF52811 LFCLK controller [6] Nordic Semiconductor nRF52832 LFCLK controller [7] Nordic Semiconductor nRF52840 LFCLK controller [8] Nordic Semiconductor S140 SoftDevice
For product change notifications and regular updates of u-blox documentation, register on our
website, www.u-blox.com.
3
3
Other SoftDevice versions (S112, S113, S132) are subsets of S140
UBX-20009242 - R02 Related documents Page 8 of 10 C1-Public
RC oscillator configuration for nRF5 open CPU modules - Application note

Revision history

Revision Date Name Comments
R01 18-Feb-2020 brec Initial release
R02 15-Jan-2021 mape Included minor typographical corrections and extended document scope to
include NINA-B306-01B.
UBX-20009242 - R02 Revision history Page 9 of 10 C1-Public
RC oscillator configuration for nRF5 open CPU modules - Application note

Contact

For complete contact information, visit us at www.u-blox.com.
u-blox Offices
North, Central and South America
u-blox America, Inc.
Phone: +1 703 483 3180 E-mail: info_us@u-blox.com
Regional Office West Coast:
Phone: +1 408 573 3640 E-mail: info_us@u-blox.com
Technical Support:
Phone: +1 703 483 3185 E-mail: support@u-blox.com
Headquarters Europe, Middle East, Africa
u-blox AG
Phone: +41 44 722 74 44 E-mail: info@u-blox.com Support: support@u-blox.com
Asia, Australia, Pacific
u-blox Singapore Pte. Ltd.
Phone: +65 6734 3811 E-mail: info_ap@u-blox.com Support: support_ap@u-blox.com
Regional Office Australia:
Phone: +61 2 8448 2016 E-mail: info_anz@u-blox.com Support: support_ap@u-blox.com
Regional Office China (Beijing):
Phone: +86 10 68 133 545 E-mail: info_cn@u-blox.com Support: support_cn@u-blox.com
Regional Office China (Chongqing):
Phone: +86 23 6815 1588 E-mail: info_cn@u-blox.com Support: support_cn@u-blox.com
Regional Office China (Shanghai):
Phone: +86 21 6090 4832 E-mail: info_cn@u-blox.com Support: support_cn@u-blox.com
Regional Office China (Shenzhen):
Phone: +86 755 8627 1083 E-mail: info_cn@u-blox.com Support: support_cn@u-blox.com
Regional Office India:
Phone: +91 80 405 092 00 E-mail: info_in@u-blox.com Support: support_in@u-blox.com
Regional Office Japan (Osaka):
Phone: +81 6 6941 3660 E-mail: Support: support_jp@u-blox.com
Regional Office Japan (Tokyo):
Phone: +81 3 5775 3850 E-mail: info_jp@u-blox.com Support: support_jp@u-blox.com
Regional Office Korea:
Phone: +82 2 542 0861 E-mail: info_kr@u-blox.com Support: support_kr@u-blox.com
Regional Office Taiwan:
Phone: +886 2 2657 1090 E-mail: info_tw@u-blox.com Support: support_tw@u-blox.com
info_jp@u-blox.com
UBX-20009242 - R02 Contact Page 10 of 10 C1-Public
Loading...