WO2017020411A1 - 一种下载配置代码的方法、系统及计时器/计数器控制寄存器 - Google Patents

一种下载配置代码的方法、系统及计时器/计数器控制寄存器 Download PDF

Info

Publication number
WO2017020411A1
WO2017020411A1 PCT/CN2015/090539 CN2015090539W WO2017020411A1 WO 2017020411 A1 WO2017020411 A1 WO 2017020411A1 CN 2015090539 W CN2015090539 W CN 2015090539W WO 2017020411 A1 WO2017020411 A1 WO 2017020411A1
Authority
WO
WIPO (PCT)
Prior art keywords
code
preset interface
check code
downloading
configuration
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.)
Ceased
Application number
PCT/CN2015/090539
Other languages
English (en)
French (fr)
Inventor
谢剑军
赵文勤
孙磊
何涛
毕小斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TCL China Star Optoelectronics Technology Co Ltd
Original Assignee
Shenzhen China Star Optoelectronics Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen China Star Optoelectronics Technology Co Ltd filed Critical Shenzhen China Star Optoelectronics Technology Co Ltd
Priority to US14/905,059 priority Critical patent/US20170168850A1/en
Publication of WO2017020411A1 publication Critical patent/WO2017020411A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/28Timers or timing mechanisms used in protocols

