nrf_clock_lf_cfg_t clock_lf_cfg = NRF_CLOCK_LFCLKSRC;
// see nrf_sdm.h for more details
nrf_clock_lf_cfg_t clock_lf_cfg =
{
.source = NRF_CLOCK_LF_SRC_RC,
.rc_ctiv = 16, // Interval in 0.25 s, 16 * 0.25 = 4 sec
.rc_temp_ctiv = 2, // Check temperature every .rc_ctiv, but calibrate every .rc_temp_ctiv
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_250_PPM,
};
Internal RC Oscillator: The chip has an internal RC oscillator with an accuracy of 250ppm when calibrated. The only thing you can select for the RC via this enumeration is the calibration interval. As given in the nRF51822 PS, the accuracy is specified when the temperature is relatively stable, and it calibrates every 4 seconds, so this is the calibration interval that should be used for most (all?) applications.
While the RC is being calibrated, the 16MHz clock must be running during the calibration process, which will cause the average current consumption to increase by 6-7μA at 4 second intervals. The RC also uses more current than the crystal, so the total increase compared to a 20 ppm crystal might be 8-10µA.
This mode uses the enumeration: NRF_CLOCK_LFCLKSRC_RC_250_PPM_xMS_CALIBRATION, where x is the desired calibration interval, typically 4000 milliseconds.
In recent SDKs, a calibration option with respect to temperature changes has been added, it has enum nrf_clock_lfclksrc_rc_250_ppm_temp_xms_calibration. This will have lower current consumption than the nrf_clock_lfclksrc_rc_250_ppm_xms_calibration option, because the RC is only calibrated if there is a temperature change of 0.5℃ or more. The frequency drift of the RC is actually a result of temperature changes. The internal temperature peripheral of the nRF51 is used to make temperature measurements. If there has been a temperature change of 0.5℃ or more since the last calibration, the nRF51 is recalibrated. If the temperature change is <0.5℃, then the RC is not calibrated. Calibration of the RC takes 17ms, but measuring the temperature only takes 35us, which explains why measuring the temperature consumes less current than calibrating. If there are frequent temperature changes, the current consumption increase compared to a 20ppm crystal will be a worst case 8-10 uA. If the temperature changes are not frequent, then the current consumption increase compared to a 20ppm crystal will be about ~2uA.
A synthesized 32.768 kHz clock: This tells the softdevice to synthesize a lower frequency clock using the 16 MHz clock. Since the lower frequency clock is used during sleep, such as between connection events, this means that the 16 MHz must always be running, which greatly increases current consumption (most likely mA average current consumption, not µA).
Generally speaking there should be no reason to use this clock source, you should always be able to use an RC oscillator instead of a synthesized clock.
This mode uses the enumeration: NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM and should not be used.
The clock configuration location of nrf52 is as follows
Previous article:[nrf51][nrf52][SDK17] How to achieve low power operation in NRF series? Can it be accessed with freertos?
Next article:[bsp layer][nrf52832][nrf52840][nrf52810][nrf52820][bsp_rng] RNG random number generator configuration and use
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [Zero-knowledge ESP8266 tutorial] Quick start 27 Use of ADXL345 sensor module
- How to perform OTA upgrade on the OKT507-C development board on the Android system
- RT-Thread Application Practice-TI Temperature and Humidity HDC1000 Software Package Design and Production
- About Flash memory sectors, blocks, and pages
- Components Science Popularization: Component Selection Specifications
- Domestic PCB drawing software
- Solutions to the "Disconnected-you are now offline" issue when connecting to the Ubuntu system
- ESP8266 Getting Started Guide
- MSP430FR2355 LaunchPad Development Kit
- Millimeter wave sensors bring new intelligence to industrial applications