<?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>MCUXpresso SDK中的主题 SD Card Logical Blocks</title>
    <link>https://community.nxp.com/t5/MCUXpresso-SDK/SD-Card-Logical-Blocks/m-p/2059552#M5088</link>
    <description>&lt;P&gt;I am working with...&lt;BR /&gt;MCUXpresso IDE v24.9 [Build 25][2024-09-26]&lt;BR /&gt;FreeRTOS Kernel V10.3.0&lt;BR /&gt;SDK 2.9.0&lt;BR /&gt;K64 processor&lt;/P&gt;&lt;P&gt;I have setup my SDHC something like this...&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// global variables&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;static sd_card_t g_sdCard;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SDK_ALIGN(uint8_t g_dataBuf[DATA_BUFFER_SIZE], BOARD_SDMMC_DATA_BUFFER_ALIGN_SIZE);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// configure SD card descriptor, include card detect ISR&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;BOARD_SD_Config(&amp;amp;g_sdCard, isr_SDHC_CD, BOARD_SDMMC_SD_HOST_IRQ_PRIORITY, NULL);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SD_HostInit(&amp;amp;g_sdCard);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SD_SetCardPower(&amp;amp;g_sdCard, false);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SD_SetCardPower(&amp;amp;g_sdCard, true);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SD_CardInit(&amp;amp;g_sdCard);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;To read block 0, I issue the following command...&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SD_ReadBlocks(&amp;amp;g_sdCard, g_dataBuf, 0U, 1U);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, this is returning data from the &lt;EM&gt;physical&lt;/EM&gt; block, not the &lt;EM&gt;logical&lt;/EM&gt; block.&lt;/P&gt;&lt;P&gt;I don't care which physical block the Flash controller in the SD card is using to store my data.&lt;BR /&gt;When I say I need "block 0," I need the data in logical block 0.&lt;/P&gt;&lt;P&gt;How do I read &lt;EM&gt;logical&lt;/EM&gt; blocks from an SD card?&lt;/P&gt;</description>
    <pubDate>Tue, 11 Mar 2025 13:05:02 GMT</pubDate>
    <dc:creator>audim</dc:creator>
    <dc:date>2025-03-11T13:05:02Z</dc:date>
    <item>
      <title>SD Card Logical Blocks</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/SD-Card-Logical-Blocks/m-p/2059552#M5088</link>
      <description>&lt;P&gt;I am working with...&lt;BR /&gt;MCUXpresso IDE v24.9 [Build 25][2024-09-26]&lt;BR /&gt;FreeRTOS Kernel V10.3.0&lt;BR /&gt;SDK 2.9.0&lt;BR /&gt;K64 processor&lt;/P&gt;&lt;P&gt;I have setup my SDHC something like this...&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// global variables&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;static sd_card_t g_sdCard;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SDK_ALIGN(uint8_t g_dataBuf[DATA_BUFFER_SIZE], BOARD_SDMMC_DATA_BUFFER_ALIGN_SIZE);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// configure SD card descriptor, include card detect ISR&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;BOARD_SD_Config(&amp;amp;g_sdCard, isr_SDHC_CD, BOARD_SDMMC_SD_HOST_IRQ_PRIORITY, NULL);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SD_HostInit(&amp;amp;g_sdCard);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SD_SetCardPower(&amp;amp;g_sdCard, false);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SD_SetCardPower(&amp;amp;g_sdCard, true);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SD_CardInit(&amp;amp;g_sdCard);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;To read block 0, I issue the following command...&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SD_ReadBlocks(&amp;amp;g_sdCard, g_dataBuf, 0U, 1U);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, this is returning data from the &lt;EM&gt;physical&lt;/EM&gt; block, not the &lt;EM&gt;logical&lt;/EM&gt; block.&lt;/P&gt;&lt;P&gt;I don't care which physical block the Flash controller in the SD card is using to store my data.&lt;BR /&gt;When I say I need "block 0," I need the data in logical block 0.&lt;/P&gt;&lt;P&gt;How do I read &lt;EM&gt;logical&lt;/EM&gt; blocks from an SD card?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 13:05:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/SD-Card-Logical-Blocks/m-p/2059552#M5088</guid>
      <dc:creator>audim</dc:creator>
      <dc:date>2025-03-11T13:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: SD Card Logical Blocks</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/SD-Card-Logical-Blocks/m-p/2061630#M5091</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/247899"&gt;@audim&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I will ask internally if there is any recommendation for using logic blocks. However, this API is propably not currently implemented. In that case, the application will implement itself.&lt;/P&gt;
&lt;P&gt;BR&lt;BR /&gt;Habib&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 22:56:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/SD-Card-Logical-Blocks/m-p/2061630#M5091</guid>
      <dc:creator>Habib_MS</dc:creator>
      <dc:date>2025-03-13T22:56:16Z</dc:date>
    </item>
  </channel>
</rss>

