<?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>LPC MicrocontrollersのトピックRe: sd-card read hang in USB composite mass storage</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/sd-card-read-hang-in-USB-composite-mass-storage/m-p/545039#M12982</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is now solved. I set a higher interrupt priority for the sd card than the USB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Sep 2016 05:18:03 GMT</pubDate>
    <dc:creator>bobv</dc:creator>
    <dc:date>2016-09-09T05:18:03Z</dc:date>
    <item>
      <title>sd-card read hang in USB composite mass storage</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/sd-card-read-hang-in-USB-composite-mass-storage/m-p/545037#M12980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to the lpc platform. I am trying to build a usb composite device with VCOM and MSC (storage over sd-card). I am using a NGX Xplorer 1830. I modified the usbd_rom_dfu_composite example, by adding the sd-card initialization routine into main(), and modified translate_rd and translate_wr with read and write from sd-card.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I notice that the device hangs during read from the card:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;static void sd_rd(uint32_t@ offset, uint8_t * *buff_adr, uint32_t length, uint32_t hi_offset)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;&amp;nbsp; // only using offset, access limited to &amp;lt;~ 4GB&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;&amp;nbsp; int x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;&amp;nbsp; Board_LED_Set(1,1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;&amp;nbsp; x = FSMCI_CardReadSectors(0,verifyBuff,offset/sdSectorSize,length/sdSectorSize);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;&amp;nbsp; Board_LED_Toggle(1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;&amp;nbsp; *buff_adr = verifyBuff;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Although, the read works fine during initialisation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;The project with lpc-xpresso is attached. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Any help will be greatly appreciated&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; color: #51626f; font-weight: bold; font-family: arial, helvetica, sans-serif;"&gt;&lt;STRONG&gt;Original Attachment has been moved to:&amp;nbsp;&lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338109"&gt;pd_project_bad.tar.7z.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Aug 2016 08:53:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/sd-card-read-hang-in-USB-composite-mass-storage/m-p/545037#M12980</guid>
      <dc:creator>bobv</dc:creator>
      <dc:date>2016-08-21T08:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: sd-card read hang in USB composite mass storage</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/sd-card-read-hang-in-USB-composite-mass-storage/m-p/545038#M12981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recommend just remove below code from main() and&amp;nbsp;ms_timerDelay() functions to check if SD card read works or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;__WFI();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2016 05:35:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/sd-card-read-hang-in-USB-composite-mass-storage/m-p/545038#M12981</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2016-09-07T05:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: sd-card read hang in USB composite mass storage</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/sd-card-read-hang-in-USB-composite-mass-storage/m-p/545039#M12982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is now solved. I set a higher interrupt priority for the sd card than the USB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2016 05:18:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/sd-card-read-hang-in-USB-composite-mass-storage/m-p/545039#M12982</guid>
      <dc:creator>bobv</dc:creator>
      <dc:date>2016-09-09T05:18:03Z</dc:date>
    </item>
  </channel>
</rss>

