<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>USB host MSC stack overflow</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/30187/usb-host-msc-stack-overflow</link><description> 
I managed to get usb host msc (mass storage class) running up
until detection of the USB stick. 

 
 while(true) {
 os_dly_wait(2);
 usbh_engine(0); // check for new devices
 if (!bConnected &amp;amp;&amp;amp; usbh_msc_status(0, 0)) {
 printf(&amp;quot;MSC connected&amp;quot;);
 bConnected</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: USB host MSC stack overflow</title><link>https://community.arm.com/thread/131972?ContentTypeID=1</link><pubDate>Thu, 10 Oct 2013 01:04:58 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9874e375-1a21-4e8e-8508-c469051ea28d</guid><dc:creator>Nikhila Allamsetti</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi,&lt;br /&gt;
For me finit(&amp;quot;U0:&amp;quot;) is not returning anything.&lt;br /&gt;
But finit(&amp;quot;U1:&amp;quot;) works perfectly alright.&lt;br /&gt;
I tried running example from Keil toolchain MSD_File and there is no
problem.&lt;br /&gt;
I picked up fs_usbh_msc.c, usb_config.c, usbh_stm32f20x.c and
usbh_stm32f20x.h from
./Boards/Keil/MCBSTM32F200/RL/USB/Host/MSD_File/. to integrate for my
purpose.&lt;/p&gt;

&lt;p&gt;
Do you have any idea what could have gone wrong?&lt;br /&gt;
Thanks in advance!&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB host MSC stack overflow</title><link>https://community.arm.com/thread/128247?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2013 06:59:14 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5d515326-1d68-457e-bb82-75a73f05b138</guid><dc:creator>Ruud Vermeij</dc:creator><description>&lt;p&gt;&lt;p&gt;
The &amp;quot;talking to myself&amp;quot; was just joking with myself... :-)&lt;br /&gt;
Thanks for your reaction.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB host MSC stack overflow</title><link>https://community.arm.com/thread/120104?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2013 06:53:58 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ff5da57c-cfc3-4014-82ec-74df17904bd4</guid><dc:creator>Westonsupermare Pier</dc:creator><description>&lt;p&gt;&lt;p&gt;
Have you tried Twitter?&lt;/p&gt;

&lt;p&gt;
This is how user forums work, especially if you post multiple
times within the same day, and no one with any special
perspective/interest has visited. I suppose the consultant contingent
are off with paying clients today.&lt;/p&gt;

&lt;p&gt;
Yes, it does sound like you have an initialization issue, and
perhaps one with your abstraction implementation, suggest you go look
there and through the documentation for the file system.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB host MSC stack overflow</title><link>https://community.arm.com/thread/107199?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2013 04:56:21 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f766e193-9374-42a7-b6b8-d0e767024ed1</guid><dc:creator>Ruud Vermeij</dc:creator><description>&lt;p&gt;&lt;p&gt;
fcheck(&amp;quot;U0:&amp;quot;) returns nonzero.&lt;br /&gt;
It seems that on fcheck, none of the functions in fs_usbh_msc.c is
called.&lt;/p&gt;

&lt;p&gt;
There seems to be something wrong in the connection between the
file system layer (where all the file commands are) and the host
class layer (with the functions from fs_usbh_msc.c).&lt;/p&gt;

&lt;p&gt;
It seems something doesn&amp;#39;t get initialized.&lt;br /&gt;
I am calling finit(NULL) at the start of my program and finit(&amp;quot;U0:&amp;quot;)
on detection of a USB stick.&lt;/p&gt;

&lt;p&gt;
(And I am talking to myself a lot...)&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB host MSC stack overflow</title><link>https://community.arm.com/thread/81339?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2013 01:31:12 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:424f2530-e4c3-48f1-ae4e-2d5e28eb57d9</guid><dc:creator>Ruud Vermeij</dc:creator><description>&lt;p&gt;&lt;p&gt;
The stack problem is solved. I needed to increase OS_STKSIZE in
RTX_Conf_CM.c a bit. Had nothing to do with the USB.&lt;/p&gt;

&lt;p&gt;
However, I still can&amp;#39;t get any information about the file system
on the USB stick...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB host MSC stack overflow</title><link>https://community.arm.com/thread/62108?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2013 01:10:10 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7f29dab6-f14d-4cb7-a5ad-144e0815be93</guid><dc:creator>Ruud Vermeij</dc:creator><description>&lt;p&gt;&lt;pre&gt;
  usbh_msc_read_config(0, 0, &amp;amp;tot_blk_num, &amp;amp;blk_sz);
&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
This function is working, and returns (correctly):&lt;br /&gt;
tot_blk_num = 4040191&lt;br /&gt;
blk_sz = 512&lt;br /&gt;
Hence, a 2 GB stick.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>