Flash memory has gained wide acceptance for its non-volatile storage, which is ideal for portable devices that may lose power, since the data is not lost when stored in the flash memory. Flash memories are constructed from electrically-erasable programmable read-only memory (EEPROM) cells.
Rather than use a randomly-addressable scheme such as is common with dynamic-random-access memory (DRAM), many flash memories use a block-based addressing where a command and an address are sent over the data bus and then a block of data is read or written. Since the data bus is also used to send commands and addresses, fewer pins are needed on the flash-memory chip, reducing cost. Thus flash memory is often used as a mass-storage device rather than a randomly-addressable device.
Universal-Serial-Bus (USB) has become a popular standard interface for connecting peripherals to a host such as a personal computer (PC). USB-based flash-memory storage devices or “drives” have been developed to transport data from one host to another, replacing floppy disks. While large external flash drives may be used, smaller USB flash drives known as key-chain or key drives have been a rapidly growing market.
A USB flash-memory device can be constructed from a microcontroller, a flash-memory controller or interface, and one or more flash-memory chips. A serial interface on the microcontroller connects to the USB bus to the host, and data from the serial interface is transferred through the microcontroller to the flash controller and then written to the flash-memory chips.
The microcontroller usually contains an internal ROM with a control program that is read by the internal central processing unit (CPU) of the microcontroller when the microcontroller is booted or powered up. Once initialized with the control program, the CPU can control data transfers between the serial interface and the flash controller.
Sometimes the user may desire to connect to more than one USB flash-memory device. The user can install a USB hub, and then plug the USB flash-memory devices into the USB hub's downstream ports. USB hubs allow one USB port on a host to fan out to multiple end USB devices or endpoints. A basic USB hub has a repeater that repeats data from the host to all down-stream devices, while more intelligent hubs based on the USB 2.0 standard can buffer data to different down-stream ports.
The parent application, now U.S. Pat. No. 7,103,684, disclosed a USB flash drive that did not need a read-only memory (ROM) for booting. The microcontroller in the USB flash drive was able to read boot code from the block-addressable flash memory and transfer the boot code to the microcontroller's RAM for execution.
Another popular bus standard is Multi-Media Card (MMC). An extension of MMC is known as Secure Digital (SD). MMC and SD flash devices are common today. It is desired to extend the ROM-less flash-memory-drive microcontroller of the parent application to MMC, SD, Memory Stick (MS) and other similar portable buses.
FIG. 1 shows a prior-art MMC flash controller that connects to multiple flash-memory devices. Host 10 includes MMC host controller 12 that generates transactions to MMC devices over MMC bus 18 using the MMC protocol. MMC controller 20 is connected to a cable containing MMC bus 18. MMC controller 20 fans out commands on MMC bus 18 to several downstream flash-memories that connect over additional bus segments.
Three flash-memory systems 14, 15, 16 are connected to MMC controller 20 by bus segments. Flash-memory system 14 can be accessed by MMC host controller 12 through MMC controller 20. Since MMC controller 20 passes all host transfers through to downstream devices, flash-memory system 15 is readable to host 10 as a second flash drive, while flash-memory system 16 is readable to the host as a third flash drive. Alternately, all three flash-memory systems 14, 15, 16 may appear to host 10 as a single memory.
Some board or device manufacturers may integrate MMC controller 20 together with flash-memory systems 14, 15, 16 on a single MMC flash card or box. However, this can be expensive when MMC flash-memory systems 14, 15, 16 are flash-memory chips, since each chip may have many pins. For example, a flash-memory chip with an 8-bit or 16-bit data bus may have 48 total pins. This can increase the size of the MMC flash device. Power consumption is higher due to the large number of data lines in the parallel buses to each flash-memory chip.
What is desired is to integrate a microcontroller with a flash-memory array. It is desired to have a wide internal bus from the microcontroller to the flash-memory array to improve the data bandwidth while having few external pins to reduce cost and required board space.
It is further desired to eliminate the internal ROM on the microcontroller. Instead of booting from the internal ROM, it is desired to use a control program stored in the flash-memory array. However, it is also desired to use a block-addressed rather than a randomly-addressable array for the flash storage.