<?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>UART connect external MCU(STM32) transmit and recieved data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110696/uart-connect-external-mcu-stm32-transmit-and-recieved-data</link><description>Hi 
 I need to send data from nRF7002 to external CPU(STM32) use UART protocol, for HW nRF7002 P0.20 connect STM32 RX and RF7002 P0.22 connect STM32 TX, I try to use exercise to modify send 8 bytes data and recieved from STM32 8 bytes data, there is no</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Jun 2024 07:04:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110696/uart-connect-external-mcu-stm32-transmit-and-recieved-data" /><item><title>RE: UART connect external MCU(STM32) transmit and recieved data</title><link>https://devzone.nordicsemi.com/thread/487026?ContentTypeID=1</link><pubDate>Mon, 03 Jun 2024 07:04:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bddc3dbd-c0c9-4862-a4f0-af5d6d0959d9</guid><dc:creator>yithwe</dc:creator><description>&lt;p&gt;Hi Naeem Maroof&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; it&amp;#39;s work on&amp;nbsp; this terminal as I want to transmit, Thanks.&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Tina&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART connect external MCU(STM32) transmit and recieved data</title><link>https://devzone.nordicsemi.com/thread/486050?ContentTypeID=1</link><pubDate>Mon, 27 May 2024 15:25:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41433690-b30d-4026-aeb6-a3b6fb59933c</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;It is the terminal that is displaying it like this.&lt;/p&gt;
&lt;p&gt;Can you change setting to receive HEX:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1716823492214v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;(As in the lower right corner)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART connect external MCU(STM32) transmit and recieved data</title><link>https://devzone.nordicsemi.com/thread/485974?ContentTypeID=1</link><pubDate>Mon, 27 May 2024 08:49:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cc45e7f-ba23-4a60-af7c-5a9619327688</guid><dc:creator>yithwe</dc:creator><description>&lt;p&gt;Hi Naeem Maroof&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;em&gt;&amp;nbsp;&amp;nbsp;Do you confirm that when you send 0x41, you are able to receive the character A?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;yes, it&amp;#39;s work.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;it is only the encoding decoding that shows character for 0x41 but not for 0x01.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;we need to recieve real 0x41, not for character, do you have any suggestion for this issue or any API we can use?Thanks.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Tina&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART connect external MCU(STM32) transmit and recieved data</title><link>https://devzone.nordicsemi.com/thread/485870?ContentTypeID=1</link><pubDate>Fri, 24 May 2024 14:27:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7fe369cd-66a9-4a84-b363-922146d12e1e</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hi TIna,&lt;/p&gt;
[quote user="yithwe"]I try to send 0x41, but it convert to ASCII code[/quote]
&lt;p&gt;The purpose was to test that the uart functionality is working.&lt;/p&gt;
&lt;p&gt;Do you confirm that when you send 0x41, you are able to receive the character A?&lt;/p&gt;
&lt;p&gt;If that is the case then uart functionality is working, it is only the encoding decoding that shows character for 0x41 but not for 0x01.&lt;/p&gt;
&lt;p&gt;For example, you can see below that the number 0x41 can be seen as character A but 0x01 can not be displayed.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/8741.pastedimage1716560853587v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART connect external MCU(STM32) transmit and recieved data</title><link>https://devzone.nordicsemi.com/thread/485548?ContentTypeID=1</link><pubDate>Thu, 23 May 2024 07:52:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7da9c10-9848-40ac-ad2e-d5c59b032a85</guid><dc:creator>yithwe</dc:creator><description>&lt;p&gt;Hi Naeem Maroof&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I try to send 0x41, but it convert to ASCII code, it can&amp;#39;t work for our goal, we need to send some hex byte array it&amp;#39;s not match in ASCII table, like 0xFE, 0xFD, 0xFC, 0xFB, 0xFA , we need to get this byte and need decide which job need to do, so I need for tx send as real hex byte array.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;For uart0 we use (tx:p1.1, rx:p1.00), uart2 (tx:p0.20,rx:p0.22), overlay as below, for uart2 connect to external MCU(STM32), uart0 is for debug log print.but when I connect external MCU, uart0 print log is not work.what I need to do for two uart work same time?now I&amp;#39;m not change for uart0 baud rate, at the final I need to change the uart0 baud rate as 921600.&lt;/p&gt;
&lt;p&gt;I also use SPI for other application, but SPI tx and rx can send hex byte array, it&amp;#39;s not change to any type.why uart can&amp;#39;t?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uart0_default {
	group1 {
		psels = &amp;lt;NRF_PSEL(UART_TX, 1, 1)&amp;gt;, &amp;lt;NRF_PSEL(UART_RTS, 1, 5)&amp;gt;;
	};
	group2 {
        psels = &amp;lt;NRF_PSEL(UART_RX, 1, 00)&amp;gt;, &amp;lt;NRF_PSEL(UART_CTS, 1, 4)&amp;gt;;
    };
};

