System and methods for accessing solid-state memory devices

The disclosure is directed to a method of determining memory parameters of a memory device. The method includes determining a communication protocol associated with the memory device, determining a page size of the memory device by using the communication protocol to communicate a page of data, determining a block size of the memory device by using the communication protocol to erase a block of the memory device, and determining a capacity of the memory device by using the communication protocol to determine a number of significant address bits.

FIELD OF THE DISCLOSURE

This disclosure, in general, is directed to systems and methods for accessing solid-state memory devices.

BACKGROUND

Increasingly, consumers are demanding portable electronic devices, such as personal digital assistants (PDA), MP3 players, portable storage systems, advanced wireless telephones, cameras, and other handheld devices. Traditional non-volatile storage mediums, such as hard drives, floppy drives and other storage devices, are generally unsuitable for portable devices. These typical devices generally have moving parts and, as such, are subject to mechanical failure. In addition, such devices are bulky and consume a large amount of energy. As a result, developers are turning to solid-state non-volatile memory devices, such as electrically erasable programmable read-only memory (EEPROM) and flash memory, for use in portable products.

To maintain compatibility with solid-state memory devices manufactured by various manufacturers using various device specifications and standards, electronic devices that access or include solid-state memory devices typically include a table of device parameters associated with each of the solid-state memory devices with which the electronic device is designed to be compatible. Given the large number of solid-state memory devices and device specifications for solid-state memory devices, such tables of device specifications may be large and occupy a considerable amount of memory on the electronic device. Moreover, these electronic devices may not be compatible with new memory devices manufactured using new device specifications and revised access parameters.

As such, an improved system and method for accessing solid-state memory devices would be desirable.

DESCRIPTION OF THE DRAWINGS

In a particular embodiment, the disclosure is directed to an electronic device including a controller or a processing system having an interface to a memory device. The controller or processing system includes a device driver and a register or storage location for memory device parameters. Memory device parameters are useful for accessing the memory device and typically include a page size, a block size, and an addressable memory space. In an exemplary embodiment, the device driver is configured to determine a command set or communication protocol useful in communicating with the memory device and to determine the device parameters, including a page size, a block size, and an addressable memory space using the command set to communicate with the memory device. In particular embodiments, the electronic device includes a thumb drive, an MP3 player, a cellular telephone, a personal digital assistant (PDA), a digital camera, or another portable electronic device.

In another particular embodiment, the disclosure is directed to a method of determining memory parameters of a memory device. The method includes determining a communication protocol associated with the memory device, determining a page size of the memory device by using the communication protocol to communicate a page of data, determining a block size of the memory device by using the communication protocol to erase a block of the memory device, and determining a capacity of the memory device by using the communication protocol to determine a number of significant address bits.

In another exemplary embodiment, the disclosure is directed to a method of performing data storage. The method includes selecting a first page size and writing test data to a storage device to a page location. The test data has the first page size. The method further includes reading results data from the storage device from the page location and determining whether the results data is correct.

In a further exemplary embodiment, the disclosure is directed to a method of performing data storage. The method includes writing test data to a storage device. The test data has a size at least equal to the block size of the storage device. The method further includes sending a command to the storage device to erase a block of data and includes reading data from the storage device to locate unerased data.

In addition, the disclosure is directed to a method of performing data storage. The method includes selecting an address. The address includes a set of column bits and a set of row bits. The method further includes determining whether the location indicated by the address is accessible and includes changing the address by incrementally shifting a row bit of the set of row bits in response to determining that the location is accessible.

The disclosure is also directed to a controller including a memory device descriptor and a device driver configured to access a memory device to determine a command protocol of the memory device. The device driver is configured to use the command protocol to write data to the memory device to determine a page size, a block size, and an address space associated with the memory device. The device driver is configured to manipulate the memory device descriptor based on the page size, the block size, and the address space and to communicate with the memory device based on the memory device descriptor.

