Reply by "Tim...@sabretechnology.co.uk [lpc2000]"●July 2, 20142014-07-02
Just to add, I have a USB card reader on the Win7 machine and that can read both
cards fine.
So it seems like the USB card reader must not be using the same driver as my
board - I wonder if there is a way of tricking windows to use that driver for my
board?
Reply by "'M....@micronengineering.it [lpc2000]"●July 2, 20142014-07-02
Il 02/07/2014 11:24, Tim Mitchell t...@sabretechnology.co.uk [lpc2000] ha
scritto: >
>
> Hi, I've made a little SD card audio playback board for someone using
> LPC1754. It all works fine and will play from any type and size of card.
>
> The board can be connected as a USB mass storage device. However on
> Windows 7 only, some SD cards are not readable by the PC.
>
> After much trawling through USB packets it appears that Windows is
> asking for the wrong sector when it requests the boot sector.
> On a working card, Windows requests Sector 0 (the partition table)
> lots of times, then it requests 0x2000 bytes of data starting at the
> boot sector address which it gets from the partition table. My working
> card has 0x0083 as the boot sector address.
> On a non working card, the boot sector start address is 0x0200, but
> when windows requests the 0x2000 bytes of data it asks for sector
> 0x0000 again rather than 0x0200.
> So it seems like Windows is not reading the higher byte of the start
> address.
>
> This works fine on XP. Don't have any other windows versions to try.
> Anyone have any further knowledge on this?
> XP had no driver for SDHC so it always suppose to have SD card
interfaced, Win7 and Win8 have the SDHC driver. May you try with
different card models and sizes? You should try with a normal SD (an 8GB
card) and with a SDHC (32GB for instance) and see the difference.
Also knowing what stack you are using helps, I suppose you are using
that on LpcOpen.
About boot sectors and partitions:
The first partition table entry starts at 0x1be and is 16 bytes long
(there are places for three more entries)
So your table entry is
00 00 03 01 0b 2e ee e7 00 20 00 00 00 d8 7a 00
decoding that according to the table at we get
00: non bootable partition
00 03 01: chs start of partition, you can ignore this and use the LBA values
0b: parition type: "fat32 with CHS addressing"
2e ee e7 : chs end of partition again you can ignore this
00 20 00 00: start LBA sector of partition = sector 0x2000 = byte offset
0x400000
00 d8 7a 00: length of partition = 0x7ad800 sectors = 0xF5B00000 bytes http://en.wikipedia.org/wiki/Master_boot_record > --
> Tim Mitchell
> Sabre Technology (Hull) Ltd
> http://www.sabretechnology.co.uk
> t:01482 800981 f:01482 801078
>
>
>
>
>
> Questa e-mail è priva di virus e malware perché è attiva
la protezione
> avast! Antivirus .
logo
*
Massimo Manca*/, Micron Engineering/
via della Ferriera, 48 33170 Pordenone PN ITALIA
Tel: 39 0434 1856131| Mobile: 39 349 4504979
www.micronengineering.it
Twitter
LinkedIn
SlideShare
Contact me: Skype micron.engineering
Designed with WiseStamp -
Get
yours
---
Questa e-mail è priva di virus e malware perché è attiva la
protezione avast! Antivirus. http://www.avast.com
[Non-text portions of this message have been removed]
Posted by: "M. Manca"
Reply by "Tim...@sabretechnology.co.uk [lpc2000]"●July 2, 20142014-07-02
Hi, I've made a little SD card audio playback board for someone using
LPC1754. It all works fine and will play from any type and size of card.
The board can be connected as a USB mass storage device. However on Windows 7
only, some SD cards are not readable by the PC.
After much trawling through USB packets it appears that Windows is asking for
the wrong sector when it requests the boot sector.
On a working card, Windows requests Sector 0 (the partition table) lots of
times, then it requests 0x2000 bytes of data starting at the boot sector address
which it gets from the partition table. My working card has 0x0083 as the boot
sector address.
On a non working card, the boot sector start address is 0x0200, but when windows
requests the 0x2000 bytes of data it asks for sector 0x0000 again rather than
0x0200.
So it seems like Windows is not reading the higher byte of the start address.
This works fine on XP. Don't have any other windows versions to try. Anyone
have any further knowledge on this?