<?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>Processor Expert SoftwareのトピックRe: KL25 freedom board SPI SS acting as GPIO</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/KL25-freedom-board-SPI-SS-acting-as-GPIO/m-p/292885#M2124</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi! Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp; I am able to manage it.&amp;nbsp; I only have one issue regarding SPI communication flow.&amp;nbsp; Because SS pin is not managed by SPI component anymore, I don't have the mechanism to judge whether the data transmission has been completed.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the method, Get_BlockSentStatus to get the end of the transmision and pull up my GPIO after I get success from the method.&amp;nbsp; From the Logic Analyzer, I discovered the SS line is pulled up even before the data been sent to the slave.&amp;nbsp; As a result, I could only use a loop to wait for a certain period of time to wait until the process is completed.&amp;nbsp; Do you have any idea about the correct mechanism to manage the SS pin's level if we use GPIO to act as an SS pin?&amp;nbsp; Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vincent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 23 Nov 2013 08:28:17 GMT</pubDate>
    <dc:creator>vincentchou</dc:creator>
    <dc:date>2013-11-23T08:28:17Z</dc:date>
    <item>
      <title>KL25 freedom board SPI SS acting as GPIO</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/KL25-freedom-board-SPI-SS-acting-as-GPIO/m-p/292881#M2120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&amp;nbsp; Support,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because I need to use SPI as a master to talk to a few devices on the SPI bus, is there a way I can make SS runs like a GPIO and manually drive the bus to high or low?&amp;nbsp; I am using Kinetis KL25 freedom board.&amp;nbsp; Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vincent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2013 23:44:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/KL25-freedom-board-SPI-SS-acting-as-GPIO/m-p/292881#M2120</guid>
      <dc:creator>vincentchou</dc:creator>
      <dc:date>2013-11-21T23:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: KL25 freedom board SPI SS acting as GPIO</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/KL25-freedom-board-SPI-SS-acting-as-GPIO/m-p/292882#M2121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Vincent:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to control chip select signal (SS) via GPIO instead of automatically by the SPI module, first set your chip select list to 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="ChipSelect.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/41848i469689AAB10C7632/image-size/large?v=v2&amp;amp;px=999" role="button" title="ChipSelect.png" alt="ChipSelect.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;:smileyalert:EDITED: MODFEN has no meaning when no pin is selected as SS (Chip Select List = 0).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you can configure the pin for GPIO functionality, by adding a BitIO_LDD component, or setting the pin yourself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is useful!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Nov 2013 07:47:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/KL25-freedom-board-SPI-SS-acting-as-GPIO/m-p/292882#M2121</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2013-11-22T07:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: KL25 freedom board SPI SS acting as GPIO</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/KL25-freedom-board-SPI-SS-acting-as-GPIO/m-p/292883#M2122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi! Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the way you suggest except &lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-size: 12px; background-color: #f6f6f6; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;SPI0_C2 &amp;amp;= ~SPI_C2_MODFEN_MASK;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a necessary command I should add inside my program?&amp;nbsp; Will there be any potential problem if I did not add that?&amp;nbsp; If I want to add that, should I add that in my main routine inside ProcessExpert.c right after Low Level Init program?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vincent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Nov 2013 12:11:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/KL25-freedom-board-SPI-SS-acting-as-GPIO/m-p/292883#M2122</guid>
      <dc:creator>vincentchou</dc:creator>
      <dc:date>2013-11-22T12:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: KL25 freedom board SPI SS acting as GPIO</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/KL25-freedom-board-SPI-SS-acting-as-GPIO/m-p/292884#M2123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Vincent:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By checking again, I think I misunderstood the reference ranual, sorry about that. It indicates that MODFEN should be 0 in order to release the SS pin as GPIO, but I guess that this is only when you configure a specific pin to perform the SS function, which is not the case here, because you do not define any pin to be the SS input/output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, in conclusion that code should not be neccessary. Did you already try and you were able to control the pin?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Nov 2013 13:55:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/KL25-freedom-board-SPI-SS-acting-as-GPIO/m-p/292884#M2123</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2013-11-22T13:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: KL25 freedom board SPI SS acting as GPIO</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/KL25-freedom-board-SPI-SS-acting-as-GPIO/m-p/292885#M2124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi! Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp; I am able to manage it.&amp;nbsp; I only have one issue regarding SPI communication flow.&amp;nbsp; Because SS pin is not managed by SPI component anymore, I don't have the mechanism to judge whether the data transmission has been completed.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the method, Get_BlockSentStatus to get the end of the transmision and pull up my GPIO after I get success from the method.&amp;nbsp; From the Logic Analyzer, I discovered the SS line is pulled up even before the data been sent to the slave.&amp;nbsp; As a result, I could only use a loop to wait for a certain period of time to wait until the process is completed.&amp;nbsp; Do you have any idea about the correct mechanism to manage the SS pin's level if we use GPIO to act as an SS pin?&amp;nbsp; Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vincent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Nov 2013 08:28:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/KL25-freedom-board-SPI-SS-acting-as-GPIO/m-p/292885#M2124</guid>
      <dc:creator>vincentchou</dc:creator>
      <dc:date>2013-11-23T08:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: KL25 freedom board SPI SS acting as GPIO</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/KL25-freedom-board-SPI-SS-acting-as-GPIO/m-p/292886#M2125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vincent:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a thread with the same problem with the GetBlockSentStatus method: This is for the K20 MCU, but might give you an idea of how to modify your code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/message/331812"&gt;Re: Is anyone really using PE Generated SPI driver with MQXLite? How?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Nov 2013 15:37:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/KL25-freedom-board-SPI-SS-acting-as-GPIO/m-p/292886#M2125</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2013-11-23T15:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: KL25 freedom board SPI SS acting as GPIO</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/KL25-freedom-board-SPI-SS-acting-as-GPIO/m-p/292887#M2126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&amp;nbsp; Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp; I have already been able to read and write SPI slave through setting SS pin as a GPIO.&amp;nbsp; Thanks for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vincent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2013 02:24:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/KL25-freedom-board-SPI-SS-acting-as-GPIO/m-p/292887#M2126</guid>
      <dc:creator>vincentchou</dc:creator>
      <dc:date>2013-12-13T02:24:29Z</dc:date>
    </item>
  </channel>
</rss>

