<?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: K27/K28 and SDHC/eMMC in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K27-K28-and-SDHC-eMMC/m-p/1093120#M57760</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sebastian,&lt;/P&gt;&lt;P&gt;Thank you for useful feedback.&amp;nbsp; I was not aware of this option, I will implement it.&lt;/P&gt;&lt;P&gt;Best Regards, Eldar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 May 2020 11:05:32 GMT</pubDate>
    <dc:creator>eldarfiring</dc:creator>
    <dc:date>2020-05-01T11:05:32Z</dc:date>
    <item>
      <title>K27/K28 and SDHC/eMMC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K27-K28-and-SDHC-eMMC/m-p/1093118#M57758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We have struggled a bit to get a SanDisk eMMC (&lt;SPAN style="font-size: 10.0pt;"&gt;SDINBDG4-8G )&amp;nbsp;&lt;/SPAN&gt;device working with K27/SDHC.&lt;/P&gt;&lt;P&gt;We have used Kinetis SDK 2.7 and MMC/FatFS middleware and it is now working running exFAT file system.&lt;/P&gt;&lt;P&gt;The SDHC module is running at 40MHz/8-bit after the initial 400kHz/1-bit eMMC commands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many of the problems were because of incorrect pull-ups on external CMD/DAT lines, but also the fact that we need to disable the Memory Protection Unit (MPU) for this to work :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SYSMPU-&amp;gt;CESR &amp;amp;= ~SYSMPU_CESR_VLD_MASK; // MPU is disabled. All accesses from all bus masters are allowed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is not added before using SDHC, the SDHC communication fails during initial commands with following interrupt set.&lt;/P&gt;&lt;P&gt;K27 Reference Manual :&amp;nbsp;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;STRONG style="font-size: 12.0pt; "&gt;Table 61-7. SDHC status for CCE/CTOE Bit Combinations&amp;nbsp; :&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;DMAE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;DMA Error&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;Occurs when an Internal DMA transfer has failed. This bit is set to 1, when some error occurs in the data&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;transfer. This error can be caused by either Simple DMA or ADMA, depending on which DMA is in use.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;The value in DMA System Address register is the next fetch address where the error occurs. Because any&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;error corrupts the whole data block, the host driver shall restart the transfer from the corrupted block&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;boundary. The address of the block boundary can be calculated either from the current DSADDR value or&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;from the remaining number of blocks and the block size.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found the tips about the MPU way down in long 8 year forum post for a different kinetis device.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my question is is this a known issue in Kinetis devices, or have we misunderstood something ?&lt;/P&gt;&lt;P&gt;Is there a way to avoid disabling the MPU ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2020 06:54:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K27-K28-and-SDHC-eMMC/m-p/1093118#M57758</guid>
      <dc:creator>eldarfiring</dc:creator>
      <dc:date>2020-04-29T06:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: K27/K28 and SDHC/eMMC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K27-K28-and-SDHC-eMMC/m-p/1093119#M57759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eldar, I hope you're doing well!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Individual Bus Master permissions can be assigned in the Region Descriptor n, Word 2 (MPU_RGDn_WORD2) and Region Descriptor Alternate Access Control n (MPU_RGDAACn) registers of the MPU to allow access to only certain sections of the MPU.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The eSDHC Bus Master is assigned to number 4 of the MPU Logical Bus Master Numbers, so permissions for this bus can be changed to allow read/write permission to this bus master, to avoid enabling permission for all of the other present bus masters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;More information about this can be found on the &lt;A href="https://www.nxp.com/docs/en/reference-manual/K27P169M150SF5RM.pdf"&gt;K27's&lt;/A&gt; and &lt;A href="https://www.nxp.com/docs/en/reference-manual/K28P210M150SF5RM.pdf"&gt;K28's&lt;/A&gt; Reference Manuals section 22.4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know If you need any more information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Sebastian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2020 19:01:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K27-K28-and-SDHC-eMMC/m-p/1093119#M57759</guid>
      <dc:creator>Sebastian_Del_Rio</dc:creator>
      <dc:date>2020-04-30T19:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: K27/K28 and SDHC/eMMC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K27-K28-and-SDHC-eMMC/m-p/1093120#M57760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sebastian,&lt;/P&gt;&lt;P&gt;Thank you for useful feedback.&amp;nbsp; I was not aware of this option, I will implement it.&lt;/P&gt;&lt;P&gt;Best Regards, Eldar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 May 2020 11:05:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K27-K28-and-SDHC-eMMC/m-p/1093120#M57760</guid>
      <dc:creator>eldarfiring</dc:creator>
      <dc:date>2020-05-01T11:05:32Z</dc:date>
    </item>
  </channel>
</rss>