&amp;amp;uart0_sleep {
	group1 {
		psels = &amp;lt;NRF_PSEL(UART_TX, 1, 1)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RX, 1, 00)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RTS, 1, 05)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_CTS, 1, 04)&amp;gt;;
	};
};
&amp;amp;uart0 {
	status = &amp;quot;okay&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;uart0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;uart0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

&amp;amp;uart2_default {
	group1 {
		psels = &amp;lt;NRF_PSEL(UART_TX, 0, 20)&amp;gt;, &amp;lt;NRF_PSEL(UART_RTS, 0, 19)&amp;gt;;
	};
	group2 {
        psels = &amp;lt;NRF_PSEL(UART_RX, 0, 22)&amp;gt;, &amp;lt;NRF_PSEL(UART_CTS, 0, 21)&amp;gt;;
    };
};

&amp;amp;uart2_sleep {
	group1 {
		psels = &amp;lt;NRF_PSEL(UART_TX, 0, 20)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RX, 0, 22)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RTS, 0, 19)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_CTS, 0, 21)&amp;gt;;
	};
};
&amp;amp;uart2 {
	status = &amp;quot;okay&amp;quot;;
	current-speed = &amp;lt;921600&amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;uart2_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;uart2_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;Tina&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART connect external MCU(STM32) transmit and recieved data</title><link>https://devzone.nordicsemi.com/thread/485425?ContentTypeID=1</link><pubDate>Wed, 22 May 2024 12:52:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14e18152-8ecb-46b2-9845-49c534b1b379</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;In your original post, you were using the same pins for uart0.&lt;/p&gt;
&lt;p&gt;Please make sure that you are using correct pins for uart0 and uar2 (if you are using it) from the compiled DTS.&lt;/p&gt;
&lt;p&gt;I have used the PUTTY app for serial terminal.&lt;/p&gt;
&lt;p&gt;You can also use the built-in&amp;nbsp;NRF Serial Terminal from the VS Code.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1716382212079v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can you try sending 0x41, 0x42 hex for example to check A and B characters on the console, as the 0x00 and 0x01 are the NULL and SOH characters that would not be displayed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART connect external MCU(STM32) transmit and recieved data</title><link>https://devzone.nordicsemi.com/thread/485112?ContentTypeID=1</link><pubDate>Tue, 21 May 2024 12:25:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b8bc808-75a1-4039-9445-e2ad65d5d509</guid><dc:creator>yithwe</dc:creator><description>&lt;p&gt;Hi Naeem Maroof&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Thanks for your reply, it not work on my side with hex byte array as below picture.I have another problem for uart.I need two uart, one for connect external MCU(stm32), other is for internal debug log uart0 (tx pin:1.01, rx pin:1.00), but when I create connect external uart2 on overlay file is below , the internal debug uart log&amp;nbsp;&lt;span&gt;LOG_INF&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;is not work, how can I do for two uart work for same time?Isn&amp;#39;t need to cange COM port setting?where can I assign for COM port setting?&lt;/p&gt;
&lt;p&gt;Hex Byte Array&lt;pre class="ui-code" data-mode="c_cpp"&gt;static uint8_t tx_buf[] =   {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07};
static uint8_t rx_buf[RECEIVE_BUFF_SIZE] = {0};

if (!device_is_ready(uart)){
	printk(&amp;quot;UART device not ready\r\n&amp;quot;);
	return 1 ;
	}
	ret = uart_tx(uart, tx_buf, sizeof(tx_buf), SYS_FOREVER_MS);
if (ret) 
{
	return 1;
}
ret = uart_rx_enable(uart ,rx_buf,sizeof rx_buf,RECEIVE_TIMEOUT);
if (ret) 
{
	return 1;	
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Not work as below&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/0521_2D00_1.GIF" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;String send&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static uint8_t tx_buf[] =   {&amp;quot;0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07&amp;quot;};
static uint8_t rx_buf[RECEIVE_BUFF_SIZE] = {0};

	if (!device_is_ready(uart)){
		printk(&amp;quot;UART device not ready\r\n&amp;quot;);
		return 1 ;
	}
	ret = uart_tx(uart, tx_buf, sizeof(tx_buf), SYS_FOREVER_MS);
	if (ret) 
	{
		return 1;
	}
	ret = uart_rx_enable(uart ,rx_buf,sizeof rx_buf,RECEIVE_TIMEOUT);
	if (ret) 
	{
		return 1;	
	}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;work as below&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/0521_2D00_2.GIF" /&gt;&lt;/p&gt;
&lt;p&gt;Overlay add UART2 as below&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uart2 {
	status = &amp;quot;okay&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;uart2_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;uart2_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;

};
&amp;amp;pinctrl {
	uart2_default:uart2_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(UART_TX, 0, 20)&amp;gt;, &amp;lt;NRF_PSEL(UART_RTS, 0, 19)&amp;gt;;
		};
		group2 {
        	psels = &amp;lt;NRF_PSEL(UART_RX, 0, 22)&amp;gt;, &amp;lt;NRF_PSEL(UART_CTS, 0, 21)&amp;gt;;
    	};
	};

	uart2_sleep:uart2_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(UART_TX, 0, 20)&amp;gt;,
					&amp;lt;NRF_PSEL(UART_RX, 0, 22)&amp;gt;,
					&amp;lt;NRF_PSEL(UART_RTS, 0, 19)&amp;gt;,
					&amp;lt;NRF_PSEL(UART_CTS, 0, 21)&amp;gt;;
		};
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;when I change the terminal send hex byte array as below&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/0522_5F00_1.GIF" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/0522_5F00_2.GIF" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; Tina&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART connect external MCU(STM32) transmit and recieved data</title><link>https://devzone.nordicsemi.com/thread/485077?ContentTypeID=1</link><pubDate>Tue, 21 May 2024 11:33:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff80253c-fcca-42e3-a877-6c04b55a8e5d</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;I used the example you have shared in previous response.&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/lessons/lesson-4-serial-communication-uart/topic/exercise-1-5/"&gt;Example from DevAcademy&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I can use&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;static uint8_t tx_buf[] = {0x41, 0x42, 0x43};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and see ABC on the screen as 0x41 = 65 in decimal which is Ascii code of A, and similarly 0x42 and 0x43 are for B and C respectively.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1716291226342v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART connect external MCU(STM32) transmit and recieved data</title><link>https://devzone.nordicsemi.com/thread/485051?ContentTypeID=1</link><pubDate>Tue, 21 May 2024 11:01:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51e882ed-1065-4b88-92d9-bd2945a2cdfd</guid><dc:creator>yithwe</dc:creator><description>&lt;p&gt;hi Naeem Maroof&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; For tx_buf[ ] only can use string like below.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;static&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;uint8_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;tx_buf&lt;/span&gt;&lt;span&gt;[]&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;nbsp; {&lt;/span&gt;&lt;span&gt;&lt;span style="color:#ff0000;"&gt;&amp;quot;&lt;/span&gt;0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07&lt;span style="color:#ff0000;"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;};&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;it can&amp;#39;t use like below, if use as below, it can&amp;#39;t send.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;static uint8_t tx_buf[] = {0x41, 0x42, 0x43};&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;what setting does I missing?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Tina&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART connect external MCU(STM32) transmit and recieved data</title><link>https://devzone.nordicsemi.com/thread/485037?ContentTypeID=1</link><pubDate>Tue, 21 May 2024 10:31:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:431f3e37-f663-4376-9c41-90df892f9bfa</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;So you were able to first receive data at stm32 and then send it to the 7002dk? what things you changed that made it happen?&lt;/p&gt;
&lt;p&gt;Yes you can use hex data in the tx_buf like:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static uint8_t tx_buf[] = {0x41, 0x42, 0x43};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART connect external MCU(STM32) transmit and recieved data</title><link>https://devzone.nordicsemi.com/thread/485034?ContentTypeID=1</link><pubDate>Tue, 21 May 2024 10:19:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12e419b4-b3cd-434d-a07f-2c8e450b51ac</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;so the stum32 is not receiving but 7002dk is sending.&lt;/p&gt;
&lt;p&gt;did you check the connections and maybe confirm with the logic analyzer as well?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART connect external MCU(STM32) transmit and recieved data</title><link>https://devzone.nordicsemi.com/thread/483195?ContentTypeID=1</link><pubDate>Tue, 14 May 2024 09:07:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ed4113e-8d27-4fa2-9e80-39095455f65f</guid><dc:creator>yithwe</dc:creator><description>&lt;p&gt;Hi Naeem Maroof&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; It&amp;#39;s OK and respone from external MCU, but for&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/lessons/lesson-4-serial-communication-uart/topic/exercise-1-5/"&gt;example&lt;/a&gt;&amp;nbsp;code tx_buf only can send string?may I try to send hex byte?for this which API can I use?Thanks.&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Tina&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART connect external MCU(STM32) transmit and recieved data</title><link>https://devzone.nordicsemi.com/thread/482923?ContentTypeID=1</link><pubDate>Mon, 13 May 2024 02:12:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d940cdb6-3de1-46c8-b713-3d8d9b125cfa</guid><dc:creator>yithwe</dc:creator><description>&lt;p&gt;Hi Naeem Maroof&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I am connect stm32 mcu, but I sure the uart configurations are same, we connect the emulator to connect and see the result, nordic 7002-DK tx send message as below and stm32 send back rx message as below.stm32 can&amp;#39;t recieved any message and nordic 7002-DK can&amp;#39;t read back any message as below picture.&lt;/p&gt;
&lt;p&gt;isn&amp;#39;t I need to set&amp;nbsp;compatible in overlay for stm32 uart?&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;tx_buf&lt;/span&gt;&lt;span&gt;[]&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;nbsp; {&lt;/span&gt;&lt;span&gt;0x00&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;0x01&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;0x02&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;0x03&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;0x04&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;0x05&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;0x06&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;0x07&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1715566324061v1.png" /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Best Regards&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; Tina&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART connect external MCU(STM32) transmit and recieved data</title><link>https://devzone.nordicsemi.com/thread/482571?ContentTypeID=1</link><pubDate>Wed, 08 May 2024 15:04:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fbc0a6d4-2ddb-4d50-991c-1c8e19a690eb</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Also check that the other MCU is also using the same uart configurations.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART connect external MCU(STM32) transmit and recieved data</title><link>https://devzone.nordicsemi.com/thread/482570?ContentTypeID=1</link><pubDate>Wed, 08 May 2024 15:03:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3da076c8-0f95-4d83-91bd-30a6baed28b7</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hi Tina,&lt;/p&gt;
&lt;p&gt;I am not sure but could the issue be from the other MCU?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART connect external MCU(STM32) transmit and recieved data</title><link>https://devzone.nordicsemi.com/thread/481420?ContentTypeID=1</link><pubDate>Thu, 02 May 2024 02:21:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8730d2c1-5cb3-4b37-b46c-5ba91d7e8f86</guid><dc:creator>yithwe</dc:creator><description>&lt;p&gt;Hi Simonr&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I try to modified RTS pin to UART_RX, 0,22 instead, It&amp;#39;s doesn&amp;#39;t read back any information(below picture), please give any suggestion, Thanks.&lt;/p&gt;
&lt;p&gt;another problem is I need to add one more UART for debug log, isn&amp;#39;t can activate at the same time?&lt;/p&gt;
&lt;p&gt;UART0 is for debuging log (print log for debuging)&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;UART1 is for command and small data communicate&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1714618421956v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;I modify for device tree overlay as below, change uart0 and uart1, for code assign uart1 for device.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;i2c0 {	status = &amp;quot;disabled&amp;quot;;};
&amp;amp;spi0 {	status = &amp;quot;disabled&amp;quot;;};
&amp;amp;spi2 {	status = &amp;quot;disabled&amp;quot;;};
&amp;amp;i2c1 {	status = &amp;quot;disabled&amp;quot;;};
	

