This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Keil EK-STM32F USBMem questions

Hi,

I've two question regarding to the Keil EK-STM32F USBMem example.

There's a DiskImg.c file where the bootsector, FAT12 etc is installed in an array.

const unsigned char DiskImage[MSC_ImageSize]

The size of the usb memory storage device is 30kByte according to the bootsector specifications. But where's the part in the whole code, where this memory size will be allocated?

Another short question about the FAT root directory: there's one example readme.txt file already installed in the DiskImage[] - but there are two root directory entries to this readme.txt....

Maybe someone could explain me why we need both of them?

//Readme TXT --> Archiv | Offset 0x32
0xE5,0x45,0x41,0x44,0x4D,0x45,0x20,0x20,0x54,0x58,0x54,0x20,0x00,0x00,0x00,0x00,
0x21,0x00,0xBB,0x32,0x00,0x00,0xDC,0x83,0xBB,0x32,0x02,0x00,0x57,0x00,0x00,0x00,

//second one

//README TXT --> Archiv | Offset 0x38
0x52,0x45,0x41,0x44,0x4D,0x45,0x20,0x20,0x54,0x58,0x54,0x20,0x00,0x87,0x99,0x71,
0x45,0x37,0xA9,0x38,0x00,0x00,0xD6,0x6E,0xA9,0x38,0x02,0x00,0x5F,0x00,0x00,0x00,

best regards
Harald