<?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>SDK 14.2.0: Reset on nrf_twi_mngr_perform(), TWI transaction memory messed up.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37872/sdk-14-2-0-reset-on-nrf_twi_mngr_perform-twi-transaction-memory-messed-up</link><description>I&amp;#39;m trying to migrate a working application from SDK 14.0.0 to SDK 14.2.0. I was using app_twi on SDK 14.0.0 and am now using nrf_twi_mngr on SDK 14.2.0. One difference is the ability to pass in the TWI config on each call to nrf_twi_mngr_perform() .</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 Aug 2018 21:15:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37872/sdk-14-2-0-reset-on-nrf_twi_mngr_perform-twi-transaction-memory-messed-up" /><item><title>RE: SDK 14.2.0: Reset on nrf_twi_mngr_perform(), TWI transaction memory messed up.</title><link>https://devzone.nordicsemi.com/thread/146596?ContentTypeID=1</link><pubDate>Thu, 30 Aug 2018 21:15:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21b542e4-3dcb-4f2f-90ec-a2b4aada8b35</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;I carried on with the SDK migration and noticed a completely unrelated problem, that my log message prefixes (the module names declared in each source file) were not making it through to the logs. Instead, only one of the module names was appearing for log messages from every module. I had already fixed the SDK 14.2.0 bug about the gcc linker script on log_const_data. Digging a bit deeper I found a devzone post about the same issue with&amp;nbsp;log_dynamic_data, which I hadn&amp;#39;t fixed. When I fixed that, suddenly the&amp;nbsp;&lt;span&gt;nrf_twi_mngr_perform() call worked.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is horrible &amp;quot;action at a distance&amp;quot; and I&amp;#39;d really like to understand it better. It&amp;#39;s only by blind luck that I was able to fix it and I need to know how a&amp;nbsp;more experienced engineer than me would have debugged this.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 14.2.0: Reset on nrf_twi_mngr_perform(), TWI transaction memory messed up.</title><link>https://devzone.nordicsemi.com/thread/146594?ContentTypeID=1</link><pubDate>Thu, 30 Aug 2018 20:42:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:860c63aa-7de2-42ac-b88c-5dbfefce3059</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Also, you shouldn&amp;#39;t need to compile my project because I provided hex files in the case. I&amp;#39;d get this running on a DK, but I don&amp;#39;t think there&amp;#39;s a TWI device on there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 14.2.0: Reset on nrf_twi_mngr_perform(), TWI transaction memory messed up.</title><link>https://devzone.nordicsemi.com/thread/146593?ContentTypeID=1</link><pubDate>Thu, 30 Aug 2018 20:40:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd92215f-dba7-4b2c-9e08-1643e51da104</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;No, I&amp;#39;m not able to execute&amp;nbsp;&lt;span&gt;nrf_drv_twi_init() without getting a reset. Yes, the reset is part of&amp;nbsp;nrf_twi_mngr_perform(), because that calls&amp;nbsp;nrf_drv_twi_init() when it thinks the config has changed since the last call to it. Yes, I&amp;#39;ve tried to debug the nrf_queue code.&amp;nbsp;See my comments added in&amp;nbsp;&lt;/span&gt;nrf_twi_mngr_schedule() - the internal transaction&amp;#39;s required config is null (good) before pushing onto the queue. Once it&amp;#39;s on the queue it&amp;#39;s hard to debug, because the queue code knows nothing about the types of the elements, but I do see that when popping the element off the queue,&amp;nbsp;nrf_queue_generic_pop() thinks the element size in only 4 bytes. It can&amp;#39;t be - see the nrf_twi_mngr_transaction_t type. I also note from my map file that m_twi and m_twi_queue are in flash, not RAM. Not sure if that&amp;#39;s expected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 14.2.0: Reset on nrf_twi_mngr_perform(), TWI transaction memory messed up.</title><link>https://devzone.nordicsemi.com/thread/146550?ContentTypeID=1</link><pubDate>Thu, 30 Aug 2018 14:46:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0b06937-4651-4eb7-82d2-495ba42cd287</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I&amp;#39;m a bit confused. Are you not able to execute&amp;nbsp;nrf_drv_twi_init? In your initial post you wrote that you got a reset on&amp;nbsp;nrf_twi_mngr_perform. Have you tried to debug the application through nrf_queue_push and nrf_queue_pop functions to see exactly where the address is changed? I&amp;#39;m having some issues trying to compile your project, and I do not have the required sensors to test it with anyway. I&amp;#39;m not able to reproduce this issue with the TWI manager example in the SDK, which also use NULL as&amp;nbsp;value for config parameter passed to&amp;nbsp;nrf_twi_mngr_perform.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 14.2.0: Reset on nrf_twi_mngr_perform(), TWI transaction memory messed up.</title><link>https://devzone.nordicsemi.com/thread/146164?ContentTypeID=1</link><pubDate>Tue, 28 Aug 2018 16:44:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:967a6598-5a50-4d60-8de9-5e5bd20a4379</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Yes, the address is changed when the transaction is popped.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m able to execute&amp;nbsp;nrf_drv_twi_uninit() but not&amp;nbsp;nrf_drv_twi_init(), because the config passed in there is in the wrong memory. The reset happens on the&amp;nbsp;&lt;span&gt;nrf_drv_twi_init() call (these are in&amp;nbsp;start_pending_transaction()).&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 14.2.0: Reset on nrf_twi_mngr_perform(), TWI transaction memory messed up.</title><link>https://devzone.nordicsemi.com/thread/146139?ContentTypeID=1</link><pubDate>Tue, 28 Aug 2018 13:30:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d703632c-2f15-4d46-96bd-c3fc54f4897d</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]After it&amp;#39;s popped off the queue the transaction&amp;#39;s required config is at a weird address in memory[/quote]
&lt;p&gt;Is the address changed when the transaction is popped at nrf_twi_mngr.c:147, i.e., before it is assigned the default config at line 167?&lt;/p&gt;
&lt;p&gt;Sounds like a hardfault due to an invalid address access.&amp;nbsp;To which exact line are you able to step until?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 14.2.0: Reset on nrf_twi_mngr_perform(), TWI transaction memory messed up.</title><link>https://devzone.nordicsemi.com/thread/146041?ContentTypeID=1</link><pubDate>Tue, 28 Aug 2018 07:36:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4ff5a70-1fca-495c-b46d-1f6375e2cd9d</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Added the whole codebasse in case&amp;nbsp;212942.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>