LPC4350 - Mass Storage - problem with size over 4GB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC4350 - Mass Storage - problem with size over 4GB

822 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dmitry on Mon Sep 24 04:46:19 MST 2012
Hi
I use HITEX board and example USBDEV_ROM - USB to SD-card bridge (as USB storage).
But in USBD_API (USBD_MSC_INIT_PARAM::MemorySize) I can use size of starage only 4GB(max) - uint32_t.
Show me way for decision this limitation....

Labels (1)
0 Kudos
Reply
2 Replies

794 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Muis on Thu May 08 01:42:25 MST 2014
I have the same problem with the USB rom driver, however specifying 0xFFFFFFFF for .MemorySize when size > 2GB doesnt fix the problem in my case, Windows still prompts to format the card. Also manually replacing BlockCount and MemorySize with values from a 2 GB card doesnt help. Anyone else have any ideas?
0 Kudos
Reply

794 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dmitry on Mon Sep 24 22:38:00 MST 2012
Hello
I find solution. May be this will usefull for other users.

capacity = BlockSize * BlockSize

If  capacity < 4GB then
USBD_MSC_INIT_PARAM_T::MemorySize = capacity
USBD_MSC_INIT_PARAM_T::BlockSize = BlockSize
USBD_MSC_INIT_PARAM_T::BlockCount = BlockSize

If capacity over 4GB
USBD_MSC_INIT_PARAM_T::MemorySize = 0xFFFFFFFF
USBD_MSC_INIT_PARAM_T::BlockSize = BlockSize
USBD_MSC_INIT_PARAM_T::BlockCount = BlockSize
0 Kudos
Reply