FIG. 1includes an illustration of an exemplary system100that includes a controller104and a memory device106. The memory device106is responsive to the controller104. In addition, the system100may include a host device102in communication with the controller104. In one exemplary embodiment, the host device102is a remote device that communicates with the controller104via a serial interface, such as a universal serial bus (USB) interface. In another exemplary embodiment, the host102and controller104may form a portion of a system-on-a-chip that may be implemented in a combination of software and hardware.

Upon initialization of an electronic device or upon start up of the electronic device, the controller104is configured to access the memory device106and determine the device parameters associated with the memory device106. Such device parameters include, for example, the page size, the number of pages within a block, and the number of blocks on the memory device106. In addition, the device parameters may indicate which command set or communication protocol to use in communicating with the memory device106.

In one exemplary embodiment, illustrated inFIG. 2, a processing system or controller200includes a device driver202, a set of command sets204, and a register or storage location that stores device parameters206. The device driver202may be implemented in hardware, software, or a combination thereof. In general, the device driver202is configured to communicate with a memory device to read, write and erase data.

Upon start up of an electronic device including the processing system or controller200or upon initialization of the electronic device including initialization of the processing system or the controller200, the device driver202may determine the device parameters206by communicating with a memory device accessible to the device driver202. For example, the device driver202may attempt to communicate with the memory device using a command set from the set of command sets204. In one exemplary embodiment, the set of command sets204are implemented in software as part of the device driver202. When the command set selected by a device driver results in error free communication with the memory device, the command set may be used to communicate with the memory device to determine the device parameters206. However, when the selected command set does not function to establish communication with the memory device, the device driver202may select a subsequent command set form the set of command sets204until a command set is discovered that permits communication with the memory device or the set of command sets is exhausted.

In one exemplary embodiment, the device driver202is configured to read, write, and erase data from the memory device to determine the device parameters206. For example, the device driver may communicate a page of data with the memory device to determine a page size. In another exemplary embodiment, the device driver may erase a memory block of the memory device to determine a block size. In a further exemplary embodiment, the device driver202may write pages to incremented addresses to determine a capacity of the memory device.

FIG. 3includes an illustration of an exemplary method300for determining the device parameters associated with accessing a particular memory device. The method300includes determining a command set or communication protocol, as illustrated at302. For example, the device driver may select a command set from a set of command sets and attempt to communicate with the memory device using the selected command set. In one embodiment, the device driver attempts to access a manufacturer identification or a device identification. Successful reading of the manufacturer identification or the device identification may indicate that a compatible command set has been selected. In another exemplary embodiment, the device driver may attempt to read or write data using a selected command set or to perform another function associated with accessing the memory device using the selected command set. When a command set is found that successfully communicates with the memory device, parameters may be stored indicating which command set to use when communicating with the memory device. In an alternative embodiment, a manufacturer identification or a device identification may be used in conjunction with a table to determine the appropriate command set or communication protocol for use in communicating with the memory device.

The device driver determines a page size, as illustrated at304. For example, the device driver may select a page size and write data having a size equal to the selected page size to a specific address or location on the memory device. In one exemplary embodiment, the specific address or location on the memory device is the first page or page0of block0. To determine whether the write process was successful, the device driver may read data from the location to determine whether the data was written accurately. Subsequent page sizes may be selected for read, write and compare operations to determine a highest successful page size for the writing operation.

Once the page size has been determined, the device driver may attempt to determine the block size, as illustrated at306. For example, the device driver may write data to a specific location on the memory device and direct the memory device to erase a block. The device driver may read data from that location to determine a location of un-erased data and establish a block size using that location. In one exemplary embodiment, the location is the first memory block or block0.

The device driver may determine the capacity of the memory device based on the number of addressable pages and blocks or number of significant address bits, as illustrated at308. For example, the device driver may attempt to read data from increasingly higher addresses to determine a highest addressable address or highest significant address bit.

