<?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>MQX Software Solutions中的主题 Re: Simple MCP52259 SPI routine</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Simple-MCP52259-SPI-routine/m-p/152318#M508</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks PetrM,&lt;/P&gt;&lt;P&gt;I will try this.&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Aug 2011 05:39:25 GMT</pubDate>
    <dc:creator>MPotts</dc:creator>
    <dc:date>2011-08-03T05:39:25Z</dc:date>
    <item>
      <title>Simple MCP52259 SPI routine</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Simple-MCP52259-SPI-routine/m-p/152316#M506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to implement some simple SPI routines to read and write sectors from/to a MicroSD card on an MCP52259 design. I have code to do this based on a low-level spi_byte() function. However I cannot find any &lt;U&gt;simple&lt;/U&gt; MQX SPI examples as everything I look at seems to use more complex QSPI. This might create problems with the MicroSD card if it toggles CS on every byte (as I believe it does).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far I have rebuilt the MQX kernel for the MCP52259 ﻿with (polled) SPI enabled. I am assuming that this will initialize SPI (channel 0) by default ﻿when MQX starts up so I don't have to. I also changed the chip select to CS2 as this is what we are using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am now faced wth a couple of choices. If I can disable QSPI CS byte toggling and separately control CS2 I could try to use the QSPI functions. Alternatively I could perform straight SPI8 functions and bypass QSPI (if I knew how).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice/suggestions welcome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 06:23:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Simple-MCP52259-SPI-routine/m-p/152316#M506</guid>
      <dc:creator>MPotts</dc:creator>
      <dc:date>2011-07-21T06:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Simple MCP52259 SPI routine</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Simple-MCP52259-SPI-routine/m-p/152317#M507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MQX QSPI driver is written in a way that holds CS asserted between bytes. This default behavior is the same&amp;nbsp;for all xSPI module drivers.&lt;/P&gt;&lt;P&gt;So fwrite(buffer, 1, N, spi_fd) function writes N&amp;nbsp;consecutive bytes with CS held down.&amp;nbsp;To finally deassert CS, please call fflush (spi_fd).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;PetrM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 16:06:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Simple-MCP52259-SPI-routine/m-p/152317#M507</guid>
      <dc:creator>PetrM</dc:creator>
      <dc:date>2011-08-01T16:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Simple MCP52259 SPI routine</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Simple-MCP52259-SPI-routine/m-p/152318#M508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks PetrM,&lt;/P&gt;&lt;P&gt;I will try this.&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 05:39:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Simple-MCP52259-SPI-routine/m-p/152318#M508</guid>
      <dc:creator>MPotts</dc:creator>
      <dc:date>2011-08-03T05:39:25Z</dc:date>
    </item>
  </channel>
</rss>

