Non-Volatile Memory Updating Apparatus and Method
20230244381 · 2023-08-03
Assignee
Inventors
Cpc classification
G06F3/0659
PHYSICS
G06F8/654
PHYSICS
G06F3/0607
PHYSICS
International classification
Abstract
A non-volatile memory updating apparatus updates an application code stored in a non-volatile memory and includes a volatile memory storing the application code; and a central processing unit recording the application code recorded in the volatile memory and a booting indicator indicating booting information of the application code in the non-volatile memory.
Claims
1. A non-volatile memory updating apparatus for updating an application code stored in a non-volatile memory, the non-volatile memory updating apparatus comprising: a volatile memory configured to store the application code; and a central processing unit configured to: record the application code in the volatile memory, record the application code that is recorded in the volatile memory, in the non-volatile memory, and record a booting indicator indicating booting information of the application code recorded in the non-volatile memory, when the application code is completely recorded in the non-volatile memory, wherein the central processing unit is further configured to determine whether the application code is updated in the non-volatile memory, on the basis of the presence of the booting indicator recorded in the non-volatile memory.
2. The non-volatile memory updating apparatus according to claim 1, wherein the central processing unit is further configured to determine that the application code is updated in the non-volatile memory, when the booting indicator exists in the non-volatile memory.
3. The non-volatile memory updating apparatus according to claim 2, wherein the central processing unit is further configured to: check the presence of the booting indicator when receiving an execution command for the application code, and execute the application code when it is confirmed that the booting indicator is completely recorded.
4. The non-volatile memory updating apparatus according to claim 1, wherein the central processing unit is further configured to: determine whether the application code is completely recorded in the non-volatile memory, stop updating the application code when it is confirmed that the application code is completely recorded in the non-volatile memory, and record the booting indicator in the non-volatile memory.
5. The non-volatile memory updating apparatus according to claim 4, wherein the central processing unit is further configured to determine whether the application code is completely recorded by comparing the application code recorded in the volatile memory with the application code recorded in the non-volatile memory.
6. The non-volatile memory updating apparatus according to claim 5, wherein the central processing unit is further configured to determine that the application code is completely recorded when the application code recorded in the volatile memory is identical to the application code recorded in the non-volatile memory.
7. The non-volatile memory updating apparatus according to claim 1, wherein the central processing unit is further configured to set a storage area in the non-volatile memory in which the application code is recorded, and record the application code in a reverse direction from a section with a high address in the storage area to a section with a low address in the storage area.
8. The non-volatile memory updating apparatus according to claim 7, wherein the central processing unit is further configured to record the booting indicator in an area with a lower address than an address of the storage area in which the application code is stored when the application code is completely recorded in the storage area.
9. The non-volatile memory updating apparatus according to claim 1, further comprising: a communication unit configured to receive the application code from an external device.
10. A battery management system (BMS), comprising the non-volatile memory updating apparatus according to claim 1.
11. A battery pack, comprising the non-volatile memory updating apparatus according to claim 1.
12. A non-volatile memory updating method for updating an application code stored in a non-volatile memory, the non-volatile memory updating method comprising: recording the application code in a volatile memory; recording the application code that is recorded in the volatile memory, in the non-volatile memory; and recording a booting indicator indicating booting information of the application code recorded in the non-volatile memory, when the application code is completely recorded in the non-volatile memory wherein the method further comprises, by a central processing: determining the application code is updated in the non-volatile memory, on the basis of the presence of the booting indicator recorded in the non-volatile memory.
Description
DESCRIPTION OF DRAWINGS
[0029] The accompanying drawings illustrate a preferred embodiment of the present disclosure and together with the foregoing disclosure, serve to provide further understanding of the technical features of the present disclosure, and thus, the present disclosure is not construed as being limited to the drawing.
[0030]
[0031]
[0032]
[0033]
[0034]
BEST MODE
[0035] Hereinafter, preferred embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. Prior to the description, it should be understood that the terms used in the specification and the appended claims should not be construed as limited to general and dictionary meanings, but interpreted based on the meanings and concepts corresponding to technical aspects of the present disclosure on the basis of the principle that the inventor is allowed to define terms appropriately for the best explanation.
[0036] Therefore, the description proposed herein is just a preferable example for the purpose of illustrations only, not intended to limit the scope of the disclosure, so it should be understood that other equivalents and modifications could be made thereto without departing from the scope of the disclosure.
[0037] In addition, in the present disclosure, if it is determined that a detailed description of a related known structure or function may obscure the subject matter of the present disclosure, the detailed description will be omitted.
[0038] Throughout the specification, when a portion is referred to as “comprising” or “including” any element, it means that the portion may include other elements further, without excluding other elements, unless specifically stated otherwise.
[0039] In addition, throughout the specification, when a portion is referred to as being “connected” to another portion, it is not limited to the case that they are “directly connected”, but it also includes the case where they are “indirectly connected” with another element being interposed between them.
[0040] A non-volatile memory updating apparatus 1 according to an embodiment of the present disclosure may be a non-volatile memory updating apparatus for updating an application code stored in a non-volatile memory 100. For example, the non-volatile memory updating apparatus 1 according to an embodiment of the present disclosure may be a device for updating an application code stored in a non-volatile memory 100 of a battery management system (BMS) included in a battery pack. For example, the non-volatile memory 100 according to an embodiment of the present disclosure may be a flash memory. In addition, the non-volatile memory updating apparatus 1 according to an embodiment of the present disclosure may be a microcontroller unit (MCU) provided in the BMS.
[0041]
[0042] Referring to
[0043] The volatile memory 200 may be configured to store an application code. For example, the volatile memory 200 may be a memory device configured to store data. Here, the application code may be a code designed using a programming language. For example, the application code may be a program code associated with the operation of a BMS.
[0044] The volatile memory 200 according to an embodiment of the present disclosure is a memory that stores data for operating a system when starting the system. The volatile memory 200 may be a memory that stores data only when the system is turned on and erases the stored data when the system is turned off. In addition, the volatile memory 200 may store the application code in a specific area therein. For example, the volatile memory 200 may be implemented using a random access memory (RAM), a static RAM (SRAM), a dynamic RAM (DRAM), a synchronous DRAM (SDRAM), or the like.
[0045] Also, as shown in
[0046] The non-volatile memory 100 may be a memory device that maintains the stored data even when a power supply is cut off. For example, the non-volatile memory 100 may be implemented using a flash memory device, a read only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable and programmable ROM (EPROM), a resistive memory device (e.g., a phase-change RAM (PRAM), a ferroelectric RAM (FRAM) and a resistive RAM (RRAM)), or the like.
[0047] In addition, as shown in
[0048] The central processing unit 300 may record an application code in the volatile memory 200. For example, as shown in
[0049] In addition, the central processing unit 300 may record the application code, which is recorded in the volatile memory 200, in the non-volatile memory 100. For example, as shown in
[0050] In addition, if the application code is completely recorded in the non-volatile memory 100, the central processing unit 300 may record a booting indicator indicating booting information of the application code in the non-volatile memory 100. For example, the central processing unit 300 may determine whether the application code is completely recorded in the non-volatile memory 100. For example, the central processing unit 300 may determine that the application code is completely recorded if a total size of the application code is recorded on the basis of the size (for example, byte) of the application code. In addition, the central processing unit 300 may record the booting indicator in the non-volatile memory 100 if the application code is completely recorded in the non-volatile memory 100. Here, the booting indicator may indicate the booting information of the application code recorded in the non-volatile memory 100. For example, the booting indicator may be a code executed by the central processing unit 300 before the application code is executed, in order to execute the application code. In addition, the booting indicator may indicate the booting information including a unique identifier, a location and a size of the application code.
[0051] Preferably, as shown in
[0052] The reading module 310 may access the volatile memory 200 or the non-volatile memory 100 and read the application code recorded in the volatile memory 200 or the non-volatile memory 100. For example, the reading module 310 may execute the application code recorded in the volatile memory 200 or the non-volatile memory 100. In addition, when reading the application code, the reading module 310 may sequentially read the application code from a memory area with a low address to a memory area with a high address.
[0053] The writing module 330 may access the volatile memory 200 or the non-volatile memory 100 and record the application code in the volatile memory 200 or the non-volatile memory 100. For example, the writing module 330 may store the application code recorded in the volatile memory 200 or the non-volatile memory 100. When writing the application code, the writing module 330 may record the application code in a forward direction from a memory area with a low address to a memory area with a high address.
[0054] In addition, when recording the application code, the writing module 330 according to an embodiment of the present disclosure may record the application code in a reverse order from a memory area with a high address to a memory area with a low address. In this case, the end of the application code may be recorded in the memory area with a high address, and the start of the application code may be recorded in the memory area with a low address.
[0055] The determining module 350 may determine whether the application code recorded in the non-volatile memory 100 is normally recorded. For example, the determining module 350 may determine whether all data of the application code is normally recorded in the non-volatile memory 100 without interruption. In addition, the determining module 350 may stop updating the application code when it is confirmed that the application code is normally recorded in the non-volatile memory 100. For example, the determining module 350 may stop updating the application code when it is confirmed that the application code is normally recorded in the non-volatile memory 100.
[0056] Preferably, the determining module 350 according to an embodiment of the present disclosure may compare the application code recorded in the volatile memory 200 and the application code recorded in the non-volatile memory 100. In addition, the determining module 350 may determine whether the application code is normally recorded by comparing the application code recorded in the volatile memory 200 and the application code recorded in the non-volatile memory 100.
[0057] Preferably, the determining module 350 according to an embodiment of the present disclosure may determine that the application code is normally recorded, if the application code recorded in the volatile memory 200 is identical to the application code recorded in the non-volatile memory 100.
[0058] Meanwhile, the central processing unit 300 may be implemented to optionally include a central processing unit (CPU), a processor, an application-specific integrated circuit (ASIC), other chipsets, a logic circuit, a register, and a communication modem and/or a data processing device, known in the art, to perform the above operation.
[0059] Preferably, as shown in
[0060] The communication unit 400 may be configured to receive the application code from an external device 50. For example, as shown in
[0061]
[0062] Referring to
[0063] The first storage area 101 may indicate a zeroth block and have addresses of 0x0100_0000 to 0x103FFFF with a size of 256 KB. In addition, the second storage area 102 may indicate a first block and have addresses of 0x0104_0000 to 0x107FFFF with a size of 256 KB. In addition, the third storage area 103 may represent a second block and have addresses from 0x0108_0000 to 0x10BFFFF with a size of 256 KB. In addition, the fourth storage area 104 may indicate a third block and have addresses of 0x010C_0000 to 0x10FFFFF with a size of 256 KB. In addition, the fifth storage area 105 may indicate a fourth block and have addresses of 0x0110 0000 to 0x113FFFF with a size of 256 KB.
[0064] Preferably, the central processing unit 300 may record the application code in a reverse direction from a section with a high address in the storage area to a section with a low address in the storage area. For example, as shown in
[0065] Preferably, if the application code is completely recorded in the storage area, the central processing unit 300 may record a booting indicator 110 in an area with a lower address lower than the address of the storage area in which the application code is stored. For example, the central processing unit 300 may determine the size of the application code, and may determine that the application code is completely recorded, if all data of the application code is recorded in the storage area on the basis of the size of the application code. Subsequently, the central processing unit 300 may record the booting indicator 110 in an area with a lower address than the address of the storage area in which the application code is stored.
[0066] For example, in the embodiment of
[0067] Preferably, the central processing unit 300 may determine whether the application code is normally recorded, on the basis of the presence of the booting indicator 110 recorded in the non-volatile memory 100. For example, as shown in the embodiment of
[0068] Preferably, if the central processing unit 300 receives an execution command for the application code, the central processing unit 300 may check the presence of the booting indicator 110. In addition, if it is determined that the booting indicator 110 is normally recorded, the central processing unit 300 may execute the application code. For example, as shown in the embodiment of
[0069] Through this configuration, the non-volatile memory updating apparatus according to an embodiment of the present disclosure may check whether the application code is normally recorded only with the booting indicator 110, without having to record a separate flag (for example, Magic Flag) having a specific value in a specific area of the non-volatile memory 100.
[0070] The non-volatile memory updating apparatus according to the present disclosure may include a battery management system (BMS). That is, the BMS according to the present disclosure may be included in the non-volatile memory updating apparatus of the present disclosure as described above. In this configuration, at least a part of the components of the non-volatile memory updating apparatus according to the present disclosure may be implemented by supplementing or adding functionality of components included in the conventional BMS. For example, the central processing unit 300 and the non-volatile memory 100 of the non-volatile memory updating apparatus according to the present disclosure may be implemented as components of the BMS.
[0071] In addition, the non-volatile memory updating apparatus according to the present disclosure may be provided to a battery pack. That is, the battery pack according to the present disclosure may include the non-volatile memory updating apparatus according to the present disclosure. Here, the battery pack may include at least one secondary battery, the non-volatile memory updating apparatus, electrical components (such as a BMS, a relay and a fuse), a case and so on.
[0072]
[0073] As shown in
[0074] First, in the volatile memory recording step (S100), the application code may be recorded in the volatile memory. Subsequently, in the non-volatile memory recording step S110, the application code recorded in the volatile memory may be recorded in the non-volatile memory. Subsequently, in the booting indicator recording step (S120), if the application code is completely recorded in the non-volatile memory, a booting indicator indicating booting information of the application code may be recorded in the non-volatile memory.
[0075] Preferably, in the booting indicator recording step (S120) according to an embodiment of the present disclosure, it is determined whether the application code recorded in the non-volatile memory is normally recorded, and then if it is confirmed that the application code is normally recorded in the non-volatile memory, updating the application code may be stopped.
[0076] Preferably, in the booting indicator recording step (S120) according to an embodiment of the present disclosure, it may be determined whether the application code is normally recorded, on the basis of the presence of the booting indicator recorded in the non-volatile memory.
[0077] Preferably, the non-volatile memory updating method according to an embodiment of the present disclosure may further include an application code executing. In the application code executing step, when the execution command for the application code is received, the presence of the booting indicator may be checked, and if it is confirmed that the booting indicator is normally recorded, the application code may be executed.
[0078] Preferably, in the non-volatile memory recording step (S110) according to an embodiment of the present disclosure, it may be determined whether the application code is normally recorded by comparing the application code recorded in the volatile memory and the application code recorded in the non-volatile memory.
[0079] Preferably, in the non-volatile memory recording step (S110) according to an embodiment of the present disclosure, if the application code recorded in the volatile memory is identical to the application code recorded in the non-volatile memory, it may be determined that the application code is normally recorded.
[0080] Preferably, in the non-volatile memory recording step (S110) according to an embodiment of the present disclosure, a storage area in the non-volatile memory where the application code is stored may be set, and the application code may be recorded in a reverse direction from a section with a high address in the storage area to a section with a low address in the storage area.
[0081] Preferably, in the booting indicator recording step (S120) according to an embodiment of the present disclosure, if the application code is completely recorded in the storage area, the booting indicator may be recorded in an area with a lower address than the address of the storage area where the application code is stored.
[0082] Also, when the control logic is implemented in software, the central processing unit may be implemented as a set of program modules. At this time, the program modules may be stored in a memory device and executed by the central processing unit.
[0083] In addition, there is no particular limitation on the types of various control logics of the central processing unit, as long as one or more control logics are combined and the combined control logic is written in a computer-readable code system so that the computer-readable access is possible. As one example, the recording medium includes at least one selected from the group consisting of a ROM, a RAM, a register, a CD-ROM, a magnetic tape, a hard disk, a floppy disk and an optical data recording device. In addition, the code system may be stored and executed in a distributed manner on computers connected through a network. Moreover, functional programs, code and segments for implementing the combined control logics may be easily inferred by programmers in the technical field to which the present disclosure belongs.
[0084] The present disclosure has been described in detail. However, it should be understood that the detailed description and specific examples, while indicating preferred embodiments of the disclosure, are given by way of illustration only, since various changes and modifications within the scope of the disclosure will become apparent to those skilled in the art from this detailed description.
REFERENCE SIGNS
[0085] 1: non-volatile memory updating apparatus [0086] 50: external device [0087] 100: non-volatile memory [0088] 110: booting indicator [0089] 200: volatile memory [0090] 300: central processing unit [0091] 310: reading module [0092] 330: writing module [0093] 350: determining module [0094] 400: communication unit [0095] 500: data bus