<?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>System initialize sequence &amp;amp; I2C blocked</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/36205/system-initialize-sequence-i2c-blocked</link><description>The original order of my system initialize step is: 
 /******************************************* 1.nrf_drv_power_init() 
 2.APP_SCHED_INIT() 
 3.app_timer_init() 
 4.APP_GPIOTE_INIT() 
 5.NVIC_SetPriority() 
 6.nrf_drv_twi_init() + nrf_drv_twi_enable</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 12 Jul 2018 09:46:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/36205/system-initialize-sequence-i2c-blocked" /><item><title>RE: System initialize sequence &amp; I2C blocked</title><link>https://devzone.nordicsemi.com/thread/139858?ContentTypeID=1</link><pubDate>Thu, 12 Jul 2018 09:46:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e74c82f7-6fab-4c9a-8be5-83b39e64dabf</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;Is the original order correct?&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;I don&amp;#39;t know what you are trying to do, so I don&amp;#39;t know.&amp;nbsp;It is possible that you configure RTC1 twice or something when you use both the app_timer library and the clock driver, but I can&amp;#39;t tell unless you post more of your code. If it doesn&amp;#39;t work you should make sure to debug and check the return codes of every function as explained in my link above.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;How to define it blocking or non-blocking?&amp;nbsp;&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;Please refer to the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/hardware_driver_twi.html?cp=4_0_1_2_16_1#hardware_driver_twi_basic"&gt;TWI driver documentation&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: System initialize sequence &amp; I2C blocked</title><link>https://devzone.nordicsemi.com/thread/139797?ContentTypeID=1</link><pubDate>Thu, 12 Jul 2018 01:23:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49c09215-dc21-4b98-999e-befef094d3c9</guid><dc:creator>sdrest</dc:creator><description>&lt;p&gt;No, I miss the link. Is the original order correct?&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using a custom board.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;How to define it blocking or non-blocking? My config is as follow&lt;/p&gt;
&lt;p&gt;const nrf_drv_twi_config_t twi_config = {&lt;br /&gt; .scl = 20,&lt;br /&gt; .sda = 19,&lt;br /&gt; .frequency = NRF_TWI_FREQ_400K,&lt;br /&gt; .interrupt_priority = APP_IRQ_PRIORITY_HIGH,&lt;br /&gt; .clear_bus_init = false&lt;br /&gt; };&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: System initialize sequence &amp; I2C blocked</title><link>https://devzone.nordicsemi.com/thread/139566?ContentTypeID=1</link><pubDate>Tue, 10 Jul 2018 12:32:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ecec3b60-a01d-46b8-9b06-97037b45b525</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
[quote user=""]I saw&amp;nbsp;a document&amp;nbsp;mentioned that clock init should be before APP_SCHED_INIT(),[/quote]
&lt;p&gt;Do you have a link to that document?&lt;/p&gt;
&lt;p&gt;Have you &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/"&gt;debugged your application&lt;/a&gt;? Make sure to check the return codes of all function calls.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;How do you configure the I2C? Blocking or non-blocking? What pins are you using for SDA and SCL?&lt;/p&gt;
&lt;p&gt;Are you using a dev kit or a custom board?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>