This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

52832: NRF_CLOCK seems not to be enabled in a new project

Hello guys, 

I am facing the following problem:

I created a project from zero, using the Nordic Package for SeggerStudios

--> I selected the option A C/C++ executable for Nordic Sol...
--> Accepted all the custom configurations in the following (three) windows

Next I started by adding the LED functionality, worked perfectly, added all references to the necessary files in the  nRF5_SDK_17.0.2_d674dde folder, avoiding to use legacy files...

Now i wanted to add FreeRTOS and SPI functionality. I observed that first is necessary to add the clock... and there are some legacy files needed (big sad face) That´s where I got the error :


Error: Expected expression.
Line: 
if (!NRFX_IRQ_IS_ENABLED(nrfx_get_irq_number(NRF_CLOCK)))

file: nrfx_power_clock.h

Building ‘ULP_Project’ from solution ‘ULP_Project’ in configuration ‘Debug’
'Output/Debug/Obj/ULP_Project/system_nrf52.o' is up to date
'Output/Debug/Obj/ULP_Project/main.o' is up to date
'Output/Debug/Obj/ULP_Project/SEGGER_THUMB_Startup.o' is up to date
'Output/Debug/Obj/ULP_Project/ses_startup_nrf_common.o' is up to date
'Output/Debug/Obj/ULP_Project/ses_startup_nrf52.o' is up to date
'Output/Debug/Obj/ULP_Project/boards.o' is up to date
Output/Debug/Obj/ULP_Project/nrf_drv_clock.o does not exist.
Compiling ‘nrf_drv_clock.c’
nrf_drv_clock.c
nrf_drv_clock.h
nrfx_clock.h
expected expression
Build failed

my sdk_config.h file is the same as in the SDK
with 

// <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 1
#endif

// <o> CLOCK_CONFIG_IRQ_PRIORITY - Interrupt priority

// <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
// <0=> 0 (highest)
// <1=> 1
// <2=> 2
// <3=> 3
// <4=> 4
// <5=> 5
// <6=> 6
// <7=> 7

#ifndef CLOCK_CONFIG_IRQ_PRIORITY
#define CLOCK_CONFIG_IRQ_PRIORITY 6
#endif

// </e>

my includes in main.c are:

#include "nrf_gpio.h"
#include "boards.h"
#include "nrfx_spi.h"

QUESTIONS:
Where do I define the NRF_CLOCK?

Am I doing, or did I do something wrong?

Thank you
JH

Related