<?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>Saving data to SD card every 5 sec (using app_timer)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30568/saving-data-to-sd-card-every-5-sec-using-app_timer</link><description>Hi, I&amp;#39;m using evaluation board nrf52 (nrf52832) and using SDK 13 (nRF5_SDK_13.0.0_04a0bfd) and programing it using eclipse. Here is the code: 
 
 Someting is not working and i&amp;#39;m not sure but in my opinion app_timer is not working correct. Log : 
 
 After</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 16 Feb 2018 10:22:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30568/saving-data-to-sd-card-every-5-sec-using-app_timer" /><item><title>RE: Saving data to SD card every 5 sec (using app_timer)</title><link>https://devzone.nordicsemi.com/thread/121063?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2018 10:22:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e972e1d7-a52e-4626-b9c0-ebae54a1b86b</guid><dc:creator>Jdam</dc:creator><description>&lt;p&gt;It helps, i add&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// Init for LFCLK
static void lfclk_request(void)
{
    ret_code_t err_code = nrf_drv_clock_init();
    APP_ERROR_CHECK(err_code);
    nrf_drv_clock_lfclk_request(NULL);

    if(nrf_drv_clock_lfclk_is_running()){
		NRF_LOG_INFO(&amp;quot;LFCLK: ON \r\n &amp;quot;);
	}
}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and in main&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
	// Request LF clock.
	    lfclk_request();

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;later i must add this in &lt;strong&gt;sdk_config.h&lt;/strong&gt; file&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="typescript"&gt;// &amp;lt;/e&amp;gt;

// &amp;lt;e&amp;gt; CLOCK_ENABLED - nrf_drv_clock - CLOCK peripheral driver
//==========================================================
#ifndef CLOCK_ENABLED
#define CLOCK_ENABLED 1
#endif
#if  CLOCK_ENABLED
// &amp;lt;o&amp;gt; CLOCK_CONFIG_XTAL_FREQ  - HF XTAL Frequency

// &amp;lt;0=&amp;gt; Default (64 MHz)

#ifndef CLOCK_CONFIG_XTAL_FREQ
#define CLOCK_CONFIG_XTAL_FREQ 0
#endif

// &amp;lt;o&amp;gt; CLOCK_CONFIG_LF_SRC  - LF Clock Source

// &amp;lt;0=&amp;gt; RC
// &amp;lt;1=&amp;gt; XTAL
// &amp;lt;2=&amp;gt; Synth

#ifndef CLOCK_CONFIG_LF_SRC
#define CLOCK_CONFIG_LF_SRC 1
#endif

// &amp;lt;o&amp;gt; CLOCK_CONFIG_IRQ_PRIORITY  - Interrupt priority


// &amp;lt;i&amp;gt; Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
// &amp;lt;0=&amp;gt; 0 (highest)
// &amp;lt;1=&amp;gt; 1
// &amp;lt;2=&amp;gt; 2
// &amp;lt;3=&amp;gt; 3
// &amp;lt;4=&amp;gt; 4
// &amp;lt;5=&amp;gt; 5
// &amp;lt;6=&amp;gt; 6
// &amp;lt;7=&amp;gt; 7

#ifndef CLOCK_CONFIG_IRQ_PRIORITY
#define CLOCK_CONFIG_IRQ_PRIORITY 7
#endif

// &amp;lt;e&amp;gt; CLOCK_CONFIG_LOG_ENABLED - Enables logging in the module.
//==========================================================
#ifndef CLOCK_CONFIG_LOG_ENABLED
#define CLOCK_CONFIG_LOG_ENABLED 1
#endif
#if  CLOCK_CONFIG_LOG_ENABLED
// &amp;lt;o&amp;gt; CLOCK_CONFIG_LOG_LEVEL  - Default Severity level

// &amp;lt;0=&amp;gt; Off
// &amp;lt;1=&amp;gt; Error
// &amp;lt;2=&amp;gt; Warning
// &amp;lt;3=&amp;gt; Info
// &amp;lt;4=&amp;gt; Debug

#ifndef CLOCK_CONFIG_LOG_LEVEL
#define CLOCK_CONFIG_LOG_LEVEL 3
#endif

// &amp;lt;o&amp;gt; CLOCK_CONFIG_INFO_COLOR  - ANSI escape code prefix.

// &amp;lt;0=&amp;gt; Default
// &amp;lt;1=&amp;gt; Black
// &amp;lt;2=&amp;gt; Red
// &amp;lt;3=&amp;gt; Green
// &amp;lt;4=&amp;gt; Yellow
// &amp;lt;5=&amp;gt; Blue
// &amp;lt;6=&amp;gt; Magenta
// &amp;lt;7=&amp;gt; Cyan
// &amp;lt;8=&amp;gt; White

#ifndef CLOCK_CONFIG_INFO_COLOR
#define CLOCK_CONFIG_INFO_COLOR 0
#endif

// &amp;lt;o&amp;gt; CLOCK_CONFIG_DEBUG_COLOR  - ANSI escape code prefix.

// &amp;lt;0=&amp;gt; Default
// &amp;lt;1=&amp;gt; Black
// &amp;lt;2=&amp;gt; Red
// &amp;lt;3=&amp;gt; Green
// &amp;lt;4=&amp;gt; Yellow
// &amp;lt;5=&amp;gt; Blue
// &amp;lt;6=&amp;gt; Magenta
// &amp;lt;7=&amp;gt; Cyan
// &amp;lt;8=&amp;gt; White

#ifndef CLOCK_CONFIG_DEBUG_COLOR
#define CLOCK_CONFIG_DEBUG_COLOR 0
#endif

#endif //CLOCK_CONFIG_LOG_ENABLED
// &amp;lt;/e&amp;gt;

#endif //CLOCK_ENABLED&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;but when i compile it, something stop the program and this is the finall log&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Process: JLinkGDBServer
APP:INFO:
FATFS.

CLOCK:INFO:Function: nrf_drv_clock_init, error code: NRF_SUCCESS.
APP:INFO:
 Timer_INIT.

APP:INFO:
 Init and create timer.

APP:INFO:
 Timer_sd_start.

APP:INFO:Timer was successfully started. 
APP:INFO:
 Timer_SD_Handler.

APP:INFO:
 DO IT :0 

APP:INFO:Initializing disk 0 (SDC)...
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and when i check SD card nothing is save on it.&amp;nbsp;&lt;br /&gt;Thanks for help, but now i need to solve other problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving data to SD card every 5 sec (using app_timer)</title><link>https://devzone.nordicsemi.com/thread/121043?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2018 08:15:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2223f705-a9cf-481e-bd22-192306c1a466</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;app_timer does not start up the LFCLK source. Try starting up the LFCLK, then start the app_timer instance.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;H&amp;aring;kon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>