<?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 Re: Send 16-Bit Control signal through SPI in Model-Based Design Toolbox (MBDT)</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Send-16-Bit-Control-signal-through-SPI/m-p/857358#M2776</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/fernando.barrios@uwaterloo.ca"&gt;fernando.barrios@uwaterloo.ca&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The link to the 2nd picture is broken so I can not see it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your model I saw that you set the baud rate to 80MHz - that is not a valid value; the SPI will go up to 8MHz. You can take this example and see if it works (note that I change 1 pin from your configuration for easier testing; you can change it back to what you previously had).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the SPI running at 1MHz - you can edit the settings in the SPI Config block and make it run at 8MHz also.&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/77492iFAD83606A6753306/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;Kind regards,&lt;/P&gt;&lt;P&gt;Razvan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Feb 2019 09:23:49 GMT</pubDate>
    <dc:creator>constantinrazva</dc:creator>
    <dc:date>2019-02-22T09:23:49Z</dc:date>
    <item>
      <title>Send 16-Bit Control signal through SPI</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Send-16-Bit-Control-signal-through-SPI/m-p/857355#M2773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For our application a digital to analog converter is being used that requires a 16-Bit control signal, however the toolbox is only allowing me to send an 8-bit signal. Is there anyway around this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help,&lt;/P&gt;&lt;P&gt;Fernando&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2019 01:41:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Send-16-Bit-Control-signal-through-SPI/m-p/857355#M2773</guid>
      <dc:creator>fernando_barrio</dc:creator>
      <dc:date>2019-01-08T01:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Send 16-Bit Control signal through SPI</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Send-16-Bit-Control-signal-through-SPI/m-p/857356#M2774</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/fernando.barrios@uwaterloo.ca"&gt;fernando.barrios@uwaterloo.ca&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, you can send 16bit messages through SPI - select the Frame size to be 16 bits and use a data store memory with dimension minimum 2 uint8s.&amp;nbsp;&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/71956i3C8770893223D2EA/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&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/72081i7448C54CA3A9FBDB/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;The transfer block sets the transfer width according to its input.&lt;/P&gt;&lt;P&gt;Note: the width of the data memory store should be multiple of 2 (because you've set 2bytes as the frame size).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached a simple example here. Hope this helps.&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, 08 Jan 2019 08:08:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Send-16-Bit-Control-signal-through-SPI/m-p/857356#M2774</guid>
      <dc:creator>constantinrazva</dc:creator>
      <dc:date>2019-01-08T08:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Send 16-Bit Control signal through SPI</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Send-16-Bit-Control-signal-through-SPI/m-p/857357#M2775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/constantinrazvan.chivu"&gt;constantinrazvan.chivu&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate your model and help, unfortunately I could not get it working still only using C code. The following is the SPI timing specs;&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/77086iD7251A8E707E4C91/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;And in C the configuration that worked was as follows (it was tested with both 8 and 16 bits);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG height="208" src="https://files.slack.com/files-pri/T593D9URM-FGEQGN18E/image.png" width="690" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Simulink I have it set up as follows with the memory block using uint8(2);&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/77124iD37A2140EAA26D44/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;P&gt;I believe these should be correct, I have tried various different configurations with the test file to get this to work on simulink with no luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you have any other suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Fernando&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2019 19:05:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Send-16-Bit-Control-signal-through-SPI/m-p/857357#M2775</guid>
      <dc:creator>fernando_barrio</dc:creator>
      <dc:date>2019-02-21T19:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: Send 16-Bit Control signal through SPI</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Send-16-Bit-Control-signal-through-SPI/m-p/857358#M2776</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/fernando.barrios@uwaterloo.ca"&gt;fernando.barrios@uwaterloo.ca&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The link to the 2nd picture is broken so I can not see it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your model I saw that you set the baud rate to 80MHz - that is not a valid value; the SPI will go up to 8MHz. You can take this example and see if it works (note that I change 1 pin from your configuration for easier testing; you can change it back to what you previously had).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the SPI running at 1MHz - you can edit the settings in the SPI Config block and make it run at 8MHz also.&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/77492iFAD83606A6753306/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;Kind regards,&lt;/P&gt;&lt;P&gt;Razvan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2019 09:23:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Send-16-Bit-Control-signal-through-SPI/m-p/857358#M2776</guid>
      <dc:creator>constantinrazva</dc:creator>
      <dc:date>2019-02-22T09:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Send 16-Bit Control signal through SPI</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Send-16-Bit-Control-signal-through-SPI/m-p/857359#M2777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works great, thank you for all your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a good weekend,&lt;/P&gt;&lt;P&gt;Fernando&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2019 18:51:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Send-16-Bit-Control-signal-through-SPI/m-p/857359#M2777</guid>
      <dc:creator>fernando_barrio</dc:creator>
      <dc:date>2019-02-22T18:51:45Z</dc:date>
    </item>
  </channel>
</rss>

