Patent Publication Number: US-2007118684-A1

Title: Operation method of embedded system

Description:
BACKGROUND  
      1. Field of the Invention  
      The invention relates to an operation method, and particularly to operation method of an embedded system.  
      2. Related Art  
      With rapid development of wireless network communication, embedded systems are popularly used in products such as mobile phones, modems, and gateways.  
      An typical embedded system includes a controller, a non-volatile random access memory (NVRAM) for saving firmware, a volatile random access memory (VRAM) for saving programs, and an embedded operation system.  
      When the embedded system operates, the VRAM firstly reads all configuration data from the NVRAM, the controller then selects and loads necessary configuration data. However, the necessary configuration data constitute a small portion of all configuration data, but the VRAM must read all configuration data from the NVRAM, which is quite time-consuming.  
     SUMMARY  
      An operation method of an embedded system, comprising steps of: providing a controller, a volatile random access memory (VRAM), and a non-volatile random access memory (NVRAM); adding a sub-grouping tag to each value of configuration data of the embedded system; grouping the added sub-grouping tags into a grouping tag; saving the grouping tags, sub-grouping tags, and values of the configuration data in the NVRAM; receiving a setting instruction from a service provider; searching for the grouping tag saved in the NVRAM to detect whether the setting instruction comprises the grouping tag of the configuration data; copying the configuration data to the VRAM, if the setting instruction comprises the grouping tag of the configuration data; and loading the configuration data to the controller.  
      Other advantages and novel features will become more apparent from the following detailed description of preferred embodiments when taken in conjunction with the accompanying drawings, in which: 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       FIG. 1  is a schematic diagram illustrating an embedded system of an exemplary embodiment of the present invention;  
       FIG. 2  is a flowchart of an operation method of the embedded system of a further exemplary embodiment of the present invention; and  
       FIG. 3  is a flowchart of an operation method of the embedded system of a still further exemplary embodiment of the present invention. 
    
    
     DETAILED DESCRIPTION OF THE EMBODIMENTS  
       FIG. 1  is a schematic diagram illustrating an embedded system of an exemplary embodiment of the present invention. The embedded system  10  includes a controller  100 , a volatile random access memory (VRAM)  102 , and a non-volatile random memory (NVRAM)  104 . The controller  100  saves all configuration data (shown the Table 1) in the NVRAM  104 , and the VRAM copies the necessary configuration data from the NVRAM  104  when the embedded system  10  operates. In the exemplary embodiment, the controller  100  is a central processing unit (CPU), and the VRAM  102  is also a dynamic random access memory.  
      As shown in Table 1 below, Table 1 is an exemplary table for saving configuration data in the NVRAM  104 . In the exemplary embodiment, the configuration data include grouping tags, sub-grouping tags, and values of the configuration data. Several added sub-grouping tags are grouped into a grouping tag. For example, the configuration data saved in the NVRAM  104  are parameters related to connection modes between the embedded system  10  and the Internet. In the exemplary embodiment, the connection modes include point to point protocol over Ethernet (PPPOE) mode and dynamic host configuration protocol (DHCP) mode. Both the PPPoE mode and the DHCP mode include a plurality of parameters, such as user names, passwords, and so on. As shown in Table 1, in PPPoE mode, the user name is “123”, the password is “456”, that “123” and “456” represent values of the configuration data, “name” and “password” are sub-grouping tags thereof, and “PPPoE” is a grouping tag thereof.  
                       TABLE 1                                      PPPoE           Name = 123           Password = 456           DHCP           Name = 789           Password = 10112                      
 
       FIG. 2  is a flowchart of an operation method of the embedded system of a further exemplary embodiment of the present invention.  
      In step S 201 , the controller  100 , the VRAM  102 , and the NVRAM  104  are provided.  
      In step S 203 , each value of configuration data of the embedded system  10  is assigned a sub-grouping tag.  
      In step S 205 , several assigned sub-grouping tags are grouped into a grouping tag.  
      In step S 207 , the grouping tag, the sub-grouping tags, and the values of configuration data are saved in the NVRAM  104 .  
      In step S 209 , the embedded system  10  receives a setting instruction from a service provider (not shown). In the exemplary embodiment, one instruction corresponds to one grouping tag of the configuration data.  
      In step S 211 , the controller  100  searches for the configuration data in the NVRAM  104 . In the exemplary embodiment, the controller  100  searches for the grouping tag of the configuration data.  
      In step S 213 , the controller  100  detects whether the setting instruction includes the configuration data. In the exemplary embodiment, the controller  10  detects whether the setting instruction includes the configuration data by detecting whether the setting instruction includes the grouping tag of the configuration data. If yes, the process proceeds to step S 215 . If not, the process returns to step S 211 .  
      In step S 215 , the VRAM  102  copies the grouping tag, the sub-grouping tags, and the values of the configuration data from the NVRAM  104 . In the exemplary embodiment, the VRAM  102  copies the configuration data via a pointer.  
      In step S 217 , the controller  100  loads the configuration data in the VRAM  102 .  
       FIG. 3  is a flowchart of an operation method of the embedded system of a still further exemplary embodiment of the present invention.  
      In step S 301 , the embedded system  10  receives an update instruction from the service provider (not shown) when the embedded device is working after the step S 217  shown in  FIG. 2 .  
      In step S 303 , the embedded system  10  receives updating data after receiving the update instruction. In the exemplary embodiment, the updating data include grouping tags, sub-grouping tags, and values of configuration data, in which the sub-grouping tags are grouped into a grouping tag. Typically, one update instruction corresponds with one grouping tag.  
      In step S 305 , the controller  100  determines whether the grouping tag of the updating data is the same as that in the NVRAM  104 . If the grouping tag of the updating data is the same as that in the NVRAM  104 , the process proceeds to step S 307 . If the grouping tag of the updating data is not the same as that saving in the NVRAM  104 , the process proceeds to step S 311 .  
      In step S 307 , the controller  100  determines whether the values of the updating data are the same as that of the configuration data. If yes, the process proceeds to step S 309 ; if not, the process proceeds to step S 311 .  
      In step S 309 , the controller  100  saves the values of the updating data to the grouping tag of the configuration data in the NVRAM  104 , to replace original data thereof.  
      In step S 311 , the controller  100  saves the updating data in the NVRAM  104  with the grouping tag of the updating data. In the exemplary embodiment, the updating data is a new part of the configuration data.  
      While embodiments and methods of the present invention have been described above, it should be understood that they have been presented by way of example only and not by way of limitation. Thus the breadth and scope of the present invention should not be limited by the above-described exemplary embodiments, but should be defined only in accordance with the following claims and their equivalents.