Definitions

  • the present invention relates to the field of storage drives, and in particular, to a method, system, and timer/counter control register for downloading configuration codes.
  • the timer/counter control register typically pops an EEPROM or Flash to store the configuration code of the timer/counter control register and has fixed the selection of the memory device.
  • EEPROM uses IIC interface
  • its speed is generally 400Kbits/s, which can meet the download time requirement for applications with less configuration code; for configuration code larger than 64K or even larger, Flash using SPI interface is not only In terms of speed (up to 15MBits/s or more), and it will be more advantageous in terms of cost.
  • the current timer/counter control register is generally fixed after the factory is selected to download the configuration code from EEPROM or Flash. The function is relatively simple and the configuration is not flexible enough.
  • the technical problem to be solved by the present invention is to provide a method and system for downloading a configuration code and a timer/counter control register to improve the flexibility of the use of the calculator/calculator control register.
  • the present invention provides a method of downloading a configuration code for use in a timer/counter control register for automatically identifying a storage device connected to a timer/counter control register to download a configuration code from an identified storage device, Methods include:
  • the second preset interface of the timer/counter control register is used in the storage device connected from the second preset interface Download the configuration code including:
  • the configuration code is continuously downloaded from the storage device connected to the second preset interface.
  • the calculating the second check code according to the obtained second startup code further includes:
  • the first preset interface is an IIC interface
  • the second preset interface is an SPI interface
  • the present invention also provides a system for downloading configuration codes, which is applied to a timer/counter control register for automatically identifying a storage device connected to a timer/counter control register to download a configuration code from the identified storage device, the characteristics of which The system for downloading the configuration code includes:
  • An obtaining module configured to acquire a first startup code by using a first preset interface of the timer/counter control register
  • a calculating module configured to calculate a first check code according to the obtained first startup code
  • a determining module configured to determine whether the calculated first check code is the same as the first standard check code; and is further configured to output the first download when the calculated first check code is the same as the first standard check code
  • the instruction is further configured to output a second download instruction when the calculated first check code is different from the first standard check code;
  • a downloading module configured to download, by the first preset interface, a configuration code from a storage device connected to the first preset interface according to the first downloading instruction;
  • the second preset interface of the timer/counter control register downloads a configuration code from a storage device connected to the second preset interface.
  • the obtaining module is further configured to acquire a second startup code by using a second preset interface of the timer/counter control register; the calculating module is further configured to calculate a second verification code according to the acquired second startup code.
  • the determining module is further configured to: when determining that the calculated second check code is the same as the second standard check code, maintaining the outputting the second download instruction, so that the downloading module continues to connect from the second preset interface Download the configuration code in the storage device.
  • the determining module outputs a stop instruction when determining that the calculated second check code is different from the second standard check code, and the downloading module is further configured to stop connecting from the connection to the stop command when receiving the stop command.
  • the configuration code is downloaded on the storage device of the second preset interface.
  • the present invention also provides a timer/counter control register for downloading a configuration code from a first or second memory device, wherein the timer/counter control register includes a first preset interface, a second pre- And a system for downloading a configuration code, the first preset interface is configured to connect to the first storage device, the second preset interface is used to connect to the second storage device, and the system for downloading the configuration code passes the A preset interface or the second preset interface downloads a configuration code from a corresponding storage device, where the system for downloading the configuration code includes:
  • An obtaining module configured to acquire a first startup code by using a first preset interface of the timer/counter control register
  • a calculating module configured to calculate a first check code according to the obtained first startup code
  • a determining module configured to determine whether the calculated first check code is the same as the first standard check code; and is further configured to output the first download when the calculated first check code is the same as the first standard check code
  • the instruction is further configured to output a second download instruction when the calculated first check code is different from the first standard check code;
  • a downloading module configured to download a configuration code from a storage device connected to the first preset interface by using the first preset interface according to the first downloading instruction, and further configured to pass the A second preset interface of the timer/counter control register downloads a configuration code from a storage device connected to the second preset interface.
  • the obtaining module is further configured to obtain a second startup code by using a second preset interface of the timer/counter control register; the calculating module is further configured to calculate, according to the acquired second startup code a second check code, where the determining module is further configured to: when determining that the calculated second check code is the same as the second standard check code, maintaining a second download instruction to continue, wherein the download module continues from the The configuration code is downloaded from the storage device connected to the second preset interface.
  • the determining module outputs a stop instruction when determining that the calculated second check code is different from the second standard check code, and the downloading module is further configured to stop connecting from the connection to the stop command when receiving the stop command.
  • the configuration code is downloaded on the storage device of the second preset interface.
  • the first preset interface is an IIC interface
  • the second preset interface is an SPI interface
  • the first preset interface is further connected to the voltage end by a corresponding resistor.
  • the method of the present invention for downloading a configuration code is applied to a timer/counter control register for automatically identifying a memory device to which the timer/counter control register is connected to download a configuration code from the identified memory device.
  • the method includes: acquiring, by a first preset interface of the timer/counter control register, a first startup code; calculating a first verification code according to the acquired first startup code; determining a calculated first verification code and a first Whether a standard check code is the same; when the calculated first check code is the same as the first standard check code, the configuration is downloaded from the storage device connected to the first preset interface by using the first preset interface a code; when the calculated first check code is different from the first standard check code, the second preset interface of the timer/counter control register is used in the storage device connected from the second preset interface Download the configuration code. Therefore, the present invention can enable the calculator/calculator control register to be connected to a plurality of memories, and can selectively download configuration codes from one of the storage devices as needed,
  • FIG. 1 is a flowchart of a method for downloading a configuration code according to a first embodiment of the present invention
  • Figure 2 is a specific flow chart of step 105 in Figure 1;
  • FIG. 3 is a block diagram of a system for downloading configuration codes according to a second embodiment of the present invention.
  • FIG. 4 is a diagram showing a timer/counter control register according to a third embodiment of the present invention. intention
  • Figure 5 is a block diagram of a system for downloading configuration codes in the timer/counter control register shown in Figure 3.
  • a first embodiment of the present invention provides a method for downloading a configuration code.
  • the method is applied to a timer/counter control register for automatically identifying a memory device to which the timer/counter control register is connected to download a configuration code from the identified memory device.
  • the method includes the following steps:
  • Step 101 Acquire a first startup code by using a first preset interface of the timer/counter control register.
  • the timer/counter control register includes a first preset interface and a second preset interface.
  • the first preset interface is different from the second preset interface.
  • the first preset interface is used to connect to the first memory
  • the second preset interface is used to connect to the second memory
  • the first memory is different from the second memory.
  • the first memory can be an EEPROM.
  • the second memory may be a Flash.
  • the first preset interface is an IIC interface
  • the second preset interface is an SPI interface.
  • Step 102 Calculate a first check code according to the obtained first startup code.
  • the first boot code is stored in a storage device connected to the first preset interface.
  • the first boot code can be multiple bits, such as codes C0-Cn.
  • n can be 7, and the length of the code is 8.
  • the first check code is calculated according to codes C0, C1, C2, C3, C4, C5, C6, and C7.
  • the value of the n can be adjusted according to actual conditions.
  • Step 103 Determine whether the calculated first check code is the same as the first standard check code.
  • the first standard check code is stored in the timer/counter control register.
  • the first standard check code is used to compare with the calculated first check code, so as to determine whether the first preset interface is connected with a corresponding storage device.
  • Step 104 When the calculated first check code is the same as the first standard check code, download the configuration code from the storage device connected to the first preset interface by using the first preset interface.
  • the configuration may be downloaded from the storage device. Code.
  • Step 105 When the calculated first check code is different from the first standard check code, the storage device connected from the second preset interface by using the second preset interface of the timer/counter control register Download the configuration code.
  • the configuration code can be downloaded from the storage device connected to the second preset interface.
  • the step 105 may further include the following steps:
  • Step 1051 Acquire a second startup code by using a second preset interface of the timer/counter control register.
  • Step 1052 Calculate a second check code according to the obtained second startup code.
  • the second boot code is stored in a storage device connected to the second preset interface.
  • the second boot code can be multiple bits, such as codes C0-Cn.
  • n can be 7, and the length of the code is 8.
  • the second check code is calculated according to the codes C0, C1, C2, C3, C4, C5, C6, and C7.
  • the value of the n can be adjusted according to actual conditions.
  • Step 1053 When it is determined that the calculated second check code is the same as the second standard check code, continue to download the configuration code from the storage device connected to the second preset interface.
  • a second standard check code is stored in the timer/counter control register.
  • the second standard check code is used for comparing the second check code of the storage device connected to the second preset interface, so as to determine whether the second preset interface is connected with a corresponding storage device. .
  • the method further includes:
  • Step 1054 When it is determined that the calculated second check code is different from the second standard check code, stop downloading the configuration code from the storage device connected to the second preset interface.
  • the storage device connected to the preset interface is not a corresponding storage device, that is, the storage device connected to the second preset interface is incorrect, and it is necessary to stop downloading the configuration code from the storage device of the second preset interface. Therefore, such a determination method can improve the accuracy of downloading the configuration code.
  • the method for downloading the configuration code includes: acquiring, by using a first preset interface of the timer/counter control register, a first startup code; calculating a first verification code according to the acquired first startup code; determining Whether the calculated first check code is the same as the first standard check code; when the calculated first check code is the same as the first standard check code, the first preset interface is used from the first Downloading a configuration code in a storage device connected to the preset interface; when the calculated first check code is different from the first standard check code, from the second preset interface of the timer/counter control register
  • the configuration code is downloaded from the storage device connected to the second preset interface. Therefore, the present invention can enable the calculator/calculator control register to be connected to a plurality of memories, and can selectively download configuration codes from one of the storage devices as needed, thereby improving the use of the calculator/calculator control registers. flexibility.
  • a second embodiment of the present invention provides a system 300 for downloading a configuration code.
  • the system 300 for downloading configuration codes is applied to a timer/counter control register for automatically identifying a storage device to which the timer/counter control register is connected to download a configuration code from the identified storage device.
  • the system 300 for downloading configuration codes includes an obtaining module 310, a calculating module 320, a determining module 330, and a downloading module 340.
  • the obtaining module 310 is configured to acquire a first startup code by using a first preset interface of the timer/counter control register.
  • the timer/counter control register includes a first preset interface and a second preset interface.
  • the first preset interface is different from the second preset interface.
  • the first preset interface is used to connect to the first memory
  • the second preset interface is used to connect to the second memory
  • the first memory is different from the second memory.
  • the first memory can be an EEPROM.
  • the second memory may be a Flash.
  • the first preset interface is an IIC interface
  • the second preset interface is an SPI interface.
  • the calculating module 320 is configured to calculate a first check code according to the obtained first startup code.
  • the first boot code is stored in a storage device connected to the first preset interface.
  • the first boot code can be multiple bits, such as codes C0-Cn.
  • n can be 7, the length of the code is 8.
  • the first check code is calculated according to codes C0, C1, C2, C3, C4, C5, C6, and C7.
  • the value of the n can be adjusted according to actual conditions.
  • the determining module 330 is configured to determine whether the calculated first check code is the same as the first standard check code, and is further configured to output the first when the calculated first check code is the same as the first standard check code. a download instruction; and is further configured to output a second download instruction when the calculated first check code is different from the first standard check code.
  • the first standard check code is stored in the timer/counter control register.
  • the first standard check code is used to compare with the calculated first check code, so as to determine whether the first preset interface is connected with a corresponding storage device.
  • the configuration code may be downloaded from the storage device.
  • it is determined that the first check code is different from the first standard check code it indicates that the first preset interface is not connected to a corresponding storage device, and the second preset interface is connected with a corresponding storage device. And, the configuration code can be downloaded from the storage device connected to the second preset interface.
  • the downloading module 340 is configured to download the configuration code from the storage device connected to the first preset interface by using the first preset interface according to the first downloading instruction, and further configured to pass the second downloading instruction according to the second downloading instruction.
  • the second preset interface of the timer/counter control register downloads a configuration code from a storage device connected to the second preset interface.
  • the obtaining module 310 is further configured to acquire a second startup code by using a second preset interface of the timer/counter control register.
  • the calculating module 320 is further configured to calculate a second check code according to the obtained second startup code.
  • the determining module 330 is further configured to: when determining that the calculated second check code is the same as the second standard check code, maintaining the outputting the second download instruction, so that the downloading module 340 continues from the second preset interface. Download the configuration code from the connected storage device.
  • the second startup code is stored in a storage device connected to the second preset interface.
  • the second boot code can be multiple bits, such as codes C0-Cn.
  • n can be 7, and the length of the code is 8.
  • the second check code is calculated according to the codes C0, C1, C2, C3, C4, C5, C6, and C7.
  • the value of the n can be adjusted according to actual conditions.
  • a second standard check code is stored in the timer/counter control register. among them, The second standard check code is used for comparing the second check code of the storage device connected to the second preset interface, so as to determine whether the second preset interface is connected with a corresponding storage device.
  • the determining module 330 outputs a stop instruction when it is determined that the calculated second check code is different from the second standard check code.
  • the downloading module 340 is further configured to stop downloading the configuration code from the storage device connected to the second preset interface when receiving the stop instruction.
  • the decision module 330 can provide the accuracy of downloading the configuration code.
  • the system 300 for downloading configuration codes includes an obtaining module 310, a calculating module 320, a determining module 330, and a downloading module 340.
  • the obtaining module 310 is configured to acquire a first startup code by using a first preset interface of the timer/counter control register.
  • the calculating module 320 is configured to calculate a first check code according to the obtained first startup code.
  • the determining module 330 is configured to determine whether the calculated first check code is the same as the first standard check code, and is further configured to output the first when the calculated first check code is the same as the first standard check code.
  • a download instruction and is further configured to output a second download instruction when the calculated first check code is different from the first standard check code.
  • the downloading module 340 is configured to download the configuration code from the storage device connected to the first preset interface by using the first preset interface according to the first downloading instruction, and further configured to pass the second downloading instruction according to the second downloading instruction.
  • the second preset interface of the timer/counter control register downloads a configuration code from a storage device connected to the second preset interface. Therefore, the present invention can enable the calculator/calculator control register to be connected to a plurality of memories, and can selectively download configuration codes from one of the storage devices as needed, thereby improving the use of the calculator/calculator control registers. flexibility.
  • a third embodiment of the present invention provides a timer/counter control register 400.
  • the calculator/calculator control register 400 is for downloading a configuration code from the first or second storage device.
  • the timer/counter control register 400 includes a first preset interface 410, a second preset interface 420, and a system 430 for downloading configuration codes.
  • the first preset interface 410 is configured to connect to the first storage device.
  • the second preset interface 420 is configured to connect to the second storage device.
  • the system 430 for downloading the configuration code downloads the configuration code from the corresponding storage device through the first preset interface 410 or the second preset interface 420.
  • the system 430 for downloading the configuration code includes an obtaining module 431, The calculation module 432, the determination module 433, and the download module 434.
  • the obtaining module 431 is configured to acquire a first startup code by using the first preset interface 410 of the timer/counter control register 400.
  • the first preset interface 410 is different from the second preset interface 420.
  • the first memory is different from the second memory.
  • the first memory can be an EEPROM.
  • the second memory may be a Flash.
  • the first preset interface 410 is an IIC interface
  • the second preset interface 420 is an SPI interface.
  • the number of the first preset interfaces 410 is two.
  • the number of the second preset interfaces is four.
  • the calculating module 432 is configured to calculate a first check code according to the obtained first startup code.
  • the first startup code is stored in a first storage device connected to the first preset interface 410.
  • the first boot code can be multiple bits, such as codes C0-Cn.
  • n can be 7, and the length of the code is 8.
  • the first check code is calculated according to codes C0, C1, C2, C3, C4, C5, C6, and C7.
  • the value of the n can be adjusted according to actual conditions.
  • the determining module 433 is configured to determine whether the calculated first check code is the same as the first standard check code, and is further configured to output the first when the calculated first check code is the same as the first standard check code. a download instruction; and is further configured to output a second download instruction when the calculated first check code is different from the first standard check code.
  • the first standard check code is stored in the timer/counter control register 400.
  • the first standard check code is used to compare with the calculated first check code, so as to determine whether the first preset interface 410 is connected to the first memory.
  • the configuration code may be downloaded from the first memory.
  • it is determined that the first check code is different from the first standard check code it indicates that the first preset interface 410 is not connected to the first memory, and the second preset interface 420 is connected to the first
  • the second memory can then download the configuration code from the second memory connected to the second preset interface 420.
  • the downloading module 434 is configured to download configuration code from the first memory by using the first preset interface 410 according to the first download instruction, and further configured to pass the second pre-read according to the second download instruction.
  • the interface 420 is configured to download the configuration code from the second memory.
  • the obtaining module 431 is further configured to obtain a second startup code by using the second preset interface 420.
  • the calculating module 432 is further configured to calculate a second check code according to the acquired second startup code.
  • the determining module 433 is further configured to: when determining that the calculated second check code is the same as the second standard check code, maintaining the outputting the second download instruction, so that the download module 434 continues to download from the second memory. Configuration code.
  • the second startup code is stored in a storage device connected to the second preset interface.
  • the second boot code can be multiple bits, such as codes C0-Cn.
  • n can be 7, and the length of the code is 8.
  • the second check code is calculated according to the codes C0, C1, C2, C3, C4, C5, C6, and C7. In other embodiments, the value of the n can be adjusted according to actual conditions.
  • a second standard check code is stored in the timer/counter control register 400. The second standard check code is used to compare the second check code of the second memory connected to the second preset interface 420, so as to determine whether the second preset interface 420 is correctly connected. Second memory.
  • the determining module 433 outputs a stop instruction when it is determined that the calculated second check code is different from the second standard check code.
  • the download module 434 is further configured to stop downloading the configuration code from the memory connected to the second preset interface 420 when the stop instruction is received.
  • the second check code when the second check code is different from the second standard check code, indicating that the second preset interface 420 is not correctly connected to the second memory, the second preset needs to be stopped.
  • the configuration code is downloaded from the storage device of the interface. Therefore, the decision module 433 can improve the accuracy of downloading the configuration code.
  • the calculator/calculator control register 400 includes a system 430 that downloads configuration codes.
  • the system 430 for downloading the configuration code includes an acquisition module 431, a calculation module 432, a determination module 433, and a download module 434.
  • the obtaining module 431 is configured to obtain a first startup code by using the first preset interface 410.
  • the calculating module 432 is configured to calculate a first check code according to the obtained first startup code.
  • the determining module 433 is configured to determine whether the calculated first check code is the same as the first standard check code, and is further configured to output the first when the calculated first check code is the same as the first standard check code. a download instruction; and is further configured to output a second download instruction when the calculated first check code is different from the first standard check code.
  • the downloading module 434 is configured to download, by using the first preset interface, the configuration code from the first memory connected to the first preset interface according to the first downloading instruction;
  • the configuration code is downloaded from the second memory through the second preset interface 420 according to the second download instruction. Therefore, the calculator/calculator control register 400 of the present invention can connect a plurality of memories, and can selectively download configuration codes from one of the storage devices as needed, thereby improving the calculator/calculator control register 400. The flexibility of use.
  • the first preset interface 410 is further connected to the voltage terminal VDD through a corresponding resistor to function as a pull-up potential to prevent the calculator/calculator control register 400 from performing erroneous determination.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明公开一种下载配置代码的方法,应用于计时器/计数器控制寄存器中,所述方法包括通过计时器/计数器控制寄存器的第一预设接口获取第一启动代码;根据获取的第一启动代码计算第一校验码;判定计算得到的第一校验码与第一标准校验码是否相同;当两者相同时,通过第一预设接口从第一预设接口连接的存储器件中下载配置代码;当两者不同时,通过计时器/计数器控制寄存器的第二预设接口从第二预设接口连接的存储器件中下载配置代码。因此,本发明提高了计算器/计算器控制寄存器使用的灵活性。本发明还提供了一种下载配置代码的系统及计时器/计数器控制寄存器。

