<?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>soft reset in i2c api</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18193/soft-reset-in-i2c-api</link><description>hello i am interfacing i2c sensor mma8452 with nrf51 dk. my function is 
 void mma_read(uint8_t *x, uint8_t *y, uint8_t *z)
{
 uint32_t err_code;

 uint8_t rx_buffer[6];

 err_code = mma8452_I2C_register_read(MMA_ADDR, DATAX0, rx_buffer, sizeof</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Dec 2016 11:20:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18193/soft-reset-in-i2c-api" /><item><title>RE: soft reset in i2c api</title><link>https://devzone.nordicsemi.com/thread/70244?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 11:20:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d532a5c-6a80-4212-bae0-e91e91899edf</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;If you are suspecting that you have configured your I2C hardware incorrectly you can use &lt;a href="https://github.com/Martinsbl/twi-find-devices-on-bus"&gt;this simple example&lt;/a&gt; to debug.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: soft reset in i2c api</title><link>https://devzone.nordicsemi.com/thread/70243?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 11:19:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6ca01c8-dfc5-432b-95cc-fd2397f17c47</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Instead of using sd_nvic_SystemReset() right away I would recommend that you use APP_ERROR_CHECK(err_code) while your are still debugging. Then have a look &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/?answer=60126#post-id-60126"&gt;here&lt;/a&gt; to see how you can use that to debug.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: soft reset in i2c api</title><link>https://devzone.nordicsemi.com/thread/70246?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 10:33:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57520fa5-3c2c-44c7-b48f-397ccf73fdf0</guid><dc:creator>nordicbeginner</dc:creator><description>&lt;p&gt;ok how to check that device has reset or not??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: soft reset in i2c api</title><link>https://devzone.nordicsemi.com/thread/70245?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 10:30:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00201501-ba9d-4a0d-b93f-64df8756635c</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;So by using your code your device will soft reset every time mma8452_I2C_register_read() returns an error. If you have connected something wrong or done something incorrectly the function will always return an error and your device will continuously reset forever. Is this the infinite loop you talk about?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: soft reset in i2c api</title><link>https://devzone.nordicsemi.com/thread/70242?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 09:41:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a724caf-b486-4fcf-8a9b-87a29ab41817</guid><dc:creator>nordicbeginner</dc:creator><description>&lt;p&gt;my problem is that if mma8452_I2C_register_read() will get error , then i want to use soft reset&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: soft reset in i2c api</title><link>https://devzone.nordicsemi.com/thread/70241?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 09:31:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2eb8ae94-75bc-4687-9821-58bf4f25ad5b</guid><dc:creator>nordicbeginner</dc:creator><description>&lt;p&gt;if i disconnect scl,sda from mma8452 to nrf51. then it can&amp;#39;t get data&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: soft reset in i2c api</title><link>https://devzone.nordicsemi.com/thread/70240?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 09:12:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70130941-cffb-44f3-944b-3d94ddbde81b</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi. It sounds like mma8452_I2C_register_read() is returning an error. If so what is the error?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: soft reset in i2c api</title><link>https://devzone.nordicsemi.com/thread/70239?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 06:28:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24028eff-77f8-488e-bbd0-912405106848</guid><dc:creator>nordicbeginner</dc:creator><description>&lt;p&gt;waiting for anyone&amp;#39;s response&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>