<?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: K82: QSPI writing to flash memory small chunks in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-QSPI-writing-to-flash-memory-small-chunks/m-p/920129#M53714</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eugene,&lt;/P&gt;&lt;P&gt;This is because the demo code default set the QSPI TX buffer watermark to 8. That means 32 bytes. When EDMA_PrepareTransfer() check it's parameter, it will found that bytesEachRequest big than transferBytes. Then it will hold the code or report error.&lt;/P&gt;&lt;P&gt;If you want DMA to send 16 byte each time, you should set config-&amp;gt;txWatermark=4.&lt;/P&gt;&lt;P&gt;If you want DMA to send 8 byte each time, you should set config-&amp;gt;txWatermark=1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Aug 2019 06:27:08 GMT</pubDate>
    <dc:creator>jingpan</dc:creator>
    <dc:date>2019-08-01T06:27:08Z</dc:date>
    <item>
      <title>K82: QSPI writing to flash memory small chunks</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-QSPI-writing-to-flash-memory-small-chunks/m-p/920128#M53713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have taken qspi_edma transfer example for FRDMK82 board from latest SDK and it work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By default it write PAGE_SIZE data chunks to flash memory but I need smaller once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have modified&amp;nbsp; function program_page for support smaller chunks of data :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Program data into serial flash using QSPI polling way */&lt;BR /&gt;void program_page(uint32_t dest_addr, uint32_t *src_addr, size_t size)&lt;BR /&gt;{&lt;BR /&gt; qspi_transfer_t xfer = {0};&lt;/P&gt;&lt;P&gt;xfer.data = (uint32_t *)src_addr;&lt;BR /&gt; xfer.dataSize = &lt;STRONG&gt;size&lt;/STRONG&gt;; //FLASH_PAGE_SIZE; //&lt;BR /&gt; while (QSPI_GetStatusFlags(EXAMPLE_QSPI) &amp;amp; kQSPI_Busy)&lt;BR /&gt; {&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;QSPI_ClearFifo(EXAMPLE_QSPI, kQSPI_TxFifo);&lt;BR /&gt; QSPI_SetIPCommandAddress(EXAMPLE_QSPI, dest_addr);&lt;BR /&gt; QSPI_SetIPCommandSize(EXAMPLE_QSPI, &lt;STRONG&gt;size&lt;/STRONG&gt; /*FLASH_PAGE_SIZE*/); //&lt;BR /&gt; cmd_write_enable();&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and it work fine with 32 byte chunks ( and bigger once ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But not with 16 bytes long.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What can be problem ?&lt;/P&gt;&lt;P&gt;Can it be some QSPI Fifo size limitations or someting else ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think used NOR flash memory ( MX25U3235F ) supports writes from 1 byte up to page size long.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should be able to fill sector by using 4,8 and 16 byte long chunks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you advice what is QSPI controller limitations for read/write operations ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eugene&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2019 09:20:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-QSPI-writing-to-flash-memory-small-chunks/m-p/920128#M53713</guid>
      <dc:creator>EugeneHiihtaja</dc:creator>
      <dc:date>2019-07-29T09:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: K82: QSPI writing to flash memory small chunks</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-QSPI-writing-to-flash-memory-small-chunks/m-p/920129#M53714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eugene,&lt;/P&gt;&lt;P&gt;This is because the demo code default set the QSPI TX buffer watermark to 8. That means 32 bytes. When EDMA_PrepareTransfer() check it's parameter, it will found that bytesEachRequest big than transferBytes. Then it will hold the code or report error.&lt;/P&gt;&lt;P&gt;If you want DMA to send 16 byte each time, you should set config-&amp;gt;txWatermark=4.&lt;/P&gt;&lt;P&gt;If you want DMA to send 8 byte each time, you should set config-&amp;gt;txWatermark=1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2019 06:27:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-QSPI-writing-to-flash-memory-small-chunks/m-p/920129#M53714</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2019-08-01T06:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: K82: QSPI writing to flash memory small chunks</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-QSPI-writing-to-flash-memory-small-chunks/m-p/920130#M53715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jing !&lt;/P&gt;&lt;P&gt;Does it mean if DMA in use, minimal data chunk is 8 byte long ?&lt;/P&gt;&lt;P&gt;And if 4 bytes is need, I can compose hybrid driver where 4 bytes and less is written by polling and 8 byes and up - by DMA ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eugene&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2019 12:30:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-QSPI-writing-to-flash-memory-small-chunks/m-p/920130#M53715</guid>
      <dc:creator>EugeneHiihtaja</dc:creator>
      <dc:date>2019-08-01T12:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: K82: QSPI writing to flash memory small chunks</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-QSPI-writing-to-flash-memory-small-chunks/m-p/920131#M53716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Yes, DMA need 4 byte minimum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2019 02:34:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-QSPI-writing-to-flash-memory-small-chunks/m-p/920131#M53716</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2019-08-02T02:34:49Z</dc:date>
    </item>
  </channel>
</rss>