Description

一种下载配置代码的方法、系统及计时器/计数器控制寄存器
本发明要求2015年7月31日递交的发明名称为“一种下载配置代码的方法、系统及计时器/计数器控制寄存器”的申请号201510464745.8的在先申请优先权,上述在先申请的内容以引入的方式并入本文本中。
技术领域
本发明涉及存储驱动领域,尤其涉及一种下载配置代码的方法、系统及计时器/计数器控制寄存器。
背景技术
目前,根据启动代码容量的不同及采购成本考虑,计时器/计数器控制寄存器一般会外挂一颗EEPROM或Flash来存储计时器/计数器控制寄存器的配置代码,并且已经固定了存储器件的选择。通常EEPROM使用IIC接口,其速度一般为400Kbits/s,对于配置代码量较少的应用而言可以满足下载时间要求;而对于大于64K甚至更大容量的配置代码而言,使用SPI接口的Flash不仅在速度上(可达15MBits/s以上),而且在成本上会更有优势。但是目前的计时器/计数器控制寄存器在出厂后一般都固定了选择从EEPROM或Flash下载配置代码,功能相对比较单一,配置不够灵活。
发明内容
本发明所要解决的技术问题在于提供一种下载配置代码的方法、系统及一种计时器/计数器控制寄存器,以提高计算器/计算器控制寄存器使用的灵活性。
为了实现上述目的,本发明实施方式提供如下技术方案:
本发明供了一种下载配置代码的方法,应用于计时器/计数器控制寄存器中,用于自动识别计时器/计数器控制寄存器连接的存储器件,以从识别的存储器件中下载配置代码,所述方法包括:
通过所述计时器/计数器控制寄存器的第一预设接口获取第一启动代码;
根据获取的第一启动代码计算第一校验码;
判定计算得到的第一校验码与第一标准校验码是否相同;
当计算得到的第一校验码与第一标准校验码相同时,通过所述第一预设接口从所述第一预设接口连接的存储器件中下载配置代码;
当计算得到的第一校验码与第一标准校验码不相同时,通过所述计时器/计数器控制寄存器的第二预设接口从所述第二预设接口连接的存储器件中下载配置代码。
其中,当计算得到的第一校验码与第一标准校验码不相同时,通过所述计时器/计数器控制寄存器的第二预设接口从所述第二预设接口连接的存储器件中下载配置代码包括:
通过所述计时器/计数器控制寄存器的第二预设接口获取第二启动代码;
根据获取的第二启动代码计算第二校验码;
确定计算得到的第二校验码与第二标准校验码相同时,继续从所述第二预设接口连接的存储器件中下载配置代码。
其中,根据获取的第二启动代码计算第二校验码之后还包括:
确定计算得到的第二校验码与第二标准校验码不相同时,停止从所述第二预设接口连接的存储器件中下载配置代码。
其中,所述第一预设接口为IIC接口,所述第二预设接口为SPI接口。
本发明还提供一种下载配置代码的系统,应用于计时器/计数器控制寄存器中,用于自动识别计时器/计数器控制寄存器连接的存储器件,以从识别的存储器件中下载配置代码,其特征在于:所述下载配置代码的系统包括:
获取模块,用于通过所述计时器/计数器控制寄存器的第一预设接口获取第一启动代码;
计算模块,用于根据获取的第一启动代码计算第一校验码;
判定模块,用于判定计算得到的第一校验码与第一标准校验码是否相同;还用于当计算得到的第一校验码与第一标准校验码相同时,输出第一下载指令;还用于当计算得到的第一校验码与第一标准校验码不相同时,输出第二下载指令;
下载模块,用于根据所述第一下载指令通过所述第一预设接口从所述第一预设接口连接的存储器件中下载配置代码;还用于根据所述第二下载指令通过 所述计时器/计数器控制寄存器的第二预设接口从所述第二预设接口连接的存储器件中下载配置代码。
其中,所述获取模块还用于通过所述计时器/计数器控制寄存器的第二预设接口获取第二启动代码;所述计算模块还用于根据获取的第二启动代码计算第二校验码,所述判定模块还用于确定计算得到的第二校验码与第二标准校验码相同时,维持输出第二下载指令,以使所述下载模块继续从所述第二预设接口连接的存储器件中下载配置代码。
其中,所述判定模块在确定计算得到的第二校验码与第二标准校验码不相同时,输出停止指令,所述下载模块还用于在接收到所述停止指令时停止从连接至所述第二预设接口的存储器件上下载配置代码。
本发明还提供一种计时器/计数器控制寄存器,用于从第一或第二存储器件上下载配置代码,其特征在于:所述计时器/计数器控制寄存器包括第一预设接口、第二预设接口及下载配置代码的系统,所述第一预设接口用于连接第一存储器件,所述第二预设接口用于连接第二存储器件,所述下载配置代码的系统通过所述第一预设接口或所述第二预设接口从相应的存储器件上下载配置代码,所述下载配置代码的系统包括:
获取模块,用于通过所述计时器/计数器控制寄存器的第一预设接口获取第一启动代码;
计算模块,用于根据获取的第一启动代码计算第一校验码;
判定模块,用于判定计算得到的第一校验码与第一标准校验码是否相同;还用于当计算得到的第一校验码与第一标准校验码相同时,输出第一下载指令;还用于当计算得到的第一校验码与第一标准校验码不相同时,输出第二下载指令;
下载模块,用于根据所述第一下载指令通过所述第一预设接口从所述第一预设接口连接的存储器件中下载配置代码;还用于根据所述第二下载指令通过所述计时器/计数器控制寄存器的第二预设接口从所述第二预设接口连接的存储器件中下载配置代码。
其中,所述获取模块还用于通过所述计时器/计数器控制寄存器的第二预设接口获取第二启动代码;所述计算模块还用于根据获取的第二启动代码计算 第二校验码,所述判定模块还用于确定计算得到的第二校验码与第二标准校验码相同时,维持输出第二下载指令,以使所述下载模块继续从所述第二预设接口连接的存储器件中下载配置代码。
其中,所述判定模块在确定计算得到的第二校验码与第二标准校验码不相同时,输出停止指令,所述下载模块还用于在接收到所述停止指令时停止从连接至所述第二预设接口的存储器件上下载配置代码。
其中,所述第一预设接口为IIC接口,所述第二预设接口为SPI接口,所述第一预设接口还通过相应的电阻连接至电压端。
本发明下载配置代码的方法应用于计时器/计数器控制寄存器中,用于自动识别计时器/计数器控制寄存器连接的存储器件,以从识别的存储器件中下载配置代码。所述方法包括通过所述计时器/计数器控制寄存器的第一预设接口获取第一启动代码;根据获取的第一启动代码计算第一校验码;判定计算得到的第一校验码与第一标准校验码是否相同;当计算得到的第一校验码与第一标准校验码相同时,通过所述第一预设接口从所述第一预设接口连接的存储器件中下载配置代码;当计算得到的第一校验码与第一标准校验码不相同时,通过所述计时器/计数器控制寄存器的第二预设接口从所述第二预设接口连接的存储器件中下载配置代码。因此,本发明可以使得计算器/计算器控制寄存器可以连接多个存储器,并可以根据需要选择性的从其中一个存储器件中下载配置代码,从而提高了所述计算器/计算器控制寄存器使用的灵活性。
附图说明
为了更清楚地说明本发明的技术方案,下面将对实施方式中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以如这些附图获得其他的附图。
图1是本发明第一方案实施例提供的一种下载配置代码的方法的流程图;
图2是图1中的步骤105的具体流程图;
图3是本发明第二方案实施例提供的一种下载配置代码的系统的框图;
图4是本发明第三方案实施例提供的一种计时器/计数器控制寄存器的示 意图;
图5是图3显示的计时器/计数器控制寄存器中的下载配置代码的系统的框图。
具体实施方式
下面将结合本发明实施方式中的附图,对本发明实施方式中的技术方案进行清楚、完整地描述。
请参阅图1,本发明第一方案实施例提供一种下载配置代码的方法。所述方法应用于计时器/计数器控制寄存器中,用于自动识别计时器/计数器控制寄存器连接的存储器件,以从识别的存储器件中下载配置代码。所述方法包括以下步骤:
步骤101、通过所述计时器/计数器控制寄存器的第一预设接口获取第一启动代码。
需要说明的是,所述计时器/计数器控制寄存器包括第一预设接口及第二预设接口。所述第一预设接口与所述第二预设接口不同。其中,所述第一预设接口用于连接第一存储器,所述第二预设接口用于连接第二存储器,所述第一存储器与第二存储器不同。所述第一存储器可以为EEPROM。所述第二存储器可以为Flash。在本实施例中,所述第一预设接口为IIC接口,所述第二预设接口为SPI接口。
步骤102、根据获取的第一启动代码计算第一校验码。
其中,所述第一启动代码是存储于与所述第一预设接口连接的存储器件内。所述第一启动代码可以为多位,如代码C0-Cn。在本实施例中,n可以为7,则代码的长度为8。则根据代码C0、C1、C2、C3、C4、C5、C6及C7来计算第一校验码。在其他的实施例中,所述n的取值可以根据实际情况进行调整。
步骤103、判定计算得到的第一校验码与第一标准校验码是否相同。
其中,所述计时器/计数器控制寄存器内存储有第一标准校验码。其中,所述第一标准校验码用于与计算得到的第一校验码进行比对,从而确定所述第一预设接口是否连接有相应的存储器件。
步骤104、当计算得到的第一校验码与第一标准校验码相同时,通过所述第一预设接口从所述第一预设接口连接的存储器件中下载配置代码。
需要说明的是,当确定所述第一校验码与所述第一标准校验码相同时,表明所述第一预设接口连接相应的存储器件,则可以从所述存储器件中下载配置代码。
步骤105、当计算得到的第一校验码与第一标准校验码不相同时,通过所述计时器/计数器控制寄存器的第二预设接口从所述第二预设接口连接的存储器件中下载配置代码。
需要说明的是,当确定所述第一校验码与所述第一标准校验码不相同时,表明所述第一预设接口未连接相应的存储器件,所述第二预设接口连接有相应的存储器件,则可以从所述第二预设接口连接的存储器件中下载配置代码。
请参阅图2,可选地,所述步骤105还可以包括以下步骤:
步骤1051、通过所述计时器/计数器控制寄存器的第二预设接口获取第二启动代码。
步骤1052、根据获取的第二启动代码计算第二校验码。
其中,所述第二启动代码是存储于与所述第二预设接口连接的存储器件内。所述第二启动代码可以为多位,如代码C0-Cn。在本实施例中,n可以为7,则代码的长度为8。则根据代码C0、C1、C2、C3、C4、C5、C6及C7来计算第二校验码。在其他的实施例中,所述n的取值可以根据实际情况进行调整。
步骤1053、确定计算得到的第二校验码与第二标准校验码相同时,继续从所述第二预设接口连接的存储器件中下载配置代码。
需要说明的是,所述计时器/计数器控制寄存器内存储有第二标准校验码。其中,所述第二标准校验码用于与所述第二预设接口连接的存储器件的第二校验码进行比对,从而确定所述第二预设接口是否连接有相应的存储器件。
可选地,步骤1052之后还包括:
步骤1054、确定计算得到的第二校验码与第二标准校验码不相同时,停止从所述第二预设接口连接的存储器件中下载配置代码。
其中,当所述第二校验码与所述第二标准校验码不相同时,表明所述第二 预设接口连接的存储器件不是相应的存储器件,即所述第二预设接口连接的存储器件不正确,则需要停止从所述第二预设接口的存储器件中下载配置代码。因此,则这样的判定方法可以提高下载配置代码的准确性。
在本实施例中,所述下载配置代码的方法包括通过所述计时器/计数器控制寄存器的第一预设接口获取第一启动代码;根据获取的第一启动代码计算第一校验码;判定计算得到的第一校验码与第一标准校验码是否相同;当计算得到的第一校验码与第一标准校验码相同时,通过所述第一预设接口从所述第一预设接口连接的存储器件中下载配置代码;当计算得到的第一校验码与第一标准校验码不相同时,通过所述计时器/计数器控制寄存器的第二预设接口从所述第二预设接口连接的存储器件中下载配置代码。因此,本发明可以使得计算器/计算器控制寄存器可以连接多个存储器,并可以根据需要选择性的从其中一个存储器件中下载配置代码,从而提高了所述计算器/计算器控制寄存器使用的灵活性。
请参阅图3,本发明第二方案实施例提供一种下载配置代码的系统300。所述下载配置代码的系统300应用于计时器/计数器控制寄存器中,用于自动识别计时器/计数器控制寄存器连接的存储器件,以从识别的存储器件中下载配置代码。所述下载配置代码的系统300包括获取模块310、计算模块320、判定模块330及下载模块340。
所述获取模块310用于通过所述计时器/计数器控制寄存器的第一预设接口获取第一启动代码。
需要说明的是,所述计时器/计数器控制寄存器包括第一预设接口及第二预设接口。所述第一预设接口与所述第二预设接口不同。其中,所述第一预设接口用于连接第一存储器,所述第二预设接口用于连接第二存储器,所述第一存储器与第二存储器不同。所述第一存储器可以为EEPROM。所述第二存储器可以为Flash。在本实施例中,所述第一预设接口为IIC接口,所述第二预设接口为SPI接口。
所述计算模块320用于根据获取的第一启动代码计算第一校验码。
其中,所述第一启动代码是存储于与所述第一预设接口连接的存储器件内。所述第一启动代码可以为多位,如代码C0-Cn。在本实施例中,n可以为 7,则代码的长度为8。则根据代码C0、C1、C2、C3、C4、C5、C6及C7来计算第一校验码。在其他的实施例中,所述n的取值可以根据实际情况进行调整。
所述判定模块330用于判定计算得到的第一校验码与第一标准校验码是否相同;还用于当计算得到的第一校验码与第一标准校验码相同时,输出第一下载指令;还用于当计算得到的第一校验码与第一标准校验码不相同时,输出第二下载指令。
其中,所述计时器/计数器控制寄存器内存储有第一标准校验码。其中,所述第一标准校验码用于与计算得到的第一校验码进行比对,从而确定所述第一预设接口是否连接有相应的存储器件。当确定所述第一校验码与所述第一标准校验码相同时,表明所述第一预设接口连接相应的存储器件,则可以从所述存储器件中下载配置代码。当确定所述第一校验码与所述第一标准校验码不相同时,表明所述第一预设接口未连接相应的存储器件,所述第二预设接口连接有相应的存储器件,则可以从所述第二预设接口连接的存储器件中下载配置代码。
所述下载模块340用于根据所述第一下载指令通过所述第一预设接口从所述第一预设接口连接的存储器件中下载配置代码;还用于根据所述第二下载指令通过所述计时器/计数器控制寄存器的第二预设接口从所述第二预设接口连接的存储器件中下载配置代码。
进一步地,所述获取模块310还用于通过所述计时器/计数器控制寄存器的第二预设接口获取第二启动代码。所述计算模块320还用于根据获取的第二启动代码计算第二校验码。所述判定模块330还用于确定计算得到的第二校验码与第二标准校验码相同时,维持输出第二下载指令,以使所述下载模块340继续从所述第二预设接口连接的存储器件中下载配置代码。
需要说明的是,所述第二启动代码是存储于与所述第二预设接口连接的存储器件内。所述第二启动代码可以为多位,如代码C0-Cn。在本实施例中,n可以为7,则代码的长度为8。则根据代码C0、C1、C2、C3、C4、C5、C6及C7来计算第二校验码。在其他的实施例中,所述n的取值可以根据实际情况进行调整。所述计时器/计数器控制寄存器内存储有第二标准校验码。其中, 所述第二标准校验码用于与所述第二预设接口连接的存储器件的第二校验码进行比对,从而确定所述第二预设接口是否连接有相应的存储器件。
进一步地,所述判定模块330在确定计算得到的第二校验码与第二标准校验码不相同时,输出停止指令。所述下载模块340还用于在接收到所述停止指令时停止从连接至所述第二预设接口的存储器件上下载配置代码。
其中,当所述第二校验码与所述第二标准校验码不相同时,表明所述第二预设接口连接的存储器件不是相应的存储器件,即所述第二预设接口连接的存储器件不正确,则需要停止从所述第二预设接口的存储器件中下载配置代码。因此,所述判定模块330可以提供下载配置代码的准确性。
在本实施例中,所述下载配置代码的系统300包括获取模块310、计算模块320、判定模块330及下载模块340。所述获取模块310用于通过所述计时器/计数器控制寄存器的第一预设接口获取第一启动代码。所述计算模块320用于根据获取的第一启动代码计算第一校验码。所述判定模块330用于判定计算得到的第一校验码与第一标准校验码是否相同;还用于当计算得到的第一校验码与第一标准校验码相同时,输出第一下载指令;还用于当计算得到的第一校验码与第一标准校验码不相同时,输出第二下载指令。所述下载模块340用于根据所述第一下载指令通过所述第一预设接口从所述第一预设接口连接的存储器件中下载配置代码;还用于根据所述第二下载指令通过所述计时器/计数器控制寄存器的第二预设接口从所述第二预设接口连接的存储器件中下载配置代码。因此,本发明可以使得计算器/计算器控制寄存器可以连接多个存储器,并可以根据需要选择性的从其中一个存储器件中下载配置代码,从而提高了所述计算器/计算器控制寄存器使用的灵活性。
请参阅图4及图5,本发明第三方案实施例提供一种计时器/计数器控制寄存器400。所述计算器/计算器控制寄存器400用于从第一或第二存储器件上下载配置代码。所述计时器/计数器控制寄存器400包括第一预设接口410、第二预设接口420及下载配置代码的系统430。所述第一预设接口410用于连接第一存储器件。所述第二预设接口420用于连接第二存储器件。所述下载配置代码的系统430通过所述第一预设接口410或所述第二预设接口420从相应的存储器件上下载配置代码。所述下载配置代码的系统430包括获取模块431、计 算模块432、判定模块433及下载模块434。
所述获取模块431用于通过所述计时器/计数器控制寄存器400的第一预设接口410获取第一启动代码。
需要说明的是,所述第一预设接口410与所述第二预设接口420不同。所述第一存储器与第二存储器不同。所述第一存储器可以为EEPROM。所述第二存储器可以为Flash。在本实施例中,所述第一预设接口410为IIC接口,所述第二预设接口420为SPI接口。所述第一预设接口410的数量为两个。所述第二预设接口的数量为四个。
所述计算模块432用于根据获取的第一启动代码计算第一校验码。
其中,所述第一启动代码是存储于与所述第一预设接口410连接的第一存储器件内。所述第一启动代码可以为多位,如代码C0-Cn。在本实施例中,n可以为7,则代码的长度为8。则根据代码C0、C1、C2、C3、C4、C5、C6及C7来计算第一校验码。在其他的实施例中,所述n的取值可以根据实际情况进行调整。
所述判定模块433用于判定计算得到的第一校验码与第一标准校验码是否相同;还用于当计算得到的第一校验码与第一标准校验码相同时,输出第一下载指令;还用于当计算得到的第一校验码与第一标准校验码不相同时,输出第二下载指令。
其中,所述计时器/计数器控制寄存器400内存储有第一标准校验码。其中,所述第一标准校验码用于与计算得到的第一校验码进行比对,从而确定所述第一预设接口410是否连接有第一存储器。当确定所述第一校验码与所述第一标准校验码相同时,表明所述第一预设接口410连接第一存储器,则可以从所述第一存储器中下载配置代码。当确定所述第一校验码与所述第一标准校验码不相同时,表明所述第一预设接口410未连接所述第一存储器,所述第二预设接口420连接有第二存储器,则可以从所述第二预设接口420连接的第二存储器中下载配置代码。
所述下载模块434用于根据所述第一下载指令通过所述第一预设接口410从所述第一存储器中下载配置代码;还用于根据所述第二下载指令通过所述第二预设接口420从所述第二存储器中下载配置代码。
进一步地,所述获取模块431还用于通过所述第二预设接口420中获取第二启动代码。所述计算模块432还用于根据获取的第二启动代码计算第二校验码。所述判定模块433还用于确定计算得到的第二校验码与第二标准校验码相同时,维持输出第二下载指令,以使所述下载模块434继续从所述第二存储器中下载配置代码。
需要说明的是,所述第二启动代码是存储于与所述第二预设接口连接的存储器件内。所述第二启动代码可以为多位,如代码C0-Cn。在本实施例中,n可以为7,则代码的长度为8。则根据代码C0、C1、C2、C3、C4、C5、C6及C7来计算第二校验码。在其他的实施例中,所述n的取值可以根据实际情况进行调整。所述计时器/计数器控制寄存器400内存储有第二标准校验码。其中,所述第二标准校验码用于与所述第二预设接口420连接的第二存储器的第二校验码进行比对,从而确定所述第二预设接口420是否正确连接有第二存储器。
进一步地,所述判定模块433在确定计算得到的第二校验码与第二标准校验码不相同时,则输出停止指令。所述下载模块434还用于在接收到所述停止指令时停止从连接至所述第二预设接口420的存储器上下载配置代码。
其中,当所述第二校验码与所述第二标准校验码不相同时,表明所述第二预设接口420未正确连接有第二存储器,则需要停止从所述第二预设接口的存储器件中下载配置代码。因此,所述判定模块433可以提高下载配置代码的准确性。
在本实施例中,所述计算器/计算器控制寄存器400包括下载配置代码的系统430。所述下载配置代码的系统430包括获取模块431、计算模块432、判定模块433及下载模块434。所述获取模块431用于通过所述第一预设接口410获取第一启动代码。所述计算模块432用于根据获取的第一启动代码计算第一校验码。所述判定模块433用于判定计算得到的第一校验码与第一标准校验码是否相同;还用于当计算得到的第一校验码与第一标准校验码相同时,输出第一下载指令;还用于当计算得到的第一校验码与第一标准校验码不相同时,输出第二下载指令。所述下载模块434用于根据所述第一下载指令通过所述第一预设接口从所述第一预设接口连接的第一存储器中下载配置代码;还用 于根据所述第二下载指令通过所述第二预设接口420从所述第二存储器中下载配置代码。因此,本发明所述计算器/计算器控制寄存器400可以连接多个存储器,并可以根据需要选择性的从其中一个存储器件中下载配置代码,从而提高了所述计算器/计算器控制寄存器400使用的灵活性。
可选地,所述第一预设接口410还通过相应的电阻连接至电压端VDD,以起到上拉电位的作用,以防止所述计算器/计算器控制寄存器400进行误判断。
以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围。