&amp;amp;spi4 {
    compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;spi4_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi4_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
	cs-gpios = &amp;lt;&amp;amp;gpio0 11 (GPIO_ACTIVE_LOW | (1 &amp;lt;&amp;lt; 8) | (1 &amp;lt;&amp;lt; 9))&amp;gt;;
	stm32f412vgh6: stm32f412vgh6@0 {
		compatible = &amp;quot;st,stm32f412vgh6&amp;quot;;
		reg = &amp;lt;0&amp;gt;;
		spi-max-frequency = &amp;lt;DT_FREQ_M(8)&amp;gt;; 
	};


    max-frequency = &amp;lt;DT_FREQ_M(8)&amp;gt;;
};

/* STEP 2.2 - Change the pin configuration */
&amp;amp;pinctrl {
	spi4_default: spi4_default {
		group1 {
				psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 8)&amp;gt;,
						&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 9)&amp;gt;,
						&amp;lt;NRF_PSEL(SPIM_MISO, 0, 10)&amp;gt;;
				nordic,drive-mode = &amp;lt;NRF_DRIVE_H0H1&amp;gt;;		
		};
	};

	spi4_sleep: spi4_sleep {
		group1 {
				psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 8)&amp;gt;,
						&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 9)&amp;gt;,
						&amp;lt;NRF_PSEL(SPIM_MISO, 0, 10)&amp;gt;;
				low-power-enable;
		};
	};
};

