<?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>nRF52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44737/nrf52832</link><description>static const nrf_drv_twi_t m_twi = NRF_DRV_TWI_INSTANCE(TWI_INSTANCE_ID); 
 
 Hi Everyone, 
 I&amp;#39;m new to nRF52832 programming. I want to learn more about nRF52 programs. 
 I&amp;#39;m starts from this above line. What is the function of this line and why it&amp;#39;s</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 Mar 2019 03:47:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44737/nrf52832" /><item><title>RE: nRF52832</title><link>https://devzone.nordicsemi.com/thread/175806?ContentTypeID=1</link><pubDate>Wed, 13 Mar 2019 03:47:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f385c0c-7531-4fb6-a7ee-67305530dce8</guid><dc:creator>Yuvaraj V</dc:creator><description>&lt;p&gt;Thank you Simon... Please keep support like this...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832</title><link>https://devzone.nordicsemi.com/thread/175805?ContentTypeID=1</link><pubDate>Wed, 13 Mar 2019 03:45:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab16af4d-1dc2-4185-813a-ba712cdf4af9</guid><dc:creator>Yuvaraj V</dc:creator><description>&lt;p&gt;Thank you julienh... Please keep support like this...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832</title><link>https://devzone.nordicsemi.com/thread/175749?ContentTypeID=1</link><pubDate>Tue, 12 Mar 2019 16:21:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5a06b6d-cf0a-429a-aa96-8e1fe1541819</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;&lt;span&gt;The line &amp;quot;&lt;/span&gt;&lt;em&gt;static const nrf_drv_twi_t m_twi = NRF_DRV_TWI_INSTANCE(TWI_INSTANCE_ID)&amp;quot;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/em&gt;creates a TWI instance (as julienh mentioned). The TWI instance is of the type&amp;nbsp;&lt;em&gt;nrf_drv_twi_t&lt;/em&gt;, which is a struct with the following fields:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;typedef struct
{
    uint8_t inst_idx;
    union
    {
#ifdef TWIM_PRESENT
        nrfx_twim_t twim;
#endif
#ifdef TWI_PRESENT
        nrfx_twi_t  twi;
#endif
    } u;
    bool    use_easy_dma;
} nrf_drv_twi_t&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The function NRF_DRV_TWI_INSTANCE() will create an instance of the struct above. The input can be either 0 or 1, and decides if one should use TWI instance 0 or 1 of the nRF52832 chip. If EasyDMA is enabled in the SoftDevice TWIM will be used and the field&amp;nbsp;&lt;em&gt;use_easy_dma&amp;nbsp;&lt;/em&gt;will be set to true.&lt;/p&gt;
&lt;p&gt;If you are new to Nordic&amp;#39;s chips, I would recommend you to take a look at the link provided by julienh, and go through the steps listed (at least the first four).&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832</title><link>https://devzone.nordicsemi.com/thread/175622?ContentTypeID=1</link><pubDate>Tue, 12 Mar 2019 12:30:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa49595d-a6c7-4c93-a5f4-3341313855fa</guid><dc:creator>julienh</dc:creator><description>&lt;p&gt;Check out this link&amp;nbsp;&lt;a href="https://www.nordicsemi.com/DocLib/Content/SDK_Doc/nRF5_SDK/v15-3-0/nrf51_getting_started"&gt;https://www.nordicsemi.com/DocLib/Content/SDK_Doc/nRF5_SDK/v15-3-0/nrf51_getting_started&lt;/a&gt;&amp;nbsp;and all the examples in the SDK.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;NRF_DRV_TWI_INSTANCE is used to create a TWI instance (I2C). You can find everything about that in the documentation&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>