NRFX Oscillator will never allow setting bypass for LFXO

In NRFX Oscillator header, accessing the function 

nrf_oscillators_lfxo_bypass_set
 requires the preprocessor macro 
NRF_OSCILLATORS_HAS_LFXO_BYPASS
 which in turn requires preprocessor conditional 
defined(OSCILLATORS_XOSC32KI_Type)

The problem is that final conditional is using the "defined" preprocessor macro to check if a typedef type exists which AFAIK is not valid usage and will always return false.

Tested using nrfconnect sdk 2.6.1 with a blinky project with CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL

#include <hal/nrf_oscillators.h> and then trying to use the function results in the function declaration being not found even though the NRF5340 has the bypass register.

Parents Reply Children
Related