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

Merging two examples in SDK14

Hi,

I've been working with SDK11, and now I have to move my project to SDK14 due to some issues with the old SDK.
In SDK11 I could just use Keil's "Manage Run-Time Enviroments" dialog to add whatever libraries I needed, and it worked.

Now I've started moving all my code to SDK14 and things don't work as they did, and now I'm trying to get the same code working.

I've started by taking the ble_app_uart example and adding to it the record_url example. I merged the required code, I went in the project options
under C/C++, ASM and appended the library paths there, but it still does not work, I keep getting:

linking...
.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nfc_t2t_emulation_start (referred from main.o).
.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nfc_t2t_payload_set (referred from main.o).
.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nfc_t2t_setup (referred from main.o).
.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nfc_uri_msg_encode (referred from main.o).
Not enough information to list image symbols.

I even tried merging the makefiles.

Also where did the nrf_drv_config.h file go?
Where do I now enable peripherals?

Parents
  • I finally got it to work on the devboard, but now I need to get it working on my board, on which everything works fine with the SDK11.
    On my board I don't have the 32.768kHz crystal so I need to enable the RC oscillator, also no DCDC converter.
    I did try setting the sdk config file, but its still not working.
    I removed the UART initialization since the RX pin is left floating, but that did not change anything.

  • Are you getting any errors? If not, what is the symptoms showing it is not working on your board? What did you change in sdk_config.h? Note that the clock settings for the softdevice is configured in the parameters described on this page, not using the clock driver config. Pleae try to debug the application and report back any error codes you are seeing.

  • Hi,

    Thanks for the reply.
    In the SDK11 I did the following modifications to the example, and that is all thats required to get it working on my board which does not contain a 32.78kHz crystal and DC-DC converter:
    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION, NULL);
    And:
    NRF_POWER->DCDCEN = 0;

    On the SDK14 example I modified the sdk_config.h like this:


    //==========================================================
    
    // <h> Clock - SoftDevice clock configuration
    
    //==========================================================
    // <o> NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
     
    // <0=> NRF_CLOCK_LF_SRC_RC 
    // <1=> NRF_CLOCK_LF_SRC_XTAL 
    // <2=> NRF_CLOCK_LF_SRC_SYNTH 
    
    #ifndef NRF_SDH_CLOCK_LF_SRC
    #define NRF_SDH_CLOCK_LF_SRC 0
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
    #ifndef NRF_SDH_CLOCK_LF_RC_CTIV
    #define NRF_SDH_CLOCK_LF_RC_CTIV 12
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
    // <i> How often (in number of calibration intervals) the RC oscillator shall be calibrated
    // <i>  if the temperature has not changed.
    
    #ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
    #define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_XTAL_ACCURACY  - External crystal clock accuracy used in the LL to compute timing windows.
     
    // <0=> NRF_CLOCK_LF_XTAL_ACCURACY_250_PPM 
    // <1=> NRF_CLOCK_LF_XTAL_ACCURACY_500_PPM 
    // <2=> NRF_CLOCK_LF_XTAL_ACCURACY_150_PPM 
    // <3=> NRF_CLOCK_LF_XTAL_ACCURACY_100_PPM 
    // <4=> NRF_CLOCK_LF_XTAL_ACCURACY_75_PPM 
    // <5=> NRF_CLOCK_LF_XTAL_ACCURACY_50_PPM 
    // <6=> NRF_CLOCK_LF_XTAL_ACCURACY_30_PPM 
    // <7=> NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM 
    
    #ifndef NRF_SDH_CLOCK_LF_XTAL_ACCURACY
    #define NRF_SDH_CLOCK_LF_XTAL_ACCURACY 7

    And also disabled the UART initialization because I'm not using it.

    After that I would click build and program the board.

    Am I missing a step?

  • You should set NRF_SDH_CLOCK_LF_XTAL_ACCURACY to 0 or 1. This parameter is used for both external XTAL and RC oscillator in s132 v5.0.0 softdevice (which is used in SDK 14.x.0). Setting it to 7 will cause the softdevice to expect accuracy of 20PPM, which the RC oscillator cannot provide. This is from s132 v5.0.0 release notes:

    New functionality

    • SoftDevice
      • The RC oscillator accuracy can now be set to any of the defined NRF_CLOCK_LF_ACCURACY values, and there is no default anymore. In other words, the nrf_clock_lf_cfg_t::accuracy parameter now has the same functionality when used with the RCOSC clock source as with the XTAL clock source (DRGN-8666).
Reply
  • You should set NRF_SDH_CLOCK_LF_XTAL_ACCURACY to 0 or 1. This parameter is used for both external XTAL and RC oscillator in s132 v5.0.0 softdevice (which is used in SDK 14.x.0). Setting it to 7 will cause the softdevice to expect accuracy of 20PPM, which the RC oscillator cannot provide. This is from s132 v5.0.0 release notes:

    New functionality

    • SoftDevice
      • The RC oscillator accuracy can now be set to any of the defined NRF_CLOCK_LF_ACCURACY values, and there is no default anymore. In other words, the nrf_clock_lf_cfg_t::accuracy parameter now has the same functionality when used with the RCOSC clock source as with the XTAL clock source (DRGN-8666).
Children
Related