Claims (11)

  1. 一种下载配置代码的方法,应用于计时器/计数器控制寄存器中,用于自动识别计时器/计数器控制寄存器连接的存储器件,以从识别的存储器件中下载配置代码,所述方法包括:
    通过所述计时器/计数器控制寄存器的第一预设接口获取第一启动代码;
    根据获取的第一启动代码计算第一校验码;
    判定计算得到的第一校验码与第一标准校验码是否相同;
    当计算得到的第一校验码与第一标准校验码相同时,通过所述第一预设接口从所述第一预设接口连接的存储器件中下载配置代码;
    当计算得到的第一校验码与第一标准校验码不相同时,通过所述计时器/计数器控制寄存器的第二预设接口从所述第二预设接口连接的存储器件中下载配置代码。
  2. 如权利要求1所述的下载配置代码的方法,其中,当计算得到的第一校验码与第一标准校验码不相同时,通过所述计时器/计数器控制寄存器的第二预设接口从所述第二预设接口连接的存储器件中下载配置代码包括:
    通过所述计时器/计数器控制寄存器的第二预设接口获取第二启动代码;
    根据获取的第二启动代码计算第二校验码;
    确定计算得到的第二校验码与第二标准校验码相同时,继续从所述第二预设接口连接的存储器件中下载配置代码。
  3. 如权利要求2所述的下载配置代码的方法,其中,根据获取的第二启动代码计算第二校验码之后还包括:
    确定计算得到的第二校验码与第二标准校验码不相同时,停止从所述第二预设接口连接的存储器件中下载配置代码。
  4. 如权利要求1所述的下载配置代码的方法,其中,所述第一预设接口为IIC接口,所述第二预设接口为SPI接口。
  5. 一种下载配置代码的系统,应用于计时器/计数器控制寄存器中,用于自动识别计时器/计数器控制寄存器连接的存储器件,以从识别的存储器件中下载配置代码,其中:所述下载配置代码的系统包括:
    获取模块,用于通过所述计时器/计数器控制寄存器的第一预设接口获取第一启动代码;
    计算模块,用于根据获取的第一启动代码计算第一校验码;
    判定模块,用于判定计算得到的第一校验码与第一标准校验码是否相同;还用于当计算得到的第一校验码与第一标准校验码相同时,输出第一下载指令;还用于当计算得到的第一校验码与第一标准校验码不相同时,输出第二下载指令;
    下载模块,用于根据所述第一下载指令通过所述第一预设接口从所述第一预设接口连接的存储器件中下载配置代码;还用于根据所述第二下载指令通过所述计时器/计数器控制寄存器的第二预设接口从所述第二预设接口连接的存储器件中下载配置代码。
  6. 如权利要求5所述的下载配置代码的方法,其中,所述获取模块还用于通过所述计时器/计数器控制寄存器的第二预设接口获取第二启动代码;所述计算模块还用于根据获取的第二启动代码计算第二校验码,所述判定模块还用于确定计算得到的第二校验码与第二标准校验码相同时,维持输出第二下载指令,以使所述下载模块继续从所述第二预设接口连接的存储器件中下载配置代码。
  7. 如权利要求6所述的下载配置代码的方法,其中,所述判定模块在确定计算得到的第二校验码与第二标准校验码不相同时,输出停止指令,所述下载模块还用于在接收到所述停止指令时停止从连接至所述第二预设接口的存储器件上下载配置代码。
  8. 一种计时器/计数器控制寄存器,用于从第一或第二存储器件上下载配置代码,其中:所述计时器/计数器控制寄存器包括第一预设接口、第二预设接口及下载配置代码的系统,所述第一预设接口用于连接第一存储器件,所述第二预设接口用于连接第二存储器件,所述下载配置代码的系统通过所述第一预设接口或所述第二预设接口从相应的存储器件上下载配置代码,所述下载配置代码的系统包括:
    获取模块,用于通过所述计时器/计数器控制寄存器的第一预设接口获取第一启动代码;
    计算模块,用于根据获取的第一启动代码计算第一校验码;
    判定模块,用于判定计算得到的第一校验码与第一标准校验码是否相同;还用于当计算得到的第一校验码与第一标准校验码相同时,输出第一下载指令;还用于当计算得到的第一校验码与第一标准校验码不相同时,输出第二下载指令;
    下载模块,用于根据所述第一下载指令通过所述第一预设接口从所述第一预设接口连接的存储器件中下载配置代码;还用于根据所述第二下载指令通过所述计时器/计数器控制寄存器的第二预设接口从所述第二预设接口连接的存储器件中下载配置代码。
  9. 如权利要求8所述的下载配置代码的方法,其中,所述获取模块还用于通过所述计时器/计数器控制寄存器的第二预设接口获取第二启动代码;所述计算模块还用于根据获取的第二启动代码计算第二校验码,所述判定模块还用于确定计算得到的第二校验码与第二标准校验码相同时,维持输出第二下载指令,以使所述下载模块继续从所述第二预设接口连接的存储器件中下载配置代码。
  10. 如权利要求9所述的下载配置代码的方法,其中,所述判定模块在确定计算得到的第二校验码与第二标准校验码不相同时,输出停止指令,所述下载模块还用于在接收到所述停止指令时停止从连接至所述第二预设接口的存储器件上下载配置代码。
  11. 如权利要求9所述的下载配置代码的方法,其中,所述第一预设接口为IIC接口,所述第二预设接口为SPI接口,所述第一预设接口还通过相应的电阻连接至电压端。
