This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Thread / SDK confusion

Hi, I am really confused about the Nordic SDK and way of doing things... I have seen so much conflicting documentation.

I am using SDK_for_Thread_and_Zigbee_v4.1.0 (currently the latest). My understanding is that this is based off of SDK 16.0.0 according to the release_notes.

Everything I try is a major pain.

First, I tried to enable RTT logging. However the sdk_config.h does not contain any of the #defines related to

#define NRF_LOG_ENABLED 1
#define NRF_LOG_BACKEND_RTT_ENABLED 1
#define NRF_LOG_BACKEND_RTT_TEMP_BUFFER_SIZE 256
#define NRF_LOG_BACKEND_RTT_TX_RETRY_DELAY_MS 1
#define NRF_LOG_BACKEND_RTT_TX_RETRY_CNT 3

Why are these defines missing from the sdk_config.h? I had to manually add them.

Second, I want to use a RTC in my code. To begin, I simply added the following line and included nrf_drv_rtc.h to my main.c :

const nrf_drv_rtc_t rtc = NRF_DRV_RTC_INSTANCE(0); /**< Declaring an instance of nrf_drv_rtc for RTC0. */

Compile fails with NRFX_RTC0_INST_IDX undeclared here.

Comparing to the examples/peripherals/rtc project, my sdk_config.h is missing a bunch of NRFX_RTC_ENABLED related #defines. Where are these defines supposed to come from and how do I magically know about them? It appears the CMSIS thingy is just a fancy way to enable/disable things already in the file, it doesn't appear to provide a way to add new items that are missing.

What am I missing? My sdk_config.h (comes from the Thread CLI MTD example) is missing tons of stuff.

Related