MMC Interface 4GByte support limit

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

MMC Interface 4GByte support limit

376 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fweller on Tue Mar 01 12:12:12 MST 2016
We are trying to implement SD Cards with densities up to 32GByte (SDHC) but so far have seen a 4GByte maximum limit on what the MMC can support.

We are using the LPC43xx LPCOpen project usbd_rom_msc_ram
Documentation: http://docs.lpcware.com/usbromlib/v1.0/struct_u_s_b_d___m_s_c___i_n_i_t___p_a_r_a_m___t.html#details

It seems the original documentation on the MSC ROM API uses USBD_MSC_INIT_PARAM_T : MemorySize which is 32bits. This would limit the full support size to 4GB. However, looking at the current header file USDB_MSCUSER.H in the LPC_CHIP_43XX LPCOpen library (V2_12), I see at the end of the structure uint64_t MemorySize64; we assume this has been added so to support memory devices larger the 4GB. However we have found no documentation to support this member nor an example that uses it.

We are asking for clarification on how to support SD Cards with densities >4GBytes.
Should the MemorySize parameter be defined as 0 and then set the MemorySize64 to the actual size?
Are there any other initialization required?
Labels (1)
0 Kudos
3 Replies

325 Views
lpcware
NXP Employee
NXP Employee
bump
0 Kudos

325 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nsmith17044 on Mon Mar 07 05:29:20 MST 2016
Thanks for the details.  I wish the documentation was more clear on this topic.  The Rev 2.1 UM10503 doesn't reference any of this.
0 Kudos

325 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by DF9DQ on Fri Mar 04 09:39:19 MST 2016
What I can see from a quick look at the boot code seems in line with your observations.

The existing USB ROM code for the mass storage class does indeed limit the size of partitions to 4 GiB. This is due to the 32-bit MemorySize field as you have pointed out. Also callback functions use 32-bit offsets only.

The "USBD" code has been updated to support larger partitions, and the 64-bit MemorySize64 replaces the old 32-bit MemorySize. The header file in LPCOpen reflects this.

Quote:
Should the MemorySize parameter be defined as 0 and then set the MemorySize64 to the actual size?


Yes, this is how it works. Note that callback functions will take an additional parameter "high_offset" for the upper 32-bit of the 64-bit offset.

Unfortunately, existing devices with older ROM code don't support MemorySize64. This affects all flash based LPC1800 and LPC4300 devices, and older flashless devices in these two series. Only the latest flashless LPC18x0 and LPC43x0 have 64-bit support in the mass storage class implementation from boot code version 11.3 onwards.

Devices for which USBD exists as a library in LPCOpen (e.g. LPC17xx) support large disk sizes. However, a USBD library for LPC1800/LPC4300 is not (yet?) available.
0 Kudos