PCT/CN2015/090539 2015-07-31 2015-09-24 一种下载配置代码的方法、系统及计时器/计数器控制寄存器 Ceased WO2017020411A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/905,059 US20170168850A1 (en) 2015-07-31 2015-09-24 Method of downloading configuration code, system and timer/counter control register

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510464745.8A CN105068800B (zh) 2015-07-31 2015-07-31 一种下载配置代码的方法、系统及计时器/计数器控制寄存器
CN201510464745.8 2015-07-31

Publications (1)

Publication Number Publication Date
WO2017020411A1 true WO2017020411A1 (zh) 2017-02-09

Family

ID=54498180

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/090539 Ceased WO2017020411A1 (zh) 2015-07-31 2015-09-24 一种下载配置代码的方法、系统及计时器/计数器控制寄存器

Country Status (3)

Country Link
US (1) US20170168850A1 (zh)
CN (1) CN105068800B (zh)
WO (1) WO2017020411A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111258838B (zh) * 2020-01-17 2023-05-23 南京芯驰半导体科技有限公司 验证组件生成方法、装置、存储介质及验证平台

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5664194A (en) * 1995-12-04 1997-09-02 Metricom, Inc. Method for autonomously transferring code to a computer without accessing local memory by the central processing unit
CN101976198A (zh) * 2010-10-27 2011-02-16 中兴通讯股份有限公司 一种嵌入式系统中控制应用程序启动的方法和装置
CN104503809A (zh) * 2015-01-08 2015-04-08 大唐微电子技术有限公司 一种实现应用下载更新的方法及装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8639625B1 (en) * 1995-02-13 2014-01-28 Intertrust Technologies Corporation Systems and methods for secure transaction management and electronic rights protection
US8316158B1 (en) * 2007-03-12 2012-11-20 Cypress Semiconductor Corporation Configuration of programmable device using a DMA controller
CN100511148C (zh) * 2007-11-12 2009-07-08 中兴通讯股份有限公司 一种cpu系统的启动方法及系统
US8793774B1 (en) * 2009-03-31 2014-07-29 Juniper Networks, Inc. Methods and apparatus for accessing a secure network segment
TW201123723A (en) * 2009-12-31 2011-07-01 Alcor Micro Corp I2C/SPI control interface circuitry, integrated circuit structure, and bus structure thereof
EP2729870A4 (en) * 2011-07-08 2014-12-17 Openpeak Inc SYSTEM AND METHOD FOR VALIDATING COMPONENTS DURING A STARTING PROCESS
CN103049694A (zh) * 2013-01-14 2013-04-17 上海慧银信息科技有限公司 一种智能金融交易终端的核心安全架构实现方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5664194A (en) * 1995-12-04 1997-09-02 Metricom, Inc. Method for autonomously transferring code to a computer without accessing local memory by the central processing unit
CN101976198A (zh) * 2010-10-27 2011-02-16 中兴通讯股份有限公司 一种嵌入式系统中控制应用程序启动的方法和装置
CN104503809A (zh) * 2015-01-08 2015-04-08 大唐微电子技术有限公司 一种实现应用下载更新的方法及装置

