<?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: QSPI Clock inversion in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/QSPI-Clock-inversion/m-p/199912#M4367</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I am also a little confused why the MQX3.2 QSPI example sets / clears the chip select as this is done automatically. Its actually MUCH slower to manually set / clear the CS.&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jul 2009 08:01:04 GMT</pubDate>
    <dc:creator>CarlFST60L</dc:creator>
    <dc:date>2009-07-17T08:01:04Z</dc:date>
    <item>
      <title>QSPI Clock inversion</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/QSPI-Clock-inversion/m-p/199909#M4364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Has anyone inverted the QSPI clock in software before? My application calls for it and I cannot find an options in the QSPI.h.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 14:32:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/QSPI-Clock-inversion/m-p/199909#M4364</guid>
      <dc:creator>CarlFST60L</dc:creator>
      <dc:date>2009-07-16T14:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: QSPI Clock inversion</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/QSPI-Clock-inversion/m-p/199910#M4365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try setting the transfer mode:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*&lt;BR /&gt;** QSPI Transfer modes&lt;BR /&gt;*/&lt;BR /&gt;#define QSPI_TRANSFER_MODE_1&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp; // Active low; QSPI_CLK transitions middle of bit timing&lt;BR /&gt;#define QSPI_TRANSFER_MODE_2&amp;nbsp;2&amp;nbsp; // Active high; QSPI_CLK transitions middle of bit timing&lt;BR /&gt;#define QSPI_TRANSFER_MODE_3&amp;nbsp;3&amp;nbsp; // Active low; QSPI_CLK transitions begining of bit timing&lt;BR /&gt;#define QSPI_TRANSFER_MODE_4&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp; // Active high; QSPI_CLK transitions begining of bit timing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 19:50:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/QSPI-Clock-inversion/m-p/199910#M4365</guid>
      <dc:creator>EAI</dc:creator>
      <dc:date>2009-07-16T19:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: QSPI Clock inversion</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/QSPI-Clock-inversion/m-p/199911#M4366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is clearly the wrong way of modifiying the transfer modes, whats the correct way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I find out exactly how to set / clear all the bits in the qspi header? Obviously most of them are not flags as they overlap, so there must be various ways of setting those bits... I know if I wrote the header file i would say how each bit is actually used (although I am sure its obvious to some)...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pa&lt;/P&gt;&lt;PRE&gt;
...
 //Open SPI
  SPI_fd = fopen(SLIC_SPI_PORT, (pointer)(QSPI_DEVICE_MASTER_MODE));
  if (SPI_fd == NULL)
  {
    printf("\n Failed to open the SPI Controller: QSPI ALLOCATION ERROR....");
   return FALSE;
  }

  // Set QSPI Baud rate
  param = 4000000;
  printf ("\nChanging the Baud frequency to 4000000Hz...");
  ioctl(SPI_fd, IO_IOCTL_SERIAL_SET_BAUD, &amp;amp;param);  

  //Show Baud rate setting
  ioctl(SPI_fd, IO_IOCTL_SERIAL_GET_BAUD, &amp;amp;param);
  printf (" QSPI freq is no %dHz.\n", param);
 
  //Get the current flags
  param = 0;
  ioctl(SPI_fd, IO_IOCTL_GET_FLAGS, &amp;amp;param);
  printf("IO_CTLFLAGS = %X\n", param); //param = 0x21B
 
  //Mask out any current transfer modes (As it turns out MASTER_MODE has bit 0 and 1 set which are the transfer mode bits
  param &amp;amp;= (~(QSPI_TRANSFER_MODE_1 | QSPI_TRANSFER_MODE_2 | QSPI_TRANSFER_MODE_3 | QSPI_TRANSFER_MODE_4));
  printf("Param with no modes = %X\n", param); //Param 0x218
  param |= (QSPI_TRANSFER_MODE_1);     //Tried this with _1, _2, _3 and 4, and nothing changes   
  printf("Param single = %X\n", param);   //Param 0x219
  ioctl(SPI_fd, IO_IOCTL_SET_FLAGS, &amp;amp;param);
 
  //Read out the Paramters to make sure they are what we expect
  param = 0;
  ioctl(SPI_fd, IO_IOCTL_GET_FLAGS, &amp;amp;param);
  printf("IO_CTLFLAGS returned = %X\n", param); //PAram 0x219

 //This line needs to spit data out with CS asserted to reset the slaves SPI state machine!
  if(write(SPI_fd, &amp;amp;byte, 1) == IO_ERROR) printf("\nERROR: QSPI WRITE FAILED in SPI_Init.\n");
.. &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Carl&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by CarlFST60L on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-07-17&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;01:04 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2009 06:57:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/QSPI-Clock-inversion/m-p/199911#M4366</guid>
      <dc:creator>CarlFST60L</dc:creator>
      <dc:date>2009-07-17T06:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: QSPI Clock inversion</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/QSPI-Clock-inversion/m-p/199912#M4367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I am also a little confused why the MQX3.2 QSPI example sets / clears the chip select as this is done automatically. Its actually MUCH slower to manually set / clear the CS.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2009 08:01:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/QSPI-Clock-inversion/m-p/199912#M4367</guid>
      <dc:creator>CarlFST60L</dc:creator>
      <dc:date>2009-07-17T08:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: QSPI Clock inversion</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/QSPI-Clock-inversion/m-p/199913#M4368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found the answer, you have to use the IO_IOCTL_QSPI_SET_TRANSFER_MODE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by CarlFST60L on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-07-17&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;02:09 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2009 08:04:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/QSPI-Clock-inversion/m-p/199913#M4368</guid>
      <dc:creator>CarlFST60L</dc:creator>
      <dc:date>2009-07-17T08:04:38Z</dc:date>
    </item>
  </channel>
</rss>

