US20030009607A1 - Method and system for programming a peripheral flash memory via an ide bus - Google Patents
Method and system for programming a peripheral flash memory via an ide bus Download PDFInfo
- Publication number
- US20030009607A1 US20030009607A1 US09/330,230 US33023099A US2003009607A1 US 20030009607 A1 US20030009607 A1 US 20030009607A1 US 33023099 A US33023099 A US 33023099A US 2003009607 A1 US2003009607 A1 US 2003009607A1
- Authority
- US
- United States
- Prior art keywords
- flash rom
- register
- host
- data
- pins
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
Definitions
- This invention relates to a computer control system, and more particularly to a method used in a system for programming a peripheral flash read-only memory (ROM) via an integrated device electronics (IDE) interface.
- ROM peripheral flash read-only memory
- IDE integrated device electronics
- the erasing of the flash EEPROM and the loading of the new control program are performed by the CPU in accordance with the rewrite program saved in the RAM.
- a small computer system interface (SCSI) connector or an AT attachment (ATA) connector are used to serve as an input/output (I/O) interface and perform a serial communication with the host computer by using unassigned pins of the connectors. Since the used interface is not a general interface, this method cannot generally applied in various types of computer mother boards.
- Other methods are also disclosed by U.S. Pat. Nos. 5,408,624 and 5,729,683 but they are complicate and also depends on different system type.
- FIG. 1 A compact-disk (CD) read-only-memory (ROM), or called CDROM, is an essential periphery device of the computer.
- a peripheral device, such as a CDROM, is used for descriptions as shown in FIG. 1.
- the system includes a microprocessor 100 , which serving as a controller is used to command all components, such as a servo 102 and a decoder 104 of a CDROM.
- the servo 102 is coupled to a CD 106 to read data stored in the CD 106 .
- the firmware code including, for example, a control program and other information is stored in a flash ROM 108 .
- the firmware code provides instructions for the microprocessor 100 to execute.
- the CDROM communicates with a host computer 110 through an IDE interface/bus.
- the Flash ROM should be firstly disconnected from the peripheral, then is put into the programming equipment to be re-programmed. After the new Firmware has been successfully written into Flash ROM, it can be plugged into the peripheral again. Due to these complicate process, the traditional method is very inconvenient. Moreover, after products have been shipped to end-users, the traditional method is unreasonable since most users have no programming equipment.
- the flash ROM can be directly programmed by a host computer without going through the programming equipment.
- the flash controller is independent to device hardware type.
- a method for programming a periphery flash ROM includes disabling other access to a flash ROM as a host computer requests to program or update a firmware code in the flash ROM.
- Several ATA task files in the host computer are redefined, in which the ATA task files usually are defined in ATA specification and are used as register-level communication interface between the host computer and an IDE periphery device.
- the firmware code from the host is transported through an IDE interface and then is written into the flash ROM through a programming control means, such as a flash controller.
- the flash controller interprets all IDE interface activities and issues a read/write flash ROM cycle.
- the flash controller provides a software method, a hardware method, or even a mixed method of software and hardware, to program the flash ROM.
- the firmware code is directly written into the flash ROM through the flash controller.
- the method uses a buffer, such as a RAM, to store the firmware code if more than one flash ROM cycles are needed in one request. Then, the firmware code stored in the buffer is sequentially written into the flash ROM through the flash controller.
- a system for programming a periphery flash ROM includes a host computer, an IDE interface, a flash controller, a flash ROM, and a microprocessor.
- the flash controller is coupled to the host computer through the IDE interface.
- the flash ROM and the microprocessor are also coupled to the flash controller.
- the task files return to their original definition.
- the microprocessor will be disabled to access to the flash ROM during the flash ROM programming mode. If several flash ROM programming cycles are needed in one host request, the firmware can be temporarily stored into a buffer, such as a RAM and then sequentially written into the flash ROM through the flash controller. Since the software method may occupy too much time of the IDE interface, resulting in a delay for the other subsequent activities, the hardware method may be a better way to update the firmware code, particularly to a large firmware code.
- FIG. 1 is system block diagram, schematically illustrating a conventional computer system with a periphery CDROM, which is controlled by a firmware code stored in a flash ROM;
- FIG. 2 is system block diagram, schematically illustrating a computer system used to program a flash ROM, which usually is used to store a firmware code to control a periphery device, according to a preferred embodiment of the invention
- FIG. 3 is a time sequence, schematically illustrating waveforms of several control bit signals in a task file to produce a software read cycle, according to the preferred embodiment of the invention.
- FIG. 4 is a time sequence, schematically illustrating waveforms of several control bit signals in a task file to produce a software write cycle, according to the preferred embodiment of the invention.
- a firmware code which is usually stored in a flash ROM and is used to control related periphery devices of a host computer, is often needed to be updated during development
- a conventional method to update the firmware is inconvenient and is also system-type dependent.
- an integrated device electronics (IDE) interface is generally used in periphery devices to communicate with a host computer.
- the invention provides a system using a flash controller to re-interpret all IDE bus activities and issues a read/write flash ROM cycle to directly program the flash ROM.
- FIG. 2 is system block diagram, schematically illustrating a computer system used to program a flash ROM, which usually is used to store a firmware code to control a periphery device, according to a preferred embodiment of the invention.
- a device system includes a microprocessor 200 , a flash ROM 202 , and a flash controller 204 .
- the system can communicate with a host computer 208 through an IDE interface.
- the system can further include a RAM 206 to serve as a buffer.
- the flash controller 204 is coupled to the host computer 208 through the IDE interface.
- the flash ROM 202 and the microprocessor 200 are also coupled to the flash controller 204 .
- the RAM 206 can be also coupled to the flash controller 204 .
- the system can be operated in a software cycle and a hardware cycle.
- the RAM 206 is needed to serve a buffer as the system is operated in a hardware cycle, in which several flash ROM cycles are needed in one request to update the flash ROM 202 .
- task files used in the IDE interface are redefined so that a firmware code from the host computer 208 is written into the flash ROM 202 through the flash controller 204 .
- the task files for example, are defined in ATA specification and are used as a register-level communication interface.
- the microprocessor 200 should stop access to the flash ROM 202 to avoid bus contention until the flash ROM 202 is completely programmed.
- the flash controller 204 disables the flash ROM programming function and all IDE activities are treated back to their original definition to perform a normal mode operation for the periphery device coupled to the microprocessor 200 like the CDROM in FIG. 1.
- the Host 208 whenever the host computer (Host) 208 makes a request to program the flash ROM 202 , the Host 208 writes a vendor-specific IDE command to inform the device system. The flash controller 204 then transfers subsequent IDE activities to flash ROM cycles so as to perform programming. Upon the completion of programming, the Host 208 writes another vendor-specific IDE command to inform the system or just reboot the system. Sequentially, the system returns to the normal mode.
- All flash ROM cycles issued by the flash controller 204 can be divided into two types. One is called a software cycle and the other one is called a hardware cycle. Both of them provide read and write functions as well.
- the Host 208 directly control the status of flash pins of the flash ROM 202 so as to generate proper waveforms used to read or write the flash ROM 202 .
- the ATA task files have been redefined to give the capability for the software cycle.
- All pins of the flash ROM 202 can be mapped into the bits of these four registers, in which if other flash ROM with different size is used, extra pins are necessary to be mapped as well. For example, if a 128k ⁇ 8 flash ROM is used, an extra pin A16 is needed to add into these four registers to provide the controllability on it. In this manner, the Host 208 can write them to set or clear these pins and construct read or write cycle waveform arbitrarily. The status of the pins can be also obtained by the Host 208 by reading these registers.
- DRV is defined to allow the Host 208 to decide whether to drive a data bus or not. It is to avoid a bus contention since a flash ROM data bus usually is bi-directional and both of the flash controller and the flash ROM can drive the data bus.
- write_ABUSLOW ( ????_????); // program desired write address write_ABUSHIGH( ????_????); // program desired write address write_CTL ( 0000_0110); // clear cs# write_CTL ( 0000_0100); // clear wr# write_DBUS ( ????_????); // program desired write data write_CTL ( 0000_1100); // set DRV and begin to drive data bus write_CTL ( 0000_1110); // set wr# write_CTL ( 0000_0110); // clear DRV and float data bus write_CTL ( 0000_0111); // set cs#
- Flash ROM's provide a command set to perform erase, chip identification, protect write, and so on. These commands are generally made up by reading/writing specific data to a specific address. Since the software cycles have more flexibility, they are useful for the Host 208 to issue the vendor-specific flash commands.
- the vendor-specific flash commands also includes a purpose to confirm the desired action so as to ensure the flash ROM 202 is exactly at the status for programming.
- the flash ROM 202 is programmed through a software cycle.
- the RAM 206 in FIG. 2 is not necessary to be used.
- the software cycle is only one of choices.
- a hardware method is also introduced.
- the software method of the intervention is used in the programming process to program the flash ROM 202 , the IDE interface is occupied. If the firmware code has a large size to be updated, it may take long, resulting in a delay for the subsequent other IDE activities and a reduction of the system performance.
- a hardware method is introduced to further solve this problem. In the perspective of efficiency, hardware cycles may provide another better method when burst transfer is required.
- the firmware code are transferred to the flash ROM 202 by two steps.
- the first step is that the Host 208 first writes data, such as the firmware code, into the RAM 206 through the flash controller 204 .
- the RAM 206 serves as a buffer.
- the flash controller 204 then transfers the buffered data in the RAM 206 into the flash ROM 202 in the second step.
- the first step is that the flash controller 204 reads data from the flash ROM 202 and stores them in the RAM 206 , then the Host 208 can read data from the RAM 206 in the second step.
- the Host 208 When the Host 208 wants to initiate the hardware write cycle, it firstly write the command/status register to initiate an IDE hardware write command, which is one of the vendor-specific IDE commands. After receiving the command, the system sets the BSY bit and clears the DRQ bit, as shown in table 2, to indicate that it is at the busy state and no data transfer is requested. The system the is preparing for transferring data from the Host 208 . At the meantime, the Host can process other tasks. As soon as it is ready, the BSY bit is cleared and the DRQ bit is set, then an IDE interrupt is issued to inform the Host 208 .
- IDE hardware write command which is one of the vendor-specific IDE commands.
- the Host 208 polls the STATUS register, if the result is that the BSY bit is cleared and the DRQ bit is set, the Host 208 starts to write data into the DATA register and the data are stored into the RAM 206 through the flash controller 204 .
- the system receives data of bytes specified in LENGTH register, it clears the DRQ bit and sets the BSY bit again to inform the Host 208 to stop sending data.
- the flash controller 204 automatically starts to issue subsequent write cycles and writes the data stored in the RAM 206 into the flash ROM 202 .
- the device system clears the BSY bit and finishes the hardware write cycle.
- the Host 208 needs to give the initial value to the ADDRL (ABUSLOW) and ADDRH (ABUSHIGH) registers in the task file serving as a starting address before initiating the IDE hardware write command.
- the flash controller 204 is responsible to increase it after every successful data transferring.
- the Host 208 when the Host 208 wants to initiate the hardware read cycle, it firstly write the command/status register to initiate an IDE hardware read command which is one of the vendor-specific IDE commands. After receiving the command, the device system sets the BSY bit and clears the DRQ bit, then starts to issue read cycles to the flash ROM 202 and stores data from the flash ROM 202 into the RAM 206 . The LENGTH register decides how many bytes of data are to be transferred. Upon the completion, the device system clears the BSY bit and sets the DRQ bit to request the Host 208 to read data on the RAM 206 through the DATA register.
- the device system clears the BSY bit and the DRQ bit.
- the hardware read cycle then is accomplished. It is noted that the Host 208 must give initial values to the ADDRL and ADDRH registers to serves as a starting address before issuing the IDE hardware read command.
- the flash controller 204 is responsible to increase it after every successful data transferring.
- PROGRAMMING_FLASH_ON used to switch the system to the flash ROM programming mode
- PROGRAMMING_FLASH_OFF used to switch the system to the flash ROM programming mode
- Host can use the register to control the status of the pins. ABUSLOW “Address Bus Low” mapped to Flash ROM pins of address bus low byte. Host can use the register to control the status of the pins. ABUSHIGH “Address Bus High” mapped to Flash ROM pins of address bus high byte. Host can use the register to control the status of the pins. DRIVE SELECT “Drive Select”. Host writes the register to select IDE devices. It has the same definition in ATA specification. COMMAND/ “Command/Status”. Host writes the register to issue an STATUS ATA command and reads the register to obtain the device status. It has the same definition in ATA specification.
- the flash ROM 202 can be directly programmed to update, for example, a firmware code through the IDE interface by simply redefining the registers of the ATA task files used by the IDE interface. There is no need to go through a route inside the periphery device.
- the programming process can be achieved by a software method or a hardware method, or even by a mixed method of those two.
- the software method includes one step that the host directly reads or writes the flash ROM through the redefined ATA task files.
- the hardware method includes two steps that data transferred between the HOST and the flash ROM are first stored into a buffer, such as a RAM, and then the data on the RAM are written into the flash ROM for a write cycle, or are read by the Host.
- the IDE interface is released for other uses after data are temporarily stored into the RAM.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Read Only Memory (AREA)
Abstract
Description
- 1. Field of the Invention
- This invention relates to a computer control system, and more particularly to a method used in a system for programming a peripheral flash read-only memory (ROM) via an integrated device electronics (IDE) interface.
- 2. Description of Related Art
- Recently, computer industry has been rapidly developed. Its various periphery hardware devices are also accordingly developed. As the computer system is continuously developing, in order to satisfy some new developed specifications or protocols or improve the compatibility with other devices, various related firmware codes are necessary to be updated. This results in that a lot of firmware data/code to control the periphery devices are necessary to be frequently read or updated. The firmware code generally is stored in a flash ROM. The computer system needs a method to be able to rapidly and conveniently program the flash ROM so as to update the firmware code/data.
- Currently, several methods are used by a computer system to read the firmware code stored in the flash ROM. In a system disclosed by U.S. Pat. No. 5,603,056, a control program for controlling a hard disk drive (HDD) and a rewrite program for rewriting the control program are stored together in an electrically erasable programmable ROM (EEPROM). Upon entering the rewrite mode, a central processing unit (CPU) in the HDD saves the control program in the flash EEPROM into a random access memory (RAM). The CPU erases the flash EEPROM and restores the rewrite program of the RAM in to the flash EEPROM. The CPU receives a new control program from a host computer and loads it in the flash EEPROM. The erasing of the flash EEPROM and the loading of the new control program are performed by the CPU in accordance with the rewrite program saved in the RAM. In this conventional manner, a small computer system interface (SCSI) connector or an AT attachment (ATA) connector are used to serve as an input/output (I/O) interface and perform a serial communication with the host computer by using unassigned pins of the connectors. Since the used interface is not a general interface, this method cannot generally applied in various types of computer mother boards. Other methods are also disclosed by U.S. Pat. Nos. 5,408,624 and 5,729,683 but they are complicate and also depends on different system type.
- Another conventional system using the IDE interface to update firmware code stored in a flash ROM is also proposed. Since the IDE interface is generally used in various periphery devices, the method can have loose restriction. A compact-disk (CD) read-only-memory (ROM), or called CDROM, is an essential periphery device of the computer. A peripheral device, such as a CDROM, is used for descriptions as shown in FIG. 1. In FIG. 1, the system includes a
microprocessor 100, which serving as a controller is used to command all components, such as aservo 102 and adecoder 104 of a CDROM. Theservo 102 is coupled to aCD 106 to read data stored in theCD 106. The firmware code including, for example, a control program and other information is stored in aflash ROM 108. The firmware code provides instructions for themicroprocessor 100 to execute. The CDROM communicates with ahost computer 110 through an IDE interface/bus. When the Firmware stored in Flash ROM needs to be updated. In the traditional method, the Flash ROM should be firstly disconnected from the peripheral, then is put into the programming equipment to be re-programmed. After the new Firmware has been successfully written into Flash ROM, it can be plugged into the peripheral again. Due to these complicate process, the traditional method is very inconvenient. Moreover, after products have been shipped to end-users, the traditional method is unreasonable since most users have no programming equipment. - It is at least an objective of the present invention to provide a method for a computer system to program a flash ROM, which is usually used to store a firmware code, through redefining an ATA task files with respect to an IDE interface. The flash ROM can be directly programmed by a host computer without going through the programming equipment.
- It is at least another objective of the present invention to provide a flash controller, which can directly communicate with a host computer through an IDE interface and directly program the flash ROM. The flash controller is independent to device hardware type.
- In accordance with the foregoing and other objectives of the present invention, a method for programming a periphery flash ROM is provided. The method includes disabling other access to a flash ROM as a host computer requests to program or update a firmware code in the flash ROM. Several ATA task files in the host computer are redefined, in which the ATA task files usually are defined in ATA specification and are used as register-level communication interface between the host computer and an IDE periphery device. The firmware code from the host is transported through an IDE interface and then is written into the flash ROM through a programming control means, such as a flash controller. The flash controller interprets all IDE interface activities and issues a read/write flash ROM cycle. The flash controller provides a software method, a hardware method, or even a mixed method of software and hardware, to program the flash ROM. For the software method the firmware code is directly written into the flash ROM through the flash controller. For the hardware method, the method uses a buffer, such as a RAM, to store the firmware code if more than one flash ROM cycles are needed in one request. Then, the firmware code stored in the buffer is sequentially written into the flash ROM through the flash controller.
- In accordance with the foregoing and other objectives of the present invention, a system for programming a periphery flash ROM is provided. The system includes a host computer, an IDE interface, a flash controller, a flash ROM, and a microprocessor. The flash controller is coupled to the host computer through the IDE interface. The flash ROM and the microprocessor are also coupled to the flash controller. When the system enters a flash ROM programming mode, task files used in the IDE interface are redefined Subsequently, all activities to read/write task files by the host computer will be interpreted with new definitions by the flash controller so that a firmware code from the host computer is written into the flash ROM through the flash controller. After the flash ROM is completely programmed, the task files return to their original definition. The microprocessor will be disabled to access to the flash ROM during the flash ROM programming mode. If several flash ROM programming cycles are needed in one host request, the firmware can be temporarily stored into a buffer, such as a RAM and then sequentially written into the flash ROM through the flash controller. Since the software method may occupy too much time of the IDE interface, resulting in a delay for the other subsequent activities, the hardware method may be a better way to update the firmware code, particularly to a large firmware code.
- The invention can be more fully understood by reading the following detailed description of the preferred embodiment, with reference made to the accompanying drawings as follows:
- FIG. 1 is system block diagram, schematically illustrating a conventional computer system with a periphery CDROM, which is controlled by a firmware code stored in a flash ROM;
- FIG. 2 is system block diagram, schematically illustrating a computer system used to program a flash ROM, which usually is used to store a firmware code to control a periphery device, according to a preferred embodiment of the invention;
- FIG. 3 is a time sequence, schematically illustrating waveforms of several control bit signals in a task file to produce a software read cycle, according to the preferred embodiment of the invention; and
- FIG. 4 is a time sequence, schematically illustrating waveforms of several control bit signals in a task file to produce a software write cycle, according to the preferred embodiment of the invention.
- A firmware code, which is usually stored in a flash ROM and is used to control related periphery devices of a host computer, is often needed to be updated during development A conventional method to update the firmware is inconvenient and is also system-type dependent.
- Since an integrated device electronics (IDE) interface is generally used in periphery devices to communicate with a host computer. The invention provides a system using a flash controller to re-interpret all IDE bus activities and issues a read/write flash ROM cycle to directly program the flash ROM.
- FIG. 2 is system block diagram, schematically illustrating a computer system used to program a flash ROM, which usually is used to store a firmware code to control a periphery device, according to a preferred embodiment of the invention. A device system includes a
microprocessor 200, aflash ROM 202, and aflash controller 204. The system can communicate with ahost computer 208 through an IDE interface. The system can further include aRAM 206 to serve as a buffer. Theflash controller 204 is coupled to thehost computer 208 through the IDE interface. Theflash ROM 202 and themicroprocessor 200 are also coupled to theflash controller 204. TheRAM 206 can be also coupled to theflash controller 204. As is to be described later in detail, the system can be operated in a software cycle and a hardware cycle. TheRAM 206 is needed to serve a buffer as the system is operated in a hardware cycle, in which several flash ROM cycles are needed in one request to update theflash ROM 202. - When the system enters a flash ROM programming mode, task files used in the IDE interface are redefined so that a firmware code from the
host computer 208 is written into theflash ROM 202 through theflash controller 204. The task files, for example, are defined in ATA specification and are used as a register-level communication interface. Themicroprocessor 200 should stop access to theflash ROM 202 to avoid bus contention until theflash ROM 202 is completely programmed. Normally, after theflash ROM 202 is completely programmed, theflash controller 204 disables the flash ROM programming function and all IDE activities are treated back to their original definition to perform a normal mode operation for the periphery device coupled to themicroprocessor 200 like the CDROM in FIG. 1. - In detail, whenever the host computer (Host)208 makes a request to program the
flash ROM 202, theHost 208 writes a vendor-specific IDE command to inform the device system. Theflash controller 204 then transfers subsequent IDE activities to flash ROM cycles so as to perform programming. Upon the completion of programming, theHost 208 writes another vendor-specific IDE command to inform the system or just reboot the system. Sequentially, the system returns to the normal mode. - All flash ROM cycles issued by the
flash controller 204 can be divided into two types. One is called a software cycle and the other one is called a hardware cycle. Both of them provide read and write functions as well. In the software cycle, theHost 208 directly control the status of flash pins of theflash ROM 202 so as to generate proper waveforms used to read or write theflash ROM 202. The ATA task files have been redefined to give the capability for the software cycle. - For example, four registers in ATA task files are re-defined as shown in table 1.
TABLE 1 NAME 7 6 5 4 3 2 1 0 CTL — — — — DRV OE# WR# CS# DBUS DQ7 DQ6 DQ5 DQ4 DQ3 DQ2 DQ1 DQ0 ABUSLOW A7 A6 A4 A4 A3 A2 A1 A0 ABUSHIGH A15 A14 A13 A12 A11 A10 A9 A8 - All pins of the
flash ROM 202, such as a 64K×8 flash ROM, can be mapped into the bits of these four registers, in which if other flash ROM with different size is used, extra pins are necessary to be mapped as well. For example, if a 128k×8 flash ROM is used, an extra pin A16 is needed to add into these four registers to provide the controllability on it. In this manner, theHost 208 can write them to set or clear these pins and construct read or write cycle waveform arbitrarily. The status of the pins can be also obtained by theHost 208 by reading these registers. In Bit 3 of CTL register, DRV is defined to allow theHost 208 to decide whether to drive a data bus or not. It is to avoid a bus contention since a flash ROM data bus usually is bi-directional and both of the flash controller and the flash ROM can drive the data bus. - The following sequence shows how the
Host 208 to program those four registers to generate a software read cycle with the waveform shown in FIG. 3.// assume all Flash related pins have been the inactive state, // i.e., cs# = high, oe# = high, wr# = high, and // data pins are left floating. write_ABUSLOW( ????_????); // program desired read address write_ABUSHIGH( ????_????); // program desired read address write_CTL (0000_0110); // clear cs# write_CTL (0000_0010); // clear oe# // wait for Flash ROM access time . . . ReadBackData = read_DBUS; write_CTL (0000_0110); // set oe# write_CTL (0000_0111); // set cs# - Similarly, the following sequence shows how the
Host 208 to program those four registers to generate a software write cycle with the waveform shown in FIG. 4.// assume all Flash pins have been the inactive state, // i.e., cs# = high, oe# = high, wr# = high, and // data pins are left floating. write_ABUSLOW( ????_????); // program desired write address write_ABUSHIGH( ????_????); // program desired write address write_CTL ( 0000_0110); // clear cs# write_CTL ( 0000_0100); // clear wr# write_DBUS ( ????_????); // program desired write data write_CTL ( 0000_1100); // set DRV and begin to drive data bus write_CTL ( 0000_1110); // set wr# write_CTL ( 0000_0110); // clear DRV and float data bus write_CTL ( 0000_0111); // set cs# - Most Flash ROM's provide a command set to perform erase, chip identification, protect write, and so on. These commands are generally made up by reading/writing specific data to a specific address. Since the software cycles have more flexibility, they are useful for the
Host 208 to issue the vendor-specific flash commands. The vendor-specific flash commands also includes a purpose to confirm the desired action so as to ensure theflash ROM 202 is exactly at the status for programming. - In the above descriptions, the
flash ROM 202 is programmed through a software cycle. TheRAM 206 in FIG. 2 is not necessary to be used. In the invention, the software cycle is only one of choices. Even though the method to program theflash ROM 202 through the software method has advantages of the invention, a hardware method is also introduced. When the software method of the intervention is used in the programming process to program theflash ROM 202, the IDE interface is occupied. If the firmware code has a large size to be updated, it may take long, resulting in a delay for the subsequent other IDE activities and a reduction of the system performance. A hardware method is introduced to further solve this problem. In the perspective of efficiency, hardware cycles may provide another better method when burst transfer is required. - In FIG. 2, for the hardware cycles, the firmware code are transferred to the
flash ROM 202 by two steps. For example, in hardware write cycles, the first step is that theHost 208 first writes data, such as the firmware code, into theRAM 206 through theflash controller 204. TheRAM 206 serves as a buffer. Theflash controller 204 then transfers the buffered data in theRAM 206 into theflash ROM 202 in the second step. In Hardware read cycles, the first step is that theflash controller 204 reads data from theflash ROM 202 and stores them in theRAM 206, then theHost 208 can read data from theRAM 206 in the second step. - Two vendor-specific IDE commands are respectively defined for the hardware read cycle and the hardware write cycle. Moreover, three registers in the ATA task files are used as listed in table 2:
TABLE 2 NAME 7 6 5 4 3 2 1 0 DATA DATA PORT LENGTH L7 L6 L5 L4 L3 L2 L1 L0 COMMAND/STATUS BSY — — — DRQ — — — - When the
Host 208 wants to initiate the hardware write cycle, it firstly write the command/status register to initiate an IDE hardware write command, which is one of the vendor-specific IDE commands. After receiving the command, the system sets the BSY bit and clears the DRQ bit, as shown in table 2, to indicate that it is at the busy state and no data transfer is requested. The system the is preparing for transferring data from theHost 208. At the meantime, the Host can process other tasks. As soon as it is ready, the BSY bit is cleared and the DRQ bit is set, then an IDE interrupt is issued to inform theHost 208. When theHost 208 polls the STATUS register, if the result is that the BSY bit is cleared and the DRQ bit is set, theHost 208 starts to write data into the DATA register and the data are stored into theRAM 206 through theflash controller 204. When the system receives data of bytes specified in LENGTH register, it clears the DRQ bit and sets the BSY bit again to inform theHost 208 to stop sending data. Then, theflash controller 204 automatically starts to issue subsequent write cycles and writes the data stored in theRAM 206 into theflash ROM 202. As the data transferring accomplishes, the device system clears the BSY bit and finishes the hardware write cycle. It must be noted that theHost 208 needs to give the initial value to the ADDRL (ABUSLOW) and ADDRH (ABUSHIGH) registers in the task file serving as a starting address before initiating the IDE hardware write command. Theflash controller 204 is responsible to increase it after every successful data transferring. - Similarly, when the
Host 208 wants to initiate the hardware read cycle, it firstly write the command/status register to initiate an IDE hardware read command which is one of the vendor-specific IDE commands. After receiving the command, the device system sets the BSY bit and clears the DRQ bit, then starts to issue read cycles to theflash ROM 202 and stores data from theflash ROM 202 into theRAM 206. The LENGTH register decides how many bytes of data are to be transferred. Upon the completion, the device system clears the BSY bit and sets the DRQ bit to request theHost 208 to read data on theRAM 206 through the DATA register. After theHost 208 reads all data, the device system clears the BSY bit and the DRQ bit. The hardware read cycle then is accomplished. It is noted that theHost 208 must give initial values to the ADDRL and ADDRH registers to serves as a starting address before issuing the IDE hardware read command. Theflash controller 204 is responsible to increase it after every successful data transferring. - In summary, four vendor-specific IDE commands are added in the architecture of the invention and five registers in the ATA task files are re-defined when system enters Flash ROM programming mode. The new-added commands are listed as follows:
- PROGRAMMING_FLASH_ON, used to switch the system to the flash ROM programming mode;
- PROGRAMMING_FLASH_OFF, used to switch the system to the flash ROM programming mode;
- HARDWARE_WRITE, used to trigger the write cycle; and
- HARDWARE_READ, used to trigger the read cycle,
- where the last two are just for the hardware cycle. All ATA task files with their definition in flash ROM programming mode is described in the following table, in which the five registers LENGTH, CTL, DBUS, ABUSLOW, and ABUSHIGH are redefined.
TABLE 3 NAME DESCRIPTION DATA “Data Port”. It is used as data port and have the same definition in ATA specification. LENGTH “Transfer Length”. The register specifies the transfer byte count in Hardware cycles. CTL “Control” mapped to Flash ROM pins of cs#, wr#, and oe#. Host can use the register to control the status of the pins. DBUS “Data Bus” mapped to Flash ROM pins of data bus. Host can use the register to control the status of the pins. ABUSLOW “Address Bus Low” mapped to Flash ROM pins of address bus low byte. Host can use the register to control the status of the pins. ABUSHIGH “Address Bus High” mapped to Flash ROM pins of address bus high byte. Host can use the register to control the status of the pins. DRIVE SELECT “Drive Select”. Host writes the register to select IDE devices. It has the same definition in ATA specification. COMMAND/ “Command/Status”. Host writes the register to issue an STATUS ATA command and reads the register to obtain the device status. It has the same definition in ATA specification. - In the manner of the invention, the
flash ROM 202 can be directly programmed to update, for example, a firmware code through the IDE interface by simply redefining the registers of the ATA task files used by the IDE interface. There is no need to go through a route inside the periphery device. The programming process can be achieved by a software method or a hardware method, or even by a mixed method of those two. The software method includes one step that the host directly reads or writes the flash ROM through the redefined ATA task files. - The hardware method includes two steps that data transferred between the HOST and the flash ROM are first stored into a buffer, such as a RAM, and then the data on the RAM are written into the flash ROM for a write cycle, or are read by the Host. The IDE interface is released for other uses after data are temporarily stored into the RAM.
- The invention has been described using an exemplary preferred embodiment. However, it is to be understood that the scope of the invention is not limited to the disclosed embodiment. On the contrary, it is intended to cover various modifications and similar arrangements. The scope of the claims, therefore, should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.
Claims (18)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US09/330,230 US6507881B1 (en) | 1999-06-10 | 1999-06-10 | Method and system for programming a peripheral flash memory via an IDE bus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US09/330,230 US6507881B1 (en) | 1999-06-10 | 1999-06-10 | Method and system for programming a peripheral flash memory via an IDE bus |
Publications (2)
Publication Number | Publication Date |
---|---|
US20030009607A1 true US20030009607A1 (en) | 2003-01-09 |
US6507881B1 US6507881B1 (en) | 2003-01-14 |
Family
ID=23288852
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US09/330,230 Expired - Lifetime US6507881B1 (en) | 1999-06-10 | 1999-06-10 | Method and system for programming a peripheral flash memory via an IDE bus |
Country Status (1)
Country | Link |
---|---|
US (1) | US6507881B1 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20010052048A1 (en) * | 2000-06-08 | 2001-12-13 | Kaneo Watanabe | Controller and data processing system |
US20060026462A1 (en) * | 2004-07-07 | 2006-02-02 | Hon Hai Precision Industry Co., Ltd. | Apparatus for recovering BIOS in computer system |
US20150186049A1 (en) * | 2013-12-31 | 2015-07-02 | Freescale Semiconductor, Inc. | System and method for low cost patching of high voltage operation memory space |
CN111208988A (en) * | 2019-12-24 | 2020-05-29 | 杭州海兴电力科技股份有限公司 | Single-chip microcomputer file system compiling method and single-chip microcomputer system |
Families Citing this family (27)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6633933B1 (en) * | 1999-09-30 | 2003-10-14 | Oak Technology, Inc. | Controller for ATAPI mode operation and ATAPI driven universal serial bus mode operation and methods for making the same |
US6874044B1 (en) * | 2003-09-10 | 2005-03-29 | Supertalent Electronics, Inc. | Flash drive/reader with serial-port controller and flash-memory controller mastering a second RAM-buffer bus parallel to a CPU bus |
US7228538B1 (en) * | 2000-05-02 | 2007-06-05 | International Business Machines Corporation | Method, system, and program for updating firmware to a storage system comprised of multiple controllers |
JP2004536405A (en) * | 2001-07-16 | 2004-12-02 | ユキング レン | Embedded software update system |
JP2003114808A (en) * | 2001-10-04 | 2003-04-18 | Alps Electric Co Ltd | Transmitting and receiving unit for data transfer and method for updating program in the same |
US20030217357A1 (en) * | 2002-05-14 | 2003-11-20 | Parry Travis J. | Monitoring firmware |
TWI220225B (en) * | 2003-01-03 | 2004-08-11 | Mediatek Inc | Control chip for optical disk drive and method for updating the firmware in the control chip |
US7831740B2 (en) * | 2003-03-10 | 2010-11-09 | Samsung Electronics Co., Ltd. | Method and circuit for programming electronic devices |
US7155562B2 (en) * | 2003-05-08 | 2006-12-26 | Micron Technology, Inc. | Method for reading while writing to a single partition flash memory |
JP2005038382A (en) * | 2003-06-26 | 2005-02-10 | Sanyo Electric Co Ltd | Control device and data writing method |
JP2005071560A (en) * | 2003-08-01 | 2005-03-17 | Sanyo Electric Co Ltd | Controller and method for writing data |
US7010360B2 (en) * | 2003-11-20 | 2006-03-07 | International Business Machines Corporation | Automatic conversion of dates and times for messaging |
US7103687B2 (en) * | 2003-12-22 | 2006-09-05 | Hewlett-Packard Development Company, L.P. | System and method for providing an image file in a computer system |
US7197634B2 (en) * | 2004-01-16 | 2007-03-27 | Dell Products L.P. | System and method for updating device firmware |
TWI237761B (en) * | 2004-04-09 | 2005-08-11 | Mediatek Inc | Method for updating a firmware code stored in a non-volatile memory and related device |
US20050268029A1 (en) * | 2004-05-25 | 2005-12-01 | Chih-Chiang Wen | Optical Disc Drive that Downloads Operational Firmware from an External Host |
US20050265266A1 (en) * | 2004-05-25 | 2005-12-01 | Chih-Chiang Wen | Optical disc drive that downloads operational firmware from an external host |
US7269829B2 (en) * | 2004-07-30 | 2007-09-11 | Signature Control Systems, Inc. | Method and system for remote update of microprocessor code for irrigation controllers |
JP2006244129A (en) * | 2005-03-03 | 2006-09-14 | Denso Corp | Flash eeprom rewriting method and electronic control unit |
TW200636471A (en) * | 2005-04-01 | 2006-10-16 | Mediatek Inc | Method of parallel programmable memory and the system thereof |
US20070005813A1 (en) * | 2005-07-04 | 2007-01-04 | Jih-Liang Juang | Peripheral device and method for interpreting redefined frame information structure |
US7602655B2 (en) * | 2006-01-12 | 2009-10-13 | Mediatek Inc. | Embedded system |
US7617353B2 (en) * | 2006-01-19 | 2009-11-10 | Silicon Motion Inc. | Flash memory circuit for supporting an IDE apparatus |
TWI325561B (en) * | 2006-11-23 | 2010-06-01 | Ite Tech Inc | Embedded controller and computer system using the same |
US10394570B2 (en) | 2010-02-26 | 2019-08-27 | Hp Printing Korea Co., Ltd. | Method of generating boot image for fast booting and image forming apparatus for performing the method, and method of performing fast booting and image forming apparatus for performing the method |
US20130042097A1 (en) * | 2010-02-26 | 2013-02-14 | Samsung Electronics Co., Ltd. | Method of updating boot image for fast booting and image forming apparatus for performing the method |
KR101959359B1 (en) | 2012-11-06 | 2019-03-18 | 에이치피프린팅코리아 유한회사 | Method for updating boot image for fast booting and image forming apparatus for performing the same |
Family Cites Families (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5261114A (en) * | 1990-11-09 | 1993-11-09 | Ast Research, Inc. | Method and apparatus for providing down-loaded instructions for execution by a peripheral controller |
US5446877A (en) * | 1990-11-13 | 1995-08-29 | Nakamichi Peripherals Corporation | Method and apparatus for operation of a data archival apparatus allowing for coupling of the data archival device with an ide interface |
US5663901A (en) * | 1991-04-11 | 1997-09-02 | Sandisk Corporation | Computer memory cards using flash EEPROM integrated circuit chips and memory-controller systems |
FR2700056B1 (en) * | 1992-12-31 | 1995-02-10 | Sgs Thomson Microelectronics | Method for uniform field programming of an electrically programmable memory and memory implementing the method. |
US5459850A (en) * | 1993-02-19 | 1995-10-17 | Conner Peripherals, Inc. | Flash solid state drive that emulates a disk drive and stores variable length and fixed lenth data blocks |
JP3310060B2 (en) * | 1993-09-13 | 2002-07-29 | 株式会社東芝 | Storage device and control program rewriting method for the same |
US5701450A (en) * | 1994-02-25 | 1997-12-23 | Seagate Technology, Inc. | System including ATA sequencer microprocessor which executes sequencer instructions to handle plurality of real-time events allowing to perform all operations without local microprocessor intervention |
US5675761A (en) * | 1994-05-16 | 1997-10-07 | International Business Machines Corporation | Method and system for providing discontiguous drive support |
US5661848A (en) * | 1994-09-08 | 1997-08-26 | Western Digital Corp | Multi-drive controller with encoder circuitry that generates ECC check bytes using the finite field for optical data for appending to data flowing to HDA |
US5696931A (en) * | 1994-09-09 | 1997-12-09 | Seagate Technology, Inc. | Disc drive controller with apparatus and method for automatic transfer of cache data |
US5664156A (en) * | 1994-09-16 | 1997-09-02 | Philips Electronics North America Corporation | Microcontroller with a reconfigurable program status word |
US5729683A (en) * | 1995-05-18 | 1998-03-17 | Compaq Computer Corporation | Programming memory devices through the parallel port of a computer system |
US5784390A (en) * | 1995-06-19 | 1998-07-21 | Seagate Technology, Inc. | Fast AtA-compatible drive interface with error detection and/or error correction |
US5761460A (en) * | 1996-07-19 | 1998-06-02 | Compaq Computer Corporation | Reconfigurable dual master IDE interface |
US5805882A (en) * | 1996-07-19 | 1998-09-08 | Compaq Computer Corporation | Computer system and method for replacing obsolete or corrupt boot code contained within reprogrammable memory with new boot code supplied from an external source through a data port |
US5920884A (en) * | 1996-09-24 | 1999-07-06 | Hyundai Electronics America, Inc. | Nonvolatile memory interface protocol which selects a memory device, transmits an address, deselects the device, subsequently reselects the device and accesses data |
TW344059B (en) * | 1997-06-14 | 1998-11-01 | Winbond Electronics Corp | Method and device for carrying out updating firmware of CD-ROM driver through ATA/IDE interface |
JP3562563B2 (en) * | 1998-06-12 | 2004-09-08 | ティアック株式会社 | Data storage device using exchangeable recording medium |
JP3593460B2 (en) * | 1998-07-29 | 2004-11-24 | 富士通株式会社 | Memory card |
US6170043B1 (en) * | 1999-01-22 | 2001-01-02 | Media Tek Inc. | Method for controlling an optic disk |
-
1999
- 1999-06-10 US US09/330,230 patent/US6507881B1/en not_active Expired - Lifetime
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20010052048A1 (en) * | 2000-06-08 | 2001-12-13 | Kaneo Watanabe | Controller and data processing system |
US7024513B2 (en) * | 2000-06-08 | 2006-04-04 | Sanyo Electric Co., Ltd. | Controller and data processing system |
US20060026462A1 (en) * | 2004-07-07 | 2006-02-02 | Hon Hai Precision Industry Co., Ltd. | Apparatus for recovering BIOS in computer system |
US20150186049A1 (en) * | 2013-12-31 | 2015-07-02 | Freescale Semiconductor, Inc. | System and method for low cost patching of high voltage operation memory space |
US9690571B2 (en) * | 2013-12-31 | 2017-06-27 | Nxp Usa, Inc. | System and method for low cost patching of high voltage operation memory space |
CN111208988A (en) * | 2019-12-24 | 2020-05-29 | 杭州海兴电力科技股份有限公司 | Single-chip microcomputer file system compiling method and single-chip microcomputer system |
Also Published As
Publication number | Publication date |
---|---|
US6507881B1 (en) | 2003-01-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6507881B1 (en) | Method and system for programming a peripheral flash memory via an IDE bus | |
US5920884A (en) | Nonvolatile memory interface protocol which selects a memory device, transmits an address, deselects the device, subsequently reselects the device and accesses data | |
US7383362B2 (en) | Single-chip multi-media card/secure digital (MMC/SD) controller reading power-on boot code from integrated flash memory for user storage | |
US8185728B2 (en) | System boot using NAND flash memory and method thereof | |
US6029209A (en) | Method and arrangement for allowing a computer to communicate with a data storage device | |
US7761653B2 (en) | Flash micro-controller with shadow boot-loader SRAM for dual-device booting of micro-controller and host | |
US7454557B2 (en) | System and method for booting from a non-volatile application and file storage device | |
US5812814A (en) | Alternative flash EEPROM semiconductor memory system | |
US20050120146A1 (en) | Single-Chip USB Controller Reading Power-On Boot Code from Integrated Flash Memory for User Storage | |
US7552251B2 (en) | Single-chip multi-media card/secure digital (MMC/SD) controller reading power-on boot code from integrated flash memory for user storage | |
US5864568A (en) | Semiconductor memory device for mass storage block access applications | |
KR101397229B1 (en) | Modular command structure for memory and memory system | |
EP1343082A2 (en) | System boot using nand flash memory and method thereof | |
JPH04256088A (en) | Ic memory card system | |
KR100986884B1 (en) | Externally connected devices, host devices and data communication systems | |
US20110066920A1 (en) | Single-Chip Multi-Media Card/Secure Digital (MMC/SD) Controller Reading Power-On Boot Code from Integrated Flash Memory for User Storage | |
JPH1131102A (en) | Data storage system and access control method applied to the system | |
KR100987205B1 (en) | Externally connected devices, host devices and data communication systems | |
US20040049617A1 (en) | Method of firmware update by USB interface | |
JPH1063442A (en) | Semiconductor disk device | |
JPH0714392A (en) | Nonvolatile semiconductor memory and semiconductor disk device using the same | |
JP4663577B2 (en) | Data storage device and initialization method thereof | |
US7809862B2 (en) | Dual-mode switch for multi-media card/secure digital (MMC/SD) controller reading power-on boot code from integrated flash memory for user storage | |
US7437503B2 (en) | Method and apparatus for handling data transfers | |
JPH1139245A (en) | Semiconductor device controller and semiconductor device control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: MEDIA TEK INC., TAIWAN Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:CHEN, JOE;REEL/FRAME:010044/0248 Effective date: 19990525 |
|
STCF | Information on status: patent grant |
Free format text: PATENTED CASE |
|
RF | Reissue application filed |
Effective date: 20040320 |
|
FEPP | Fee payment procedure |
Free format text: PAT HOLDER NO LONGER CLAIMS SMALL ENTITY STATUS, ENTITY STATUS SET TO UNDISCOUNTED (ORIGINAL EVENT CODE: STOL); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY |
|
RF | Reissue application filed |
Effective date: 20051013 |
|
FPAY | Fee payment |
Year of fee payment: 4 |
|
FPAY | Fee payment |
Year of fee payment: 8 |
|
SULP | Surcharge for late payment |
Year of fee payment: 7 |
|
FPAY | Fee payment |
Year of fee payment: 12 |