<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SDK13 can not find sdk_config.h</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23049/sdk13-can-not-find-sdk_config-h</link><description>Hi, 
 I am trying to add saadc sample code to ble_blinky sample code. But I faced a problem. It seems that the sdk_config.h file is not recognized by the sample code. and I got this errors: 
 &amp;quot;TIMER_DEFAULT_CONFIG_FREQUENCY&amp;quot; is undefined
&amp;quot;TIMER_DEFAULT_CONFIG_MODE</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 27 Jun 2017 08:55:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23049/sdk13-can-not-find-sdk_config-h" /><item><title>RE: SDK13 can not find sdk_config.h</title><link>https://devzone.nordicsemi.com/thread/90711?ContentTypeID=1</link><pubDate>Tue, 27 Jun 2017 08:55:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db5010db-8ae5-459a-b7e5-959834ecb384</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Try using &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/?answer=60126#post-id-60126"&gt;this debug method&lt;/a&gt; to finc which line is causing the error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 can not find sdk_config.h</title><link>https://devzone.nordicsemi.com/thread/90709?ContentTypeID=1</link><pubDate>Mon, 26 Jun 2017 15:50:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63f717bf-12b2-4342-b340-9d252db1da5b</guid><dc:creator>Leila</dc:creator><description>&lt;p&gt;I found some more description on nrf)pwr_mgmt_init():
Depending on configuration, this function sets SEVONPEND in System Control Block (SCB). This operation is unsafe with the SoftDevice from interrupt priority higher than SVC.
AND
#define POWER_CONFIG_IRQ_PRIORITY 7
at sdk_config.h file.&lt;/p&gt;
&lt;p&gt;Does it cause the error?
How can I find where and which line the error happened?&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 can not find sdk_config.h</title><link>https://devzone.nordicsemi.com/thread/90708?ContentTypeID=1</link><pubDate>Mon, 26 Jun 2017 15:22:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0e75681-3a3e-499e-a27c-100d53699908</guid><dc:creator>Leila</dc:creator><description>&lt;p&gt;Thank again. faced the next &amp;quot;fatal error&amp;quot;. this is the infinitive loop:`for (;;)
{&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    ///---------SAADC----------
  //*
    if(m_saadc_calibrate == true)
    {
        NRF_LOG_INFO(&amp;quot;SAADC calibration starting...  \r\n&amp;quot;);    //Print on UART
        while(nrf_drv_saadc_calibrate_offset() != NRF_SUCCESS); //Trigger calibration task
        m_saadc_calibrate = false;
    }
    //*/
    nrf_pwr_mgmt_run();
    NRF_LOG_FLUSH();
  
    ////---------SAADC----------
      //Leila, commented if cluase, 170626
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;//        if (NRF_LOG_PROCESS() == false)
//        {
//            power_manage();
//        }
}`
It seems at the end power_manage() and nrf_pwr_mgmt_run() do the same. So I commented power_manage(). but still face fatal error which I can not understand where and why.&lt;/p&gt;
&lt;p&gt;Could you please help?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 can not find sdk_config.h</title><link>https://devzone.nordicsemi.com/thread/90712?ContentTypeID=1</link><pubDate>Mon, 26 Jun 2017 14:55:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:043540a6-fed4-4d75-9bf8-9c960e836875</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Check the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v13.0.0/group__nrf__drv__power.html?cp=4_0_0_6_8_13_1_9#ga91e3cbb6a6d81de22bd5d26740b29cca"&gt;API documentation&lt;/a&gt;. This error means that the softdevice have been enabled before &lt;code&gt;nrf_drv_power_init&lt;/code&gt; is called:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_ERROR_INVALID_STATE: Power driver has to be enabled before SoftDevice.
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 can not find sdk_config.h</title><link>https://devzone.nordicsemi.com/thread/90710?ContentTypeID=1</link><pubDate>Mon, 26 Jun 2017 14:53:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa2edf03-435e-4f7b-933e-e1866b587e40</guid><dc:creator>Leila</dc:creator><description>&lt;p&gt;It was the solution, but after some second I saw fatal error again.
I activated again the lines which I previously commented them (just to check if they were mandatory for the rest of code) and now get a fatal error form &lt;code&gt;err_code = nrf_drv_power_init(NULL);&lt;/code&gt; as it gets back NRF_ERROR_INVALID_STATE.&lt;/p&gt;
&lt;p&gt;could you please help me?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 can not find sdk_config.h</title><link>https://devzone.nordicsemi.com/thread/90707?ContentTypeID=1</link><pubDate>Mon, 26 Jun 2017 14:25:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a32e70f-5268-4680-b85e-2fa1921ff0c6</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Yes, &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.sds/dita/softdevices/s130/sd_resource_reqs/hw_block_interrupt_vector.html?cp=2_3_0_0_6_0"&gt;the softdevice use TIMER0 peripheral&lt;/a&gt; and will block access to this for the application. You need to enable another TIMER in &lt;em&gt;sdk_config.h&lt;/em&gt; and initialize the timer using &lt;code&gt;NRF_DRV_TIMER_INSTANCE(1);&lt;/code&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 can not find sdk_config.h</title><link>https://devzone.nordicsemi.com/thread/90704?ContentTypeID=1</link><pubDate>Mon, 26 Jun 2017 14:13:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cc68a21-b56d-4b8e-b4c8-df0894ef6f8d</guid><dc:creator>Leila</dc:creator><description>&lt;p&gt;Thank you. The problem is solved. Another question regarding to add saadc sample code to ble_blinky; do they have the same resource? I mean they both use the same timer or so on?&lt;/p&gt;
&lt;p&gt;Because finally I could Make it without any errors but doesn&amp;#39;t work efficiently. It stocks at saadc_sampling_event_init() function and get me back &amp;quot;:ERROE:Fatal&amp;quot; on serial port.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;int main(void)
{
    // Initialize.
    leds_init();
    timers_init();
    log_init();
    buttons_init();
    ble_stack_init();
    gap_params_init();
    gatt_init();
    services_init();
    advertising_init();
    conn_params_init();
      //*
    //---------SAADC----------
    //uint32_t err_code;
//    err_code = nrf_drv_power_init(NULL);
//    APP_ERROR_CHECK(err_code);

//    ret_code_t ret_code = nrf_pwr_mgmt_init();
//    APP_ERROR_CHECK(ret_code);

    NRF_LOG_INFO(&amp;quot;SAADC HAL simple example.\r\n&amp;quot;);
    saadc_init();
    saadc_sampling_event_init();
    saadc_sampling_event_enable();
    ////---------SAADC----------
    //*/
    // Start execution.
    NRF_LOG_INFO(&amp;quot;Blinky BLE_ADC example started.\r\n&amp;quot;);
    advertising_start();

    // Enter main loop.
    for (;;)
    {
      
        ///---------SAADC----------
      //*
        if(m_saadc_calibrate == true)
        {
            NRF_LOG_INFO(&amp;quot;SAADC calibration starting...  \r\n&amp;quot;);    //Print on UART
            while(nrf_drv_saadc_calibrate_offset() != NRF_SUCCESS); //Trigger calibration task
            m_saadc_calibrate = false;
        }
        //*/
//        nrf_pwr_mgmt_run();
//        NRF_LOG_FLUSH();
      
        ////---------SAADC----------
        
        if (NRF_LOG_PROCESS() == false)
        {
            power_manage();
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 can not find sdk_config.h</title><link>https://devzone.nordicsemi.com/thread/90705?ContentTypeID=1</link><pubDate>Mon, 26 Jun 2017 12:48:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:956e31bd-6cb5-42a1-b5bc-6e60bc69d3f4</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Did you enable the power peripheral driver in &lt;em&gt;sdk_config.h&lt;/em&gt; by setting &lt;code&gt;#define POWER_ENABLED 1&lt;/code&gt;? You also need to include the source file in your project:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[SDK_ROOT]\components\drivers_nrf\power\nrf_drv_power.c
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 can not find sdk_config.h</title><link>https://devzone.nordicsemi.com/thread/90706?ContentTypeID=1</link><pubDate>Mon, 26 Jun 2017 12:44:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7fa554a-0ff4-4e36-beb3-f538c7909cb1</guid><dc:creator>Leila</dc:creator><description>&lt;p&gt;Yes, Thank you. That was the problem.
Now I got another problem with Linking:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Error[Li005]: no definition for &amp;quot;nrf_drv_power_init&amp;quot; [referenced from C:\Users\admin\Desktop\Essentim\Nordic\Downloads\SDK\SamplenRF5_SDK_13.0.0_04a0bfd\examples\ble_peripheral\experimental_ble_app_blinky\pca10056\s140\iar\_build\main.o] 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Could you please let me know how it could be solved?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK13 can not find sdk_config.h</title><link>https://devzone.nordicsemi.com/thread/90703?ContentTypeID=1</link><pubDate>Mon, 26 Jun 2017 12:22:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d39eeb26-3b15-4286-af4f-df7e8beb93f4</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Did you enable the TIMER module in &lt;em&gt;sdk_config.h&lt;/em&gt; in the ble_blinky example by setting &lt;code&gt;#define TIMER_ENABLED 1&lt;/code&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>