<?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>Use I2C0 instead of UART0 (nRF5340)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80724/use-i2c0-instead-of-uart0-nrf5340</link><description>Hello, 
 
 I work with the nRF5340 and want to use I2C0 (1-3 is reserved for other sensors in my project ). I already use I2C2 for a sensor and this works fine. 
 To use the I2C0, I must deactivate the UART0 because you can only use one of them. I deactivated</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 04 Nov 2021 14:28:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80724/use-i2c0-instead-of-uart0-nrf5340" /><item><title>RE: Use I2C0 instead of UART0 (nRF5340)</title><link>https://devzone.nordicsemi.com/thread/337521?ContentTypeID=1</link><pubDate>Thu, 04 Nov 2021 14:28:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9dfa58f2-6d01-449b-9d48-172151a00f96</guid><dc:creator>d_developer</dc:creator><description>&lt;p&gt;Hello Hakon, it worked. Thank you very much!!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use I2C0 instead of UART0 (nRF5340)</title><link>https://devzone.nordicsemi.com/thread/336871?ContentTypeID=1</link><pubDate>Mon, 01 Nov 2021 13:09:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d8d6840-1f0b-4830-ab83-566d9818009d</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Can you try also disabling logging for SPM?&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:rgba(255, 255, 255, 1);color:rgba(36, 36, 36, 1);float:none;font-family:&amp;#39;Segoe UI&amp;#39;, system-ui, &amp;#39;Apple Color Emoji&amp;#39;, &amp;#39;Segoe UI Emoji&amp;#39;, sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0;text-transform:none;white-space:normal;"&gt;child_image/spm.conf -&amp;gt; CONFIG_SERIAL=n&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use I2C0 instead of UART0 (nRF5340)</title><link>https://devzone.nordicsemi.com/thread/335617?ContentTypeID=1</link><pubDate>Mon, 25 Oct 2021 05:46:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:494646dd-69d7-4128-8103-6260833909da</guid><dc:creator>d_developer</dc:creator><description>&lt;p&gt;The problem seems to be in this function&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void spm_jump(void)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The program reaches a breakpoint in line 1 (reset_ns=...). When I click &amp;quot;Step Over&amp;quot;, the programm jumps to line 15 (spm_config_peripheral(uart_id, 0). Now the program will reach the main, if I run the program.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;reset_ns = TZ_NONSECURE_FUNC_PTR_CREATE(vtor_ns[1]);

	if (TZ_NONSECURE_FUNC_PTR_IS_NS(reset_ns)) {
		PRINT(&amp;quot;SPM: prepare to jump to Non-Secure image.\n&amp;quot;);

		/* Note: Move UARTE0 before jumping, if it is
		 * to be used on the Non-Secure domain.
		 */

		/* Configure UARTE0 as non-secure */
		uint8_t uart_id = NRFX_PERIPHERAL_ID_GET(NRF_UARTE0);

		IS_ENABLED(CONFIG_SPM_SHARE_CONSOLE_UART) ?
			spm_config_unlocked_peripheral(uart_id, 0) :
			spm_config_peripheral(uart_id, 0);
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use I2C0 instead of UART0 (nRF5340)</title><link>https://devzone.nordicsemi.com/thread/335522?ContentTypeID=1</link><pubDate>Fri, 22 Oct 2021 14:35:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09c5503a-bb6b-4567-95c9-d66255bc8de8</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Have you tried putting a breakpoint in one of these functions to see exactly how far it gets?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use I2C0 instead of UART0 (nRF5340)</title><link>https://devzone.nordicsemi.com/thread/335395?ContentTypeID=1</link><pubDate>Fri, 22 Oct 2021 05:34:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c51be592-6b1d-4fc4-8838-af230b81f413</guid><dc:creator>d_developer</dc:creator><description>&lt;p&gt;Hello Hakon,&lt;/p&gt;
&lt;p&gt;there are no reported errors. &lt;/p&gt;
&lt;p&gt;I think the code crashes somewhere else. If I pause the session the code calls always the following function:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static int init_twim(const struct device *dev)

static void twim_irq_handler(NRF_TWIM_Type * p_twim, twim_control_block_t * p_cb)

static ALWAYS_INLINE void arch_irq_unlock(unsigned int key)

void z_impl_k_sem_give(struct k_sem *sem)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use I2C0 instead of UART0 (nRF5340)</title><link>https://devzone.nordicsemi.com/thread/334806?ContentTypeID=1</link><pubDate>Tue, 19 Oct 2021 09:32:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32274f31-3405-4004-914e-2707988be6dd</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]The problem is, when I run the program in debug mode, it won’t reach the main function.[/quote]
&lt;p&gt;what happens when it doesn&amp;#39;t reach main? Does it just hang, or does the code crash somewhere? Where in the code does this happen? Are there any error codes?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>