<?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>Model-Based Design Toolbox (MBDT)のトピックRe: UART_Receive Block compilation error</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/UART-Receive-Block-compilation-error/m-p/964611#M3744</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;Thank you for your reply. See the attachment for the model. Only when Uart_IdxX is all set to 0 can it be compiled and passed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking forward to your reply. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Oct 2019 10:56:05 GMT</pubDate>
    <dc:creator>lujia</dc:creator>
    <dc:date>2019-10-29T10:56:05Z</dc:date>
    <item>
      <title>UART_Receive Block compilation error</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/UART-Receive-Block-compilation-error/m-p/964608#M3741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;BR /&gt;I encountered some problems when using [model-based Design Toolbox for MPC57xx Automotive Version 3.0.0/Communication Blocks/UART Blocks/ UART_Receive], as shown in the figure.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Set the Data size to 8; After receiving the data, extract the data Uart_DataRcv[2] for subsequent processing.&lt;BR /&gt;However, the error in compile time indicates that the received data index cannot be greater than 0, that is, it is not an array. Is there any BUG in this module?&lt;BR /&gt;It is hoped that modules supporting LIN protocol will be provided later.&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/93591iE20AD2D5176F91E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2019 00:59:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/UART-Receive-Block-compilation-error/m-p/964608#M3741</guid>
      <dc:creator>lujia</dc:creator>
      <dc:date>2019-10-25T00:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: UART_Receive Block compilation error</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/UART-Receive-Block-compilation-error/m-p/964609#M3742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/lujia@dfmc.com.cn"&gt;lujia@dfmc.com.cn&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you share the model with us? It seems that the switch block is the one that is generating the errors - that is a standard Simulink block, so I'd like to see all the settings from your model to be sure where the problem lies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Razvan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2019 09:07:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/UART-Receive-Block-compilation-error/m-p/964609#M3742</guid>
      <dc:creator>constantinrazva</dc:creator>
      <dc:date>2019-10-28T09:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: UART_Receive Block compilation error</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/UART-Receive-Block-compilation-error/m-p/964610#M3743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/lujia@dfmc.com.cn"&gt;lujia@dfmc.com.cn&lt;/A&gt;‌ as for the LIN support, currently it is supported only on S32K1xx toolbox - I'm not sure it will be added for MPC57xx toolbox in the future - so the answer is most likely not, but it isn't 100% sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Razvan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2019 09:11:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/UART-Receive-Block-compilation-error/m-p/964610#M3743</guid>
      <dc:creator>constantinrazva</dc:creator>
      <dc:date>2019-10-28T09:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: UART_Receive Block compilation error</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/UART-Receive-Block-compilation-error/m-p/964611#M3744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;Thank you for your reply. See the attachment for the model. Only when Uart_IdxX is all set to 0 can it be compiled and passed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking forward to your reply. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Oct 2019 10:56:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/UART-Receive-Block-compilation-error/m-p/964611#M3744</guid>
      <dc:creator>lujia</dc:creator>
      <dc:date>2019-10-29T10:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: UART_Receive Block compilation error</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/UART-Receive-Block-compilation-error/m-p/964612#M3745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/lujia@dfmc.com.cn"&gt;lujia@dfmc.com.cn&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So let's talk about the switch block:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/93830i60582199B8A77A1B/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example you can see we have 1 selector (top Constant block - value 2) and 2 input signals (values 4 and 5). If we take a look at the mask of the switch block, we can see the Data port order is set to 1-based contiguous. This means the selector will have values between 1 and the number of data ports (in our case, 2). This works in the following way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6;" width="100%"&gt;&lt;THEAD&gt;&lt;TR style="background-color: #efefef;"&gt;&lt;TH&gt;Selector input&lt;/TH&gt;&lt;TH&gt;Switch block output&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we would have have 0-based contiguous selected, the values would have been between 0 and 1 for the selector.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your example, you only have 1 data port, and the order is set to 0-based contiguous. This means the selector can have values between 0 (starting position for 0-based indexing) and 0 (number of data ports - 1, that is 1-1=0). So this is why Simulink issues that error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know what you are trying to achieve with these switches and I can help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another thing I want to mention - I'm not sure where you took the UART configuration block, but you have to delete it and put it in the model again, because it is not linked with the one from within our library. I'm not sure what happened there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you're still facing issues with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Razvan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Oct 2019 13:27:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/UART-Receive-Block-compilation-error/m-p/964612#M3745</guid>
      <dc:creator>constantinrazva</dc:creator>
      <dc:date>2019-10-29T13:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: UART_Receive Block compilation error</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/UART-Receive-Block-compilation-error/m-p/964613#M3746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Hi:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for reply!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want to extract data through [multi-port Switch Block] after [Receive_Block] receives LIN data and implement the logic of LIN protocol.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As described in the help document, if [size] is set to 8, the output [data] should be an array of size 8.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper" image-alt="NXP01.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/94191i505EC097EFE5DD04/image-size/large?v=v2&amp;amp;px=999" role="button" title="NXP01.png" alt="NXP01.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In other words, the output [data] is Uart_DataRcv[8].&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="NXP02.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/94235iC9AD019BE3E2CBE6/image-size/large?v=v2&amp;amp;px=999" role="button" title="NXP02.png" alt="NXP02.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After receiving Uart_DataRcv[8], [multi-port Switch Block] was used to extract the array to realize the logic of LIN protocol.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="NXP03.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/94285iF532DF52ED25A87D/image-size/large?v=v2&amp;amp;px=999" role="button" title="NXP03.png" alt="NXP03.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The problem is that even if I set [size] to 8, the output from [Receive_Block] will not be an array of size 8, but a UINT8. This will result in a failure to extract through [multi-port Switch Block] and a compilation error. So I'm guessing there's a BUG in [Receive_Block].&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2019 01:13:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/UART-Receive-Block-compilation-error/m-p/964613#M3746</guid>
      <dc:creator>lujia</dc:creator>
      <dc:date>2019-10-30T01:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: UART_Receive Block compilation error</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/UART-Receive-Block-compilation-error/m-p/964614#M3747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/lujia@dfmc.com.cn"&gt;lujia@dfmc.com.cn&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the late reply, I must have missed this. I understand what you are saying now. Yes, this is an issue, but I will take it up with mathworks as it seems that Index vector (Simulink standard block) can not deal with&amp;nbsp;DYNAMICALLY_SIZED data. Our UART receive block has the output set like this&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;ssSetOutputPortWidth(S, 0, DYNAMICALLY_SIZED);&amp;nbsp;&lt;BR /&gt; ssSetOutputPortDataType(S, 0, SS_UINT8);&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As it is set to be an dynamic array of UINT8 type, I guess some sanity checks fail on mathworks' side. We need to have this block have a dynamically sized output, as we do not know a priori what size the user needs the receive buffer to be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will get back to you once we figure out with mathworks how we/they can fix this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Razvan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Nov 2019 09:45:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/UART-Receive-Block-compilation-error/m-p/964614#M3747</guid>
      <dc:creator>constantinrazva</dc:creator>
      <dc:date>2019-11-12T09:45:43Z</dc:date>
    </item>
  </channel>
</rss>

