<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to extend the buffer size of A55 in iMX9352 when using heteronuclear communication with M33 core in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1764431#M216430</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I've written an LPSPI program for a W25Q128 using inter-core communication, but every time I try to read data from the external device, the M33 core hangs without providing feedback to the A55 core. After investigating, I discovered that the communication buffer between the A55 and M33 cores is too small. How can I modify the size of this buffer? What files in the A55 and M33 cores need to be changed? Are there any formulas related to buffer size modification?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;Board ：i.MX9352&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Software environment&amp;nbsp; :&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;A55: Linux Kernel version 6.1.22; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;M33: SDK_2_14_0_MCIMX93-EVK.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Tue, 28 Nov 2023 02:24:53 GMT</pubDate>
    <dc:creator>WJianQ_CN</dc:creator>
    <dc:date>2023-11-28T02:24:53Z</dc:date>
    <item>
      <title>How to extend the buffer size of A55 in iMX9352 when using heteronuclear communication with M33 core</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1764431#M216430</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I've written an LPSPI program for a W25Q128 using inter-core communication, but every time I try to read data from the external device, the M33 core hangs without providing feedback to the A55 core. After investigating, I discovered that the communication buffer between the A55 and M33 cores is too small. How can I modify the size of this buffer? What files in the A55 and M33 cores need to be changed? Are there any formulas related to buffer size modification?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;Board ：i.MX9352&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Software environment&amp;nbsp; :&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;A55: Linux Kernel version 6.1.22; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;M33: SDK_2_14_0_MCIMX93-EVK.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 28 Nov 2023 02:24:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1764431#M216430</guid>
      <dc:creator>WJianQ_CN</dc:creator>
      <dc:date>2023-11-28T02:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to extend the buffer size of A55 in iMX9352 when using heteronuclear communication with M33</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1769415#M216912</link>
      <description>&lt;P&gt;The memory regions are defined in dts:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;cm33: imx93-cm33 {
		compatible = "fsl,imx93-cm33";
		mbox-names = "tx", "rx", "rxdb";
		mboxes = &amp;lt;&amp;amp;mu1 0 1
			  &amp;amp;mu1 1 1
			  &amp;amp;mu1 3 1&amp;gt;;
		memory-region = &amp;lt;&amp;amp;vdevbuffer&amp;gt;, &amp;lt;&amp;amp;vdev0vring0&amp;gt;, &amp;lt;&amp;amp;vdev0vring1&amp;gt;,
				&amp;lt;&amp;amp;vdev1vring0&amp;gt;, &amp;lt;&amp;amp;vdev1vring1&amp;gt;, &amp;lt;&amp;amp;rsc_table&amp;gt;;
		fsl,startup-delay-ms = &amp;lt;500&amp;gt;;
	};&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 06 Dec 2023 02:59:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1769415#M216912</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2023-12-06T02:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to extend the buffer size of A55 in iMX9352 when using heteronuclear communication with M33</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1789941#M218795</link>
      <description>Thank you for your reply, I may not have expressed myself particularly well. What I mean is how to modify the amount of data received in a single pass in rpmsg communication, how to change it from 512 bytes to 1024 bytes.</description>
      <pubDate>Wed, 17 Jan 2024 04:06:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1789941#M218795</guid>
      <dc:creator>WJianQ_CN</dc:creator>
      <dc:date>2024-01-17T04:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to extend the buffer size of A55 in iMX9352 when using heteronuclear communication with M33</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1790763#M218854</link>
      <description>&lt;P&gt;This is my idea only about increasing buffer size, not number, not test it&lt;/P&gt;
&lt;P&gt;A side:&lt;/P&gt;
&lt;P&gt;1. Modify&amp;nbsp;drivers/rpmsg/virtio_rpmsg_bus.c&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;#&lt;/SPAN&gt;&lt;SPAN&gt;define&lt;/SPAN&gt; &lt;SPAN&gt;MAX_RPMSG_BUF_SIZE&lt;/SPAN&gt;&lt;SPAN&gt; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;512&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;2. As you double the buffer size, you need double the shared memory vring in dts.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;M side:&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;1.Modify buffer payload size:&lt;/DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="markup"&gt;//! &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/4560"&gt;@def&lt;/a&gt; RL_BUFFER_PAYLOAD_SIZE
//!
//! Size of the buffer payload, it must be equal to (240, 496, 1008, ...)
//! [2^n - 16]. Ensure the same value is defined on both sides of rpmsg
//! communication. The default value is 496U.
#define RL_BUFFER_PAYLOAD_SIZE (496U)&lt;/LI-CODE&gt;
&lt;P&gt;2. Modify vring size in SDK&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;/* contains pool of descriptors and two circular buffers */
#ifndef VRING_SIZE
#define VRING_SIZE (0x8000UL)&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 Jan 2024 05:40:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1790763#M218854</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2024-01-18T05:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to extend the buffer size of A55 in iMX9352 when using heteronuclear communication with M33</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1791712#M218916</link>
      <description>Thanks for your answer, but I would like to know what are the design rules for these parameters, for example if I want to change the buffer load size to 1024, then how do I change these relevant data?</description>
      <pubDate>Fri, 19 Jan 2024 08:13:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1791712#M218916</guid>
      <dc:creator>WJianQ_CN</dc:creator>
      <dc:date>2024-01-19T08:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to extend the buffer size of A55 in iMX9352 when using heteronuclear communication with M33</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1799519#M219497</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/224941"&gt;@WJianQ_CN&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for this late reply.&lt;/P&gt;
&lt;P&gt;I have tested the modification with demo sdk on EVK.&lt;/P&gt;
&lt;P&gt;Here are steps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Modify payload size to 1008, the head size is 16bytes. So the size of each buffer is 1024bytes&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;//! @def RL_BUFFER_PAYLOAD_SIZE
//!
//! Size of the buffer payload, it must be equal to (240, 496, 1008, ...)
//! [2^n - 16]. Ensure the same value is defined on both sides of rpmsg
//! communication. The default value is 496U.
#define RL_BUFFER_PAYLOAD_SIZE (1008)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2.Modify rpmsg buf size in kernel and buiffer pool in dts&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;#define MAX_RPMSG_BUF_SIZE	(1024)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Zhiming_Liu_0-1706766339655.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/261234iBE5B27DBFABA2D48/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Zhiming_Liu_0-1706766339655.png" alt="Zhiming_Liu_0-1706766339655.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. I am using imx_rpmsg_tty.ko to test, here i use larger buffer in driver:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;#define MSG		"hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world! hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world! hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!"
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4.Modify the SDK code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;/* Globals */
static char app_buf[1024]; /* Each RPMSG buffer can carry less than 512 payload */&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;5. Terminal&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Get Message From Master Side : "hello world!" [len : 12]
Get Message From Master Side : "hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!" [len : 168]
ASSERT ERROR " len &amp;lt; sizeof(app_buf) ": file 

RPMSG String Echo FreeRTOS RTOS API Demo...

Nameservice sent, ready for incoming messages...
Get Message From Master Side : "hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world! hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world! hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!" [len : 674]
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The buffer size is not limited to 512 bytes now.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 05:45:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1799519#M219497</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2024-02-01T05:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to extend the buffer size of A55 in iMX9352 when using heteronuclear communication with M33</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1801350#M219609</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;reg = &amp;lt;0 0xa8020000 0 0x100000&amp;gt;;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;-&amp;gt; reg = &amp;lt;0 0xa8020000 0 0x200000&amp;gt;;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Why should 0x100000 be changed to 0x200000 and how is it calculated?&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 04 Feb 2024 07:27:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1801350#M219609</guid>
      <dc:creator>WJianQ_CN</dc:creator>
      <dc:date>2024-02-04T07:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to extend the buffer size of A55 in iMX9352 when using heteronuclear communication with M33</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1816236#M220457</link>
      <description>Do you have a reply?</description>
      <pubDate>Tue, 27 Feb 2024 06:55:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1816236#M220457</guid>
      <dc:creator>WJianQ_CN</dc:creator>
      <dc:date>2024-02-27T06:55:23Z</dc:date>
    </item>
    <item>
      <title>回复： How to extend the buffer size of A55 in iMX9352 when using heteronuclear communication with M33</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1851367#M222807</link>
      <description>&lt;P&gt;It is understandable to change the communication cache of A and M cores from 512bytes to 1024bytes. I want to know why 0x100000 and 0x200000 represent 512bytes and 1024bytes respectively. How is the buffer length calculated (0x100000 and 0x200000), in the ST platform, sharememory size is vdev0vring0+vdev0vring1+vdev0buffer&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2024 06:57:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1851367#M222807</guid>
      <dc:creator>ChumingYang</dc:creator>
      <dc:date>2024-04-22T06:57:16Z</dc:date>
    </item>
    <item>
      <title>回复： How to extend the buffer size of A55 in iMX9352 when using heteronuclear communication with M33</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1851379#M222810</link>
      <description>&lt;P&gt;vdevrings are used to record buffer index and flags, these two ring are &lt;STRONG&gt;struct vring_avail &lt;/STRONG&gt;and&lt;STRONG&gt;&amp;nbsp;vring_used&lt;/STRONG&gt;&amp;nbsp;in Linux kernel, they are not true buffer pool. They are used to sync buffer index and status between A and M core. The real buffer pool to store the message you sent is vdevbuffer. So increasing buffer pool to avoid the problem of not having enough memory after using 1024Kbytes.&amp;nbsp;&lt;SPAN&gt;0x200000(2MB) just double of&amp;nbsp;0x100000(1MB)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2024 07:09:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1851379#M222810</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2024-04-22T07:09:39Z</dc:date>
    </item>
    <item>
      <title>回复： How to extend the buffer size of A55 in iMX9352 when using heteronuclear communication with M33</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1982383#M230155</link>
      <description>&lt;P&gt;They also don't have a reasonable explanation for how to convert a 512-byte buffer into a device tree memory size of 0x100000; simply explaining it as a multiple relationship is unclear.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2024 02:47:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/1982383#M230155</guid>
      <dc:creator>WJianQ_CN</dc:creator>
      <dc:date>2024-10-26T02:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to extend the buffer size of A55 in iMX9352 when using heteronuclear communication with M33</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/2080037#M236283</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you increase the size of RPMSG by changing the reg value (&lt;SPAN&gt;0xa8020000&lt;/SPAN&gt;) from&amp;nbsp;&lt;SPAN&gt;0x100000 to&amp;nbsp;0x200000?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Apr 2025 14:11:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-extend-the-buffer-size-of-A55-in-iMX9352-when-using/m-p/2080037#M236283</guid>
      <dc:creator>rk4</dc:creator>
      <dc:date>2025-04-14T14:11:50Z</dc:date>
    </item>
  </channel>
</rss>

