<?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 serial memory test addresses write failure?</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-serial-memory-test-addresses-write-failure/m-p/279487#M8705</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mehdi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may be a silly question, but is there an SPI memory chip on the SPI bus?&lt;/P&gt;&lt;P&gt;The TWR-K60D100M does not have a SPI memory chip on it, and you would have to interface to such a chip - using a custom circuit, or possibly the tower memory board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What the example is attempting to do is to read and write data to an external memory chip on the SPI bus, and those addresses are just arbitrary addresses &lt;SPAN style="text-decoration: underline;"&gt;on that external chip&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Due to the nature of SPI, it may appear that writes and reads to a (non-existent) chip are working, as the SPI bus will always clock the data out and in (nothing to tell the bus itself if a chip is really responding)&lt;/P&gt;&lt;P&gt;However, write data is just being discarded (nobody on the other end of the telephone line is listening) and read data will probably be either all 1's or all 0's as nobody is feeding intelligent data back, and the state of the circuit will determine if it is high (you get all 1's) or low (you get all 0's)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Nov 2013 15:31:39 GMT</pubDate>
    <dc:creator>Symbolic</dc:creator>
    <dc:date>2013-11-27T15:31:39Z</dc:date>
    <item>
      <title>SPI serial memory test addresses write failure?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-serial-memory-test-addresses-write-failure/m-p/279486#M8704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;I have created and MQX 4.0 project with the simple example SPI project that is available in the CodeWarrior 10.5&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;My kit is TWR-K60D100M with Kinetis MK60DN512 VMD10.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;In "main.c", there is a section for serial memory addresses:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;/* The SPI serial memory test addresses */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;#define SPI_MEMORY_ADDR1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0000F0 /* test address 1 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;#define SPI_MEMORY_ADDR2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0001F0 /* test address 2 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;#define SPI_MEMORY_ADDR3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0002F0 /* test address 3 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;...Can you tell me if these are correct memory addresses?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;The reason for asking is, when I write to those memory addresses, I receive error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;…&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Enable write latch in memory ... OK&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Read memory status ... 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Write byte 0xba to location 0x000000f0 in memory ... done&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Read memory status ... 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Read byte from location 0x000000f0 in memory ... 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Byte test ... ERROR&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Getting statistics:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Rx packets: 8&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Tx packets: 25&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;…&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Enable write latch in memory ... OK&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Read memory status ... 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Page write 12 bytes to location 0x000001f0 in memory:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Hello,World!&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Read memory status ... 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Reading 12 bytes from location 0x000001f0 in memory:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;…&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Write short data test ... ERROR&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;…&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Enable write latch in memory ... OK&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Read memory status ... 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Page write 16 bytes to location 0x000002f0 in memory:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;ABCDEFGHIJKLMNOP&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Enable write latch in memory ... OK&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Read memory status ... 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Page write 56 bytes to location 0x00000300 in memory:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;QRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz1234567890&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Read memory status ... 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Reading 72 bytes from location 0x000002f0 in memory:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Write long data test ... ERROR&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;IO_IOCTL_SPI_READ_WRITE ... OK&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Simultaneous write and read - memory read from 0x000000f0 (10):&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Write: 0x03 0x00 0x00 0xf0 0x00 0x00 0x00 0x00 0x00 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Read : 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Simultaneous read/write (data == 0x00) ... ERROR&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;--------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Project attached.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Cambria','serif';"&gt;Notes:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;I built it with Freescale compiler not GCC. &lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;My kit is TWR-K60D100M with Kinetis MK60DN512 VMD10.&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;My MQX: MQX 4.0 with CW: 10.5.&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Added "#define BSPCFG_ENABLE_SPI_STATS 1" in "user_config.h" and rebuilt bsp/psp.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338564"&gt;my_spi.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2013 00:40:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-serial-memory-test-addresses-write-failure/m-p/279486#M8704</guid>
      <dc:creator>mehdikarimibiuk</dc:creator>
      <dc:date>2013-11-15T00:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: SPI serial memory test addresses write failure?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-serial-memory-test-addresses-write-failure/m-p/279487#M8705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mehdi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may be a silly question, but is there an SPI memory chip on the SPI bus?&lt;/P&gt;&lt;P&gt;The TWR-K60D100M does not have a SPI memory chip on it, and you would have to interface to such a chip - using a custom circuit, or possibly the tower memory board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What the example is attempting to do is to read and write data to an external memory chip on the SPI bus, and those addresses are just arbitrary addresses &lt;SPAN style="text-decoration: underline;"&gt;on that external chip&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Due to the nature of SPI, it may appear that writes and reads to a (non-existent) chip are working, as the SPI bus will always clock the data out and in (nothing to tell the bus itself if a chip is really responding)&lt;/P&gt;&lt;P&gt;However, write data is just being discarded (nobody on the other end of the telephone line is listening) and read data will probably be either all 1's or all 0's as nobody is feeding intelligent data back, and the state of the circuit will determine if it is high (you get all 1's) or low (you get all 0's)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 15:31:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-serial-memory-test-addresses-write-failure/m-p/279487#M8705</guid>
      <dc:creator>Symbolic</dc:creator>
      <dc:date>2013-11-27T15:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: SPI serial memory test addresses write failure?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-serial-memory-test-addresses-write-failure/m-p/279488#M8706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stephen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have same isssue&lt;/P&gt;&lt;P&gt;I'm using the tower k53 board, I added&lt;/P&gt;&lt;P&gt;#define BSPCFG_ENABLE_SPI_STATS 1&lt;/P&gt;&lt;P&gt;to user_config.h&lt;/P&gt;&lt;P&gt;The Tower K53 has SD card socket, I enabled J10 to connect SD card to SPI&lt;/P&gt;&lt;P&gt;signals&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you suggest me how to proceed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Julio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 18:10:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-serial-memory-test-addresses-write-failure/m-p/279488#M8706</guid>
      <dc:creator>JULIOOSVALDOANG</dc:creator>
      <dc:date>2014-08-28T18:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: SPI serial memory test addresses write failure?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-serial-memory-test-addresses-write-failure/m-p/279489#M8707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stephen, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes you are right, you need to buy that extra memory card for the tower.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I have a better idea, instead of using memory. use spi loopback. Simply do a loopback between two spi's and if you want to test your functions make one as master and the other slave.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 18:17:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-serial-memory-test-addresses-write-failure/m-p/279489#M8707</guid>
      <dc:creator>mehdikarimibiuk</dc:creator>
      <dc:date>2014-08-28T18:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: SPI serial memory test addresses write failure?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-serial-memory-test-addresses-write-failure/m-p/279490#M8708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Julio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a comment that may help with your spi functions. If you are to try SPI functionality you may just want to have a loopback between two spi modules. I have not tried your approach so I cannot comment on that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 18:21:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-serial-memory-test-addresses-write-failure/m-p/279490#M8708</guid>
      <dc:creator>mehdikarimibiuk</dc:creator>
      <dc:date>2014-08-28T18:21:22Z</dc:date>
    </item>
  </channel>
</rss>

