Functions and data related to the high-frequency clock.
More...
#include <nrfcxx/clock.hpp>
|
static bool | hfxt_active () |
| Return true iff the high-frequency clock is being driven by a crystal oscillator. More...
|
|
static bool | hfxt_configure (int on) |
| Enable, disable, or query the state of application request for the high-frequency crystal. More...
|
|
|
constexpr static unsigned int | Frequency_Hz = 16'000'000 |
| The high-frequency clock always runs at nominal 16 MHz. More...
|
|
|
class | periph::TIMER |
| TIMER needs to request and release HFCLK constant latency.
|
|
Functions and data related to the high-frequency clock.
The high-frequency clock is on when the system is in ON mode, but may be sourced from either crystal oscillator or an RC oscillator.
- Note
- This is a data type for visibility management only; all members are static and it is not possible to create or manipulate instances of the type.
◆ constlat_request()
static void nrfcxx::clock::hfclk::constlat_request |
( |
const periph::TIMER & |
timer, |
|
|
bool |
enable |
|
) |
| |
|
staticprotected |
Set or clear timer-based requests for constant latency wakeups.
- See also
- periph::TIMER::configure
- Note
- Although this supports nRF51 PAN 11 "HFCLK: Base current
with HFCLK running is too high" by ensuring a running timer sets the power submode to force HFCLK active, it is independently useful to reduce latency when timer interrupts occur.
◆ hfxt_active()
static bool nrfcxx::clock::hfclk::hfxt_active |
( |
| ) |
|
|
inlinestatic |
Return true
iff the high-frequency clock is being driven by a crystal oscillator.
If false
the clock uses the RC oscillator.
◆ hfxt_configure()
static bool nrfcxx::clock::hfclk::hfxt_configure |
( |
int |
on | ) |
|
|
static |
Enable, disable, or query the state of application request for the high-frequency crystal.
- Parameters
-
on | a positive value to enable the HFXT; zero to disable HFXT; a negative value to return the configured state without change. |
- Returns
true
iff the configured state of the crystal is on.
- Note
- This controls whether the application requires the crystal as a source. hfxt_active() can be false when the crystal is configured enabled (e.g. while stabilizing), and can be true when the crystal is configured disabled (e.g. when calibrating a synthesized low-frequency clock).
- Warning
- On some nRF51 chips starting the HFXT may inhibit functional writes to
nrf5::CLOCK->LFCLKSRC
until the HFCLKSTARTED
event is received. A reasonable workaround is to start the LFCLK first. See devzone for the anomaly report to Nordic.
◆ Frequency_Hz
constexpr static unsigned int nrfcxx::clock::hfclk::Frequency_Hz = 16'000'000 |
|
staticconstexpr |
The high-frequency clock always runs at nominal 16 MHz.
This is true for both nRF51 where system clock is at 16 MHz, and for nRF52 where system clock is at 64 MHz.
The documentation for this class was generated from the following file: