<?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 sd-card read hang in USB composite mass storage in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/sd-card-read-hang-in-USB-composite-mass-storage/m-p/545086#M12997</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 and the lpcopen 2.12 source code. 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 aria-label="Happy" class="emoticon_happy emoticon-inline" style="height:16px;width:16px;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&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-337877"&gt;pd_project_bad.tar.7z.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 21 Aug 2016 08:59:56 GMT</pubDate>
    <dc:creator>bobv</dc:creator>
    <dc:date>2016-08-21T08:59:56Z</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/545086#M12997</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 and the lpcopen 2.12 source code. 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 aria-label="Happy" class="emoticon_happy emoticon-inline" style="height:16px;width:16px;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&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-337877"&gt;pd_project_bad.tar.7z.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Aug 2016 08:59:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/sd-card-read-hang-in-USB-composite-mass-storage/m-p/545086#M12997</guid>
      <dc:creator>bobv</dc:creator>
      <dc:date>2016-08-21T08:59:56Z</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/545087#M12998</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;Please check the below bug reported.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/422405"&gt;Bugreport: SD-Card on LPC18xx, LPC43xx, LPC17xx&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt; Sol&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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, 14 Sep 2016 00:00:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/sd-card-read-hang-in-USB-composite-mass-storage/m-p/545087#M12998</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2016-09-14T00:00:31Z</dc:date>
    </item>
  </channel>
</rss>