Once the device access parameters have been determined, the device driver may write a device descriptor or indicators of the device parameter to a register, as illustrated at310. During operation, the device driver may communicate with the memory device using the established command set and device parameters, as illustrated at312.

FIG. 4 and 5include illustrations of an exemplary method400/500for accessing a memory device. As illustrated inFIG. 4, a command set may be determined by selecting a command set or communication protocol from a set of command sets, as illustrated at402. In one exemplary embodiment, data is written to page zero, as illustrated at404, and the data is read from page zero, as illustrated at406. When the read/write operation is successful, as illustrated at408, the command set is determined. However, when the read/write operation is unsuccessful, a subsequent command set may be selected from the set of command sets, as illustrated at402. Alternatively, a command from the selected command set may be sent to the memory device and the success or failure of that command used to determine the command set.

Once the command set is determined, a page size of the memory device may be determined. For example, a page size may be selected, as illustrated at410. In an exemplary embodiment, the first page size selected may be the smallest page size compatible with the controller or processing system. Data may be written to a page location, such as page0of memory block0, having the specified or selected page size, as illustrated at412. The data written to the page location has a detectable pattern, such as all Is, all Os, or a list of primes. A command is sent to the memory device to read a page, as illustrated at414, and the data resulting from the read command is compared to the data written to the device. When no errors are detected, as illustrated at416, an increased page size is selected, as illustrated at410. However, when an error is detected, as illustrated at416, the page size is determined to be the previous page size that resulted in an error free write/read operation.

The block size may be determined by writing data to the memory device, as illustrated at418. The size of the data written to the memory device may be equal to the largest block size compatible with the processing system or controller. The data may be written to a specific location, such as starting with page0of memory block0and continuing until data having the selected size is written. In one embodiment, an erase command is issued to the electronic device to erase a block at the specified location, such as block zero, as illustrated at420. Data is read from the memory device starting with the specified location until non-erased data is encountered, as illustrated at422. The location of the non-erased or un-erased data provides an indication of the block size and, thus, the number of pages within a block. For example, the number of pages within a block is the total block size divided by the page size.

The capacity of the device may be determined, as illustrated by method500as illustrated inFIG. 5. For example, a number of significant address bits may be selected, as illustrated at524. In one exemplary embodiment, a first row bit is set to one and the system determines whether the location indicated by the first row bit is accessible or available, such as by attempting to read/write pages to an address indicated by that row bit. In one exemplary embodiment, a page is written to the address indicated by a one in the highest significant address bit, as illustrated at526, and the page at that location is read, as illustrated at528. When a failure does not occur, as illustrated at530, the highest significant address bit is shifted to a higher significant address bit, as illustrated at532.FIG. 6includes an illustration of exemplary address shifting useful in acquiring the highest significant address bit and, thus, in determining the capacity of a memory device. Typically, addresses are organized conceptually into a set of column bits and a set of row bits. Often, the set of column bits indicates a location or address within a page and the row bits address a block and page within the block. The first row bit may be selected, as illustrated at602. Upon incremental shifting, a higher significant address bit is selected, as illustrated at604. When read/write operations are successful, an even higher significant address bit is selected, as illustrated at606, and when a subsequent read/write operation is successful using the address illustrated at606, a higher significant address bit is selected, as illustrated at608.

Returning toFIG. 5, when the selected address is successful, a subsequent or higher significant address is selected and the page is written, as illustrated at526, and read, as illustrated at528, to determine whether the operation fails, as illustrated at530. When the read/write operation fails, a number of significant address bits are set to the highest successful significant address bit, as illustrated at534. The highest successful significant address bit is used to set the device parameters or descriptor, as illustrated at536. During operation, the electronic device may communicate with the memory device using the set of device parameters or the descriptor.

Particular embodiments of the illustrated system and method permit the determination of device access parameters without use of tables of device parameters that may occupy a significant amount of space on controllers and processing systems that are designed to be compatible with a large number of memory devices commercially available. As a result, particular embodiments of the illustrated system and methods reduce memory usage in controllers and processing systems.