<?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: SPI/QSPI send-receive with 52259</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-QSPI-send-receive-with-52259/m-p/150888#M448</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it will&amp;nbsp;work as requested with the read command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem in understanding was, that I hadn´t recognised, that I´m not working on the QSPI buffer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;wrong:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;write(SPI_HW_st.SPI_fd , buffer, length);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;read(SPI_HW_st.SPI_fd , buffer, length);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;right:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;read(SPI_HW_st.SPI_fd , buffer, length);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Therefore the write command isn´t necessary to send and get any data from&amp;nbsp;the SPI chain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stefan&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Nov 2009 12:48:43 GMT</pubDate>
    <dc:creator>Stefan_75</dc:creator>
    <dc:date>2009-11-03T12:48:43Z</dc:date>
    <item>
      <title>SPI/QSPI send-receive with 52259</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-QSPI-send-receive-with-52259/m-p/150887#M447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I´m trying to send-receive with the SPI dirver (MQX 3.4).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I´m using following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--- start ---&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*init*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;SPI_HW_st.SPI_fd = fopen ("spi0:", NULL);&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;param = SPI_DEVICE_BIG_ENDIAN;&lt;BR /&gt;&amp;nbsp;error = ioctl (SPI_HW_st.SPI_fd, IO_IOCTL_SPI_SET_ENDIAN, &amp;amp;param);&lt;BR /&gt;&amp;nbsp;param = (SPI_DEVICE_MASTER_MODE); &amp;nbsp;&lt;BR /&gt;&amp;nbsp;error = ioctl(SPI_HW_st.SPI_fd, IO_IOCTL_SPI_SET_TRANSFER_MODE, &amp;amp;param);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;param = SPI_CLK_POL_PHA_MODE1;&lt;BR /&gt;&amp;nbsp;error = ioctl (SPI_HW_st.SPI_fd, IO_IOCTL_SPI_SET_MODE, &amp;amp;param);&lt;BR /&gt;&amp;nbsp;param = 200000;&lt;/P&gt;&lt;P&gt;&amp;nbsp;error = ioctl(SPI_HW_st.SPI_fd, IO_IOCTL_SPI_SET_BAUD, &amp;amp;param);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*code*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;UINT8 i [100];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;write(SPI_HW_st.SPI_fd , i, 100);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-- end ---&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is no result in i.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the beginning of the programm I don´t know exactly the length of the SPI chain. Therefore I have to detect it and compare the written results with the received.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I manage, that the result will written to i?&lt;/P&gt;&lt;P&gt;Does anybody knows where´s the QSPI driver from MQX 3.3 is gone?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data are sent to the chain and also received at the QSPI-DIN pin. The chip-select signals are managed by GPIO pins.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any hint.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2009 23:22:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-QSPI-send-receive-with-52259/m-p/150887#M447</guid>
      <dc:creator>Stefan_75</dc:creator>
      <dc:date>2009-11-02T23:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: SPI/QSPI send-receive with 52259</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-QSPI-send-receive-with-52259/m-p/150888#M448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it will&amp;nbsp;work as requested with the read command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem in understanding was, that I hadn´t recognised, that I´m not working on the QSPI buffer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;wrong:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;write(SPI_HW_st.SPI_fd , buffer, length);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;read(SPI_HW_st.SPI_fd , buffer, length);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;right:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;read(SPI_HW_st.SPI_fd , buffer, length);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Therefore the write command isn´t necessary to send and get any data from&amp;nbsp;the SPI chain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stefan&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 12:48:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-QSPI-send-receive-with-52259/m-p/150888#M448</guid>
      <dc:creator>Stefan_75</dc:creator>
      <dc:date>2009-11-03T12:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: SPI/QSPI send-receive with 52259</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-QSPI-send-receive-with-52259/m-p/150889#M449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yes, using SPI&amp;nbsp;read() in master mode results in writing dummy bytes to do actual read (you are not receiving, what you have just sent, but what slave device passes through).&lt;/P&gt;&lt;P&gt;Regarding QSPI, it was merged to SPI driver, so in your code you always use SPI regardless of physical interface (QSPI, DSPI, SPI).&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2009 00:04:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-QSPI-send-receive-with-52259/m-p/150889#M449</guid>
      <dc:creator>PetrM</dc:creator>
      <dc:date>2009-11-06T00:04:41Z</dc:date>
    </item>
  </channel>
</rss>

