<?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: Set Peripheral Chip Select using custom Pin Labels in MCUXpresso Config Tools</title>
    <link>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Set-Peripheral-Chip-Select-using-custom-Pin-Labels/m-p/969334#M816</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alice,&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;I am using the MK64FN1M.&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;Attached is a project demonstrating my question. I have configured the pins and SPI peripheral as shown in the original post.&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;In the .mex file, you can see that I have chosen PCSO/SS &amp;gt;&amp;gt; [E12] CS_LED as the Peripheral Chip Select.&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;In the generated peripherals.c, it generates a dspi_master_config_t with the .whichPcs variable set to kDSPI_Pcs0. This is all correct.&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;However, I can not find a clean and clear way to change the .whichPcs during program execution using the custom labels I have provided to the pins, unless I manually go back into Config Tools to see the mapping between the pin labels, and the DSPI&amp;nbsp;PCS enumeration.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Oct 2019 18:47:53 GMT</pubDate>
    <dc:creator>aberger</dc:creator>
    <dc:date>2019-10-31T18:47:53Z</dc:date>
    <item>
      <title>Set Peripheral Chip Select using custom Pin Labels</title>
      <link>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Set-Peripheral-Chip-Select-using-custom-Pin-Labels/m-p/969332#M814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In MCUXpresso's Config Tools,&amp;nbsp;when&amp;nbsp;configuring a DSPI module to use a particular pin for the Peripheral Chip Select, the drop down menu displays the custom Pin Labels I have defined in the Pin tool (see below):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/93860i0CFB82FCE51DEF78/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In the generated code, I am unable to find any sort of mapping between my custom Pin Labels and the&amp;nbsp;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;enum _dspi_which_pcs_config&lt;/SPAN&gt; which is used to select the Chip Select&amp;nbsp;when passing a&amp;nbsp;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;dspi_master_config_t&lt;/SPAN&gt; along to &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;DSPI_MasterInit()&lt;/SPAN&gt;.&amp;nbsp; However, the generated initialization routine properly uses&amp;nbsp;&lt;EM&gt;kDSPI_Pcs0&amp;nbsp;&lt;/EM&gt;as the &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;dspi_which_pcs_t&lt;/SPAN&gt;, since that is somehow linked to my CS_LED pin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this mapping exist explicitly somewhere (for example, through some #defines), so that&amp;nbsp;the PCS can be changed during execution&amp;nbsp;by using&amp;nbsp;my custom Pin Labels? I could obviously manually create this by writing something like:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;#define PCS_LED kDSPI_Pcs0&lt;/P&gt;&lt;P&gt;#define PCS_7SEG kDSPI_Pcs1&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;but it seems that Config Tools is already creating this mapping somewhere, I'm just unable to find it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Oct 2019 00:41:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Set-Peripheral-Chip-Select-using-custom-Pin-Labels/m-p/969332#M814</guid>
      <dc:creator>aberger</dc:creator>
      <dc:date>2019-10-26T00:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set Peripheral Chip Select using custom Pin Labels</title>
      <link>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Set-Peripheral-Chip-Select-using-custom-Pin-Labels/m-p/969333#M815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp;&lt;SPAN style="color: #646464; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A _jive_internal="true" class="" data-content-finding="Community" data-userid="308261" data-username="aberger" href="https://community.nxp.com/people/aberger" style="color: #3d9ce7; background-color: #ffffff; border: 0px; font-weight: 600; text-decoration: none; font-size: 11.9994px;"&gt;Andy Berger&lt;/A&gt;&lt;SPAN style="color: #646464; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #ffffff;"&gt;&lt;SPAN&gt;Could you tell me which chip do you used, and share the whole project, thanks.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #ffffff;"&gt;&lt;SPAN&gt;BR&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #ffffff;"&gt;&lt;SPAN&gt;Alice&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2019 15:22:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Set-Peripheral-Chip-Select-using-custom-Pin-Labels/m-p/969333#M815</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2019-10-28T15:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set Peripheral Chip Select using custom Pin Labels</title>
      <link>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Set-Peripheral-Chip-Select-using-custom-Pin-Labels/m-p/969334#M816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alice,&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;I am using the MK64FN1M.&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;Attached is a project demonstrating my question. I have configured the pins and SPI peripheral as shown in the original post.&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;In the .mex file, you can see that I have chosen PCSO/SS &amp;gt;&amp;gt; [E12] CS_LED as the Peripheral Chip Select.&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;In the generated peripherals.c, it generates a dspi_master_config_t with the .whichPcs variable set to kDSPI_Pcs0. This is all correct.&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;However, I can not find a clean and clear way to change the .whichPcs during program execution using the custom labels I have provided to the pins, unless I manually go back into Config Tools to see the mapping between the pin labels, and the DSPI&amp;nbsp;PCS enumeration.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2019 18:47:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Set-Peripheral-Chip-Select-using-custom-Pin-Labels/m-p/969334#M816</guid>
      <dc:creator>aberger</dc:creator>
      <dc:date>2019-10-31T18:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set Peripheral Chip Select using custom Pin Labels</title>
      <link>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Set-Peripheral-Chip-Select-using-custom-Pin-Labels/m-p/969335#M817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Andy,&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;The definition of&amp;nbsp;kDSPI_Pcs0 is in the file of "fsl_dspi.h":&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/92188iC273242C0A16163A/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;and the "Label" is not used to here. About the description about Label you can have a look at this thread:&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/516036"&gt;Config Tools Pin Label and Identifier&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2019 06:42:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Set-Peripheral-Chip-Select-using-custom-Pin-Labels/m-p/969335#M817</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2019-11-05T06:42:09Z</dc:date>
    </item>
  </channel>
</rss>

