Searching \ for '[PIC] reality check - PIC24FJ64GB004 USB Host tran' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'reality check - PIC24FJ64GB004 USB Host tran'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] reality check - PIC24FJ64GB004 USB Host tran'
2011\03\08@160152 by Mike Harrison

flavicon
face
Just prototyping  a device to read data from a USB stick on a  PIC24FJ64GB004, using code adapted
from the Microchip datalogger example, and the full (paid-for) compiler version. Optimisations M2/M3
Transfer rate seems a little disappointing - reading 2K blocks is taking 27..3ms, an overall rate
around 75kbytes/sec. (51.2ms for 4096 bytes  = 80kbytes/sec).
This is using FSfread call, reading sequentially from a large file with no seeks inbetween.

This seems a little slow - anyone have any experience to comment on whether it seems reasonable or
could be improved ?

I'd ideally like to be able to get closer to 200kbytes/sec, and if the PIC won't do it will look at
the VNC2L

Compiler optimisation options make no obvious difference, however I found that disabling the
"Allow_Writes" option in fscconfig.h improves speed to about 95K/sec for 4K transfers, which
suggests to me that there is some non-optimality going on somewhere, as none of the write code
should be involved when opening a file for read....

Fortunately this is a read-only app so I can live with this.
Unfortunately I know almost nothing about the low-level USB or FAT stuff so can't readily start
delving into the innards of their library code...



2011\03\08@172239 by Sergey Dryga

flavicon
face
Mike Harrison <mike <at> whitewing.co.uk> writes:

>
> Just prototyping  a device to read data from a USB stick on a  PIC24FJ64GB004,
using code adapted
> from the Microchip datalogger example, and the full (paid-for) compiler
version. Optimisations M2/M3
> Transfer rate seems a little disappointing - reading 2K blocks is taking
27.3ms, an overall rate
> around 75kbytes/sec. (51.2ms for 4096 bytes  = 80kbytes/sec).
> This is using FSfread call, reading sequentially from a large file with no
seeks inbetween.
>
> This seems a little slow - anyone have any experience to comment on whether it
seems reasonable or
> could be improved ?
>
> I'd ideally like to be able to get closer to 200kbytes/sec, and if the PIC
won't do it will look at
> the VNC2L
> Not speaking from experience with this particular system.
Could this time be mostly due to initialization/setup of the system for reading?
How long does it take to read the next 4k block? The actual read rate might be higher than that.
Sergey Dryga
http://beaglerobotics.com

2011\03\08@175531 by Mike Harrison

flavicon
face
On Tue, 8 Mar 2011 22:22:24 +0000 (UTC), you wrote:

{Quote hidden}

- no  that's the time each FSfread call takes while continuously reading 4K blocks. The first one
may be longer - I was just measuring a port pin pulse length on a scope. You can see from the 2K read time that most of the time is size-related, not setup.

2011\03\09@004515 by Xiaofan Chen

face picon face
On Wed, Mar 9, 2011 at 5:01 AM, Mike Harrison <spam_OUTmikeTakeThisOuTspamwhitewing.co.uk> wrote:
> Just prototyping  a device to read data from a USB stick on a  PIC24FJ64GB004, using code adapted
> from the Microchip datalogger example, and the full (paid-for) compiler version. Optimisations M2/M3
> Transfer rate seems a little disappointing - reading 2K blocks is taking 27.3ms, an overall rate
> around 75kbytes/sec. (51.2ms for 4096 bytes  = 80kbytes/sec).
> This is using FSfread call, reading sequentially from a large file with no seeks inbetween.
>
> This seems a little slow - anyone have any experience to comment on whether it seems reasonable or
> could be improved ?
>
> I'd ideally like to be able to get closer to 200kbytes/sec, and if the PIC won't do it will look at
> the VNC2L
>

I have not much experiences with the host stack but the following
threads may help.

www.microchip.com/forums/fb.ashx?m=417755
Basically it can be done, but not with Microchip's current implementation.

www.microchip.com/forums/tm.aspx?m=423483
www.microchip.com/forums/tm.aspx?m=444501
The brand of the USB stick plays a part as well.

In the following two threads, it seems using a different file system may help.
www.microchip.com/forums/tm.aspx?m=476956
http://www.microchip.com/forums/tm.aspx?m=501324





-- Xiaofan

More... (looser matching)
- Last day of these posts
- In 2011 , 2012 only
- Today
- New search...