Also Published As

Publication number Publication date
CN105068800A (zh) 2015-11-18
CN105068800B (zh) 2018-09-14
US20170168850A1 (en) 2017-06-15

Similar Documents

Publication Publication Date Title
US10691806B2 (en) Self-measuring nonvolatile memory device systems and methods
US20120096255A1 (en) Server and method for managing i2c bus of the server
KR20180084394A (ko) 발화 완료 감지 방법 및 이를 구현한 전자 장치
EP3180712A1 (en) Techniques for automatically swapping languages and/or content for machine translation
CN109686391B (zh) 非易失性存储器装置及其操作方法及非易失性存储器封装
KR20170032424A (ko) 비휘발성 메모리 내의 복구 알고리즘
US9239684B2 (en) Electronic device and method for testing redundant array of independent disks level
CN105589770B (zh) 一种故障检测的方法和装置
US20140019741A1 (en) Method and system for booting electronic device from nand flash memory
WO2018187771A3 (en) Safe execution in place (xip) from flash memory
CN110096314A (zh) 一种接口初始化方法、装置、设备及计算机可读存储介质
US9250919B1 (en) Multiple firmware image support in a single memory device
US20120165991A1 (en) System and method for controlling humidity of a server
US10824552B2 (en) Patch mechanism in embedded controller for memory access
CN104156305B (zh) 一种应用程序测试方法及装置
US20170123923A1 (en) Method of error detection during a booting process, and a computer system for implementing the same
JP2019220128A5 (zh)
WO2017020411A1 (zh) 一种下载配置代码的方法、系统及计时器/计数器控制寄存器
US8621194B2 (en) Processor NAND flash boot system and method
BR112017018292B1 (pt) Método de adaptação de dpi e dispositivo eletrônico
CN109992289A (zh) 传感器固件升级方法、装置及设备
TWI600006B (zh) 快閃操作的儲存裝置
US10009872B2 (en) Mobile device, operating method thereof, and non-transitory computer readable storage medium for controlling an external device
CN106200847A (zh) 一种ARM平台实现Clear CMOS功能的方法
CN106095627B (zh) 一种功能模组的检测方法及移动终端

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 14905059

Country of ref document: US

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15900182

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15900182

Country of ref document: EP

Kind code of ref document: A1