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

Nordic api equivalent in nRF_Connect_SDK

Hi,

I had my application running on nRF_SDK_For_Thread_and_Zigbee.

I have been following SDK APIs directly in my code to calculate certain parameters:

1.  nrf_temp_read()

2.  NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_VDD) (for calculating battery life- analog peripheral example)

3. nrf_mem_init()

4. nrf_cal_get_epoch_time()

Could you please help me in finding their equivalent APIs in nRF_Connect_SDK? 

Parents Reply Children
  • In this one, 

    I am getting the following error :

     error: 'NRF_SAADC_NS' undeclared (first use in this function); did you mean 'NRF_SAADC_H_'?
       86 |     NRF_SAADC_NS->TASKS_CALIBRATEOFFSET = 1;
          |     ^~~~~~~~~~~~
          |     NRF_SAADC_H_
    

    Also, can you explain the prj.conf of this sample, which config is used for what purpose?

  • _NS is for the non-secure domain in nRF9160/nRF5340. nRF52840 does not have secure domain, so this is postfix is not used. Just rename it to NRF_SAADC or remove the whole line if you do not need calibration. Note that this sample is written for nRF9160, so it may not run as expected on nRF52840, it was just meant as a code reference. The configs are described in the Kconfig reference documentation. Some of the configs are not related to the ADC, but the nRF9160. You may have to set the CONFIG_ADC_CONFIGURABLE_INPUTS config as well.

Related