In this embodiment, the external device 301 is, for example, a PC host or a USB controller, and the non-volatile memory 311 is, for example, a flash memory, so that the non-volatile memory controller 309 is a flash memory controller. However, the present invention is not limited thereto as such. The user may also use different non-volatile memories according to the practical requirements.
In this embodiment, after the USB device/PHY 303a of the interface apparatus 303 receives the USB timing signal USBCS provided by the external device 301, it converts the USB timing signal USBCS and then outputs a specific form command SFC. Next, the command translator 303b translates the specific form command SFC and generates an operating signal OS accordingly. Then, according to the operating signal OS, the bus master 303c controls the operations of the bus 305, and provides the signal content through the bus 305 to the non-volatile memory 309 for being converted, thereby initializing or reading/writing data from/to the non-volatile memory 311.
As know from the above that, during the operation, the interface apparatus 303 of this embodiment directly initializes or reads/writes data from/to the non-volatile memory 311, without being processed by the microprocessor 307. Particularly, the command translator 303b inside the interface apparatus 303 replaces the microprocessor 307 to perform the original tasks of the microprocessor 307. Therefore, in this embodiment, the external device 301 commands the command (i.e., the specific form command SFC) through the USB device/PHY 303 a to the command translator 303b for being translated. Then, accordingly, the bus master 303c is used to control the bus 305, and the non-volatile memory controller 309 is directly controlled, so as to initialize or read/write data from/to the non-volatile memory 311.
In addition, it should be noted that, after the interface apparatus 303 has completed the operations, the embedded system 300 returns to the normal operating mode, i.e., the microprocessor 307 continuously to manage the whole operating mode of the embedded system 300, and at this time, the USB device/PHY 303a is responsible for accessing other USB controllers or USB devices.
Next, in Step S403, the specific form command is directly translated, and then, the initialization or read/write data is performed from/to the non-volatile memory accordingly. In this step, after the specific form command is translated, an operating signal is generated, which is used to initialize or read/write data from/to the non-volatile memory.
In this embodiment, when Step S403 is completed, i.e., the initialization or read/write data has been performed from/to the non/volatile memory; the microprocessor inside the embedded system continuously to manage the whole operating mode of the embedded system.
To sum up, the present invention provides an interface apparatus, which is suitable for the embedded system having the USB interface and the non-volatile memory. In the interface apparatus of the present invention, the command translator is used to translate the command commanded by the external device, so that the initialization or read/write data is directly performed from/to the non-volatile memory, without being processed by the microprocessor inside the embedded system, thereby solving the technical bottleneck of the prior art. In addition, in the method of updating data for the non-volatile memory provided by the present invention, after the specific form command commanded by the external device is directly translated, the initialization or read/write data is directly performed from/to the non-volatile memory accordingly, thereby directly updating data for the non-volatile memory.
It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the present invention without departing from the scope or spirit of the invention. In view of the foregoing, it is intended that the present invention cover modifications and variations of this invention provided they fall within the scope of the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
95138532 | Oct 2006 | TW | national |