&amp;amp;uart0_default {
	group1 {
		psels = &amp;lt;NRF_PSEL(UART_TX, 1, 1)&amp;gt;, &amp;lt;NRF_PSEL(UART_RTS, 1, 5)&amp;gt;;
	};

    group2 {
        psels = &amp;lt;NRF_PSEL(UART_RX, 1, 0)&amp;gt;, &amp;lt;NRF_PSEL(UART_CTS, 1, 4)&amp;gt;;
    };
};

&amp;amp;uart0_sleep {
	group1 {
		psels = &amp;lt;NRF_PSEL(UART_TX, 1, 1)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RX, 1, 00)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RTS, 1, 05)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_CTS, 1, 04)&amp;gt;;
	};
};
&amp;amp;uart0 {
	status = &amp;quot;okay&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;uart0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;uart0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

&amp;amp;uart1_default {
	group1 {
		psels = &amp;lt;NRF_PSEL(UART_TX, 0, 20)&amp;gt;, &amp;lt;NRF_PSEL(UART_RTS, 0, 19)&amp;gt;;
	};
	group2 {
        psels = &amp;lt;NRF_PSEL(UART_RX, 0, 22)&amp;gt;, &amp;lt;NRF_PSEL(UART_CTS, 0, 21)&amp;gt;;
    };
};

&amp;amp;uart1_sleep {
	group1 {
		psels = &amp;lt;NRF_PSEL(UART_TX, 0, 20)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RX, 0, 22)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RTS, 0, 19)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_CTS, 0, 21)&amp;gt;;
	};
};
&amp;amp;uart1 {
	status = &amp;quot;okay&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;uart1_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;uart1_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define RECEIVE_BUFF_SIZE 8
const struct device *uart= DEVICE_DT_GET(DT_NODELABEL(uart1));
static uint8_t tx_buf[] =   {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07};
static uint8_t rx_buf[RECEIVE_BUFF_SIZE] = {0};
int main(void)
{
	int ret;
		if (!device_is_ready(uart)){
		printk(&amp;quot;UART device not ready\r\n&amp;quot;);
		return 1 ;
	}
	ret = uart_tx(uart, tx_buf, sizeof(tx_buf), SYS_FOREVER_MS);
	if (ret) {
		return 1;
	}
		ret = uart_rx_enable(uart ,rx_buf,sizeof rx_buf,RECEIVE_TIMEOUT);
	if (ret) {
		return 1;
	}
	while (1) {
		k_msleep(SLEEP_TIME_MS);
	}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Tina&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART connect external MCU(STM32) transmit and recieved data</title><link>https://devzone.nordicsemi.com/thread/481311?ContentTypeID=1</link><pubDate>Tue, 30 Apr 2024 13:48:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04004c34-02c7-4163-8193-c6632d1d5069</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Okay that makes a lot more sense. Looking at your overlay file the following stood out:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uart0_default {
	group1 {
		psels = &amp;lt;NRF_PSEL(UART_TX, 0, 20)&amp;gt;, &amp;lt;NRF_PSEL(UART_RTS, 0, 19)&amp;gt;;
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It seems here you&amp;#39;re using the TX and RTS pin for UART pins here, which should be TX and RX if I&amp;#39;m not mistaken, try changing the RTS pin to&amp;nbsp;&lt;strong&gt;UART_RX, 0, 22&lt;/strong&gt; instead, and see if that helps.&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: UART connect external MCU(STM32) transmit and recieved data</title><link>https://devzone.nordicsemi.com/thread/481221?ContentTypeID=1</link><pubDate>Tue, 30 Apr 2024 08:05:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f3a8775-7a1e-43e5-9161-4708a14593f8</guid><dc:creator>yithwe</dc:creator><description>&lt;p&gt;Hi Simonr&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;are you using an nRF7002 DK that is connected to the STM32?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, I am connect nRF7002 DK and STM32 for SPI,for SPI connect we need to&amp;nbsp;send and recieved the big data application, for this application SPI already work.NOW I want to add UART for STM32, for UART protocol, I want to send and recieve command and small data application.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;isn&amp;#39;t I need to add for device&amp;nbsp; tree ovelay &amp;quot;compatible&amp;quot; for STM32 UART(like SPI compatible)? for UART send and recieve will I need to add uart call back function for send and recieve ISR?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; Tina&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART connect external MCU(STM32) transmit and recieved data</title><link>https://devzone.nordicsemi.com/thread/481214?ContentTypeID=1</link><pubDate>Tue, 30 Apr 2024 07:55:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:936c6ad3-9197-4077-b2b0-c55b00e36e6b</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Tina&lt;/p&gt;
&lt;p&gt;I think the issue here is that you&amp;#39;re trying to communicate with the nRF7002 over UART, which is an interface the nRF7002 doesn&amp;#39;t have. The serial protocols the nRF7002 supports is SPI and QSPI. Or are you using an nRF7002 DK that is connected to the STM32? Please explain what your end goal is properly.&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></channel></rss>