KR20210064994A - Method for updating vehicular control unit - Google Patents

Method for updating vehicular control unit Download PDF

Info

Publication number
KR20210064994A
KR20210064994A KR1020190168432A KR20190168432A KR20210064994A KR 20210064994 A KR20210064994 A KR 20210064994A KR 1020190168432 A KR1020190168432 A KR 1020190168432A KR 20190168432 A KR20190168432 A KR 20190168432A KR 20210064994 A KR20210064994 A KR 20210064994A
Authority
KR
South Korea
Prior art keywords
data
sector
difference
version
new version
Prior art date
Application number
KR1020190168432A
Other languages
Korean (ko)
Other versions
KR102275140B1 (en
Inventor
이덕주
Original Assignee
현대오트론 주식회사
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 현대오트론 주식회사 filed Critical 현대오트론 주식회사
Priority to US17/101,530 priority Critical patent/US11650811B2/en
Publication of KR20210064994A publication Critical patent/KR20210064994A/en
Application granted granted Critical
Publication of KR102275140B1 publication Critical patent/KR102275140B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60RVEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
    • B60R16/00Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
    • B60R16/02Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

A method for updating a vehicle controller according to a preferred embodiment of the present invention comprises: a step of generating low difference data by comparing data of an old version and a new version; a step of generating divided difference data by dividing the low difference data for each memory sector; and a step of updating the old version to the new version using the divided difference data. Therefore, the present invention is capable of having an effect of enabling an effective and fast differential update.

Description

차량용 제어기의 업데이트 방법{METHOD FOR UPDATING VEHICULAR CONTROL UNIT}How to update a vehicle controller {METHOD FOR UPDATING VEHICULAR CONTROL UNIT}

본 발명은 차량용 제어기의 업데이트 방법에 관한 것이다. 더욱 상세하게는, 본 발명은 차분 업데이트 방식으로 차량용 제어기의 소프트웨어 또는 정보를 업데이트하는 차량용 제어기의 업데이트 방법에 관한 것이다.The present invention relates to a method for updating a vehicle controller. More particularly, the present invention relates to an update method of a vehicle controller for updating software or information of the vehicle controller in a differential update method.

현재 차량에는 기술 발전에 따라 사용자 편의성을 위한 각종 전자 장치가 적용되고 있는데, 각종 전자 장치를 제어하기 위한 차량용 제어기(MCU : Micro Controller Unit)의 소프트웨어 또는 정보를 갱신하기 위한 업데이트 기술이 요구된다.Currently, various electronic devices for user convenience are applied to vehicles according to technological development, and an update technology for updating software or information of a micro controller unit (MCU) for controlling various electronic devices is required.

이러한 요구에 발맞춰 차량용 제어기의 소프트웨어 또는 정보를 유선이 아닌 무선으로 업데이트할 수 있는 OTA(Over-the?Air) 업데이트 기술 개발이 이루어지고 있다.In response to this demand, over-the-air (OTA) update technology that can update software or information of a vehicle controller wirelessly rather than wiredly is being developed.

한편, 업데이트 기술의 경우, 각종 전자 장치의 소프트웨어 업데이트를 위한 전체 데이터 중에서 변경된 일부분만 업데이트하는 차분 업데이트 기술이 있으며, 차분 업데이트 기술은 대용량의 메모리와 고사양의 중앙처리장치의 지원을 필요로 한다.On the other hand, in the case of the update technology, there is a differential update technology that updates only a changed part of all data for software update of various electronic devices, and the differential update technology requires a large-capacity memory and support from a high-end CPU.

이러한 차분 업데이트 기술은, 고사양의 어플리케이션 프로세서(AP, Application Processor)의 기반하에 동작하는 안드로이드나 리눅스 파일 시스템에 보편적으로 사용되고 있는 기술이다.This differential update technique is a technique commonly used in Android or Linux file systems that operate on the basis of a high-spec application processor (AP).

그러나, 차량용 제어기의 경우에는 상대적으로 저사양의 CPU와 저용량의 메모리를 갖고 있고, 소프트웨어 또는 정보를 저장하는 플래쉬 메모리의 특성상 일반적인 차분 업데이트 기술을 적용할 수 없는 문제점이 있다.However, in the case of a vehicle controller, it has a relatively low-spec CPU and low-capacity memory, and there is a problem in that a general differential update technique cannot be applied due to the characteristics of a flash memory for storing software or information.

대한민국 공개특허 제2019-0074346호 (발명의 명칭: 차량의 소프트웨어 업데이트 방법과 이를 이용한 차량)Republic of Korea Patent Publication No. 2019-0074346 (Title of the invention: vehicle software update method and vehicle using the same)

이에 본 발명은 상기한 사정을 감안하여 안출된 것으로, 차량용 제어기의 소프트웨어 또는 정보를 차분 업데이트 방식으로 효과적으로 업데이트할 수 있는 차량용 제어기의 업데이트 방법을 제공하는 것을 목적으로 한다.Accordingly, the present invention has been devised in view of the above circumstances, and an object of the present invention is to provide an update method for a vehicle controller capable of effectively updating software or information of a vehicle controller using a differential update method.

상기 목적을 달성하기 위한 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법은, 구 버전과 신 버전의 데이터를 비교하여 로우 차분 데이터를 생성하는 단계; 상기 로우 차분 데이터를 메모리 섹터별로 분할하여 분할 차분 데이터를 생성하는 단계; 및 상기 분할 차분 데이터를 이용하여 상기 구 버전을 상기 신 버전으로 업데이트하는 단계;를 포함한다.According to a preferred embodiment of the present invention for achieving the above object, there is provided a method for updating a vehicle controller, comprising: generating low difference data by comparing data of an old version and a new version; generating divided difference data by dividing the row difference data for each memory sector; and updating the old version to the new version using the divided difference data.

상기 로우 차분 데이터는, 동일, 추가, 변경, 삭제 데이터를 포함하여 구성될 수 있다.The row difference data may include identical, added, changed, and deleted data.

상기 동일 데이터와 상기 삭제 데이터는, 사이즈 정보를 포함하고, 상기 추가 데이터와 상기 변경 데이터는, 사이즈 정보와 데이터 정보를 포함할 수 있다.The same data and the deleted data may include size information, and the additional data and the changed data may include size information and data information.

상기 분할 차분 데이터를 생성하는 단계는, 상기 로우 차분 데이터를 섹터 순으로 순차적으로 로드하는 단계, 상기 로드된 데이터의 구 버전 주소와 신 버전 주소를 계산하는 단계, 및 상기 신 버전 주소에 해당하는 메모리 섹터에 상기 로드된 데이터를 이동하는 단계를 포함할 수 있다.The generating of the divided difference data may include sequentially loading the raw differential data in sector order, calculating old version addresses and new version addresses of the loaded data, and a memory corresponding to the new version address. It may include moving the loaded data to a sector.

상기 분할 차분 데이터를 생성하는 단계는, 상기 로드된 데이터가 동일 데이터, 추가 데이터, 또는 변경 데이터이고, 둘 이상의 메모리 섹터에 오버랩되는 경우, 오버랩된 데이터를 추가 분할하는 단계를 포함할 수 있다.The generating of the divided difference data may include additionally dividing the overlapped data when the loaded data is the same data, additional data, or changed data and overlaps two or more memory sectors.

상기 분할 차분 데이터를 생성하는 단계는, 상기 메모리 섹터에 이동되는 데이터를 고려하여, 데이터 이동의 역순으로 섹터별 차분 해제 순서를 정하는 단계를 포함할 수 있다.The generating of the divided difference data may include determining a difference cancellation order for each sector in a reverse order of data movement in consideration of data moved to the memory sector.

상기 분할 차분 데이터를 생성하는 단계는, 상기 메모리 섹터에 이동되는 데이터의 구 버전의 섹터 주소를 구 버전의 참조 위치로 정하는 단계를 포함할 수 있다.The generating of the divided difference data may include determining a sector address of the old version of the data moved to the memory sector as a reference location of the old version.

상기 분할 차분 데이터를 생성하는 단계는, 상기 차분 해제 순서와 상기 구 버전의 참조 위치를 상기 분할 차분 데이터에 포함시키는 단계를 포함할 수 있다.The generating of the divided difference data may include including the difference cancellation order and the reference position of the old version in the divided difference data.

상기 메모리 섹터는, 상기 구 버전 및 상기 로우 차분 데이터와 다른 메모리 장치에 적용될 수 있다.The memory sector may be applied to a memory device different from the old version and the raw difference data.

상기 메모리 섹터는 차분 해제 버퍼로서 플래쉬 메모리 또는 SRAM를 구성할 수 있다.The memory sector may constitute a flash memory or SRAM as a difference release buffer.

상기 신 버전으로 업데이트하는 단계는, 상기 분할 차분 데이터를 차분 해제하기 위하여, 상기 구 버전의 참조 위치를 참조하여 구 버전의 주소값을 획득하는 단계, 상기 분할 차분 데이터가 저장되는 차분 해제 버퍼의 시작 주소를 신 버전의 주소값으로 획득하는 단계, 및 상기 분할 차분 데이터의 데이터 종류, 상기 구 버전 주소값, 및 상기 신 버전의 주소값에 따라 상기 분할 차분 데이터를 차분 해제하는 단계를 포함할 수 있다.The step of updating to the new version includes: obtaining an address value of the old version by referring to a reference position of the old version in order to de-differentiate the divided difference data; starting a difference cancellation buffer in which the divided difference data is stored obtaining an address as an address value of the new version; and de-differentiating the divided difference data according to the data type of the divided difference data, the old version address value, and the address value of the new version .

상기 차분 해제하는 단계는, 미리 마련된 차분 해제 순서를 고려하여 분할 차분 데이터를 차분 해제할 수 있다.In the step of canceling the difference, the divided difference data may be released in consideration of a predetermined difference canceling procedure.

상기 신 버전으로 업데이트하는 단계는, 상기 분할 차분 데이터의 데이터 종류가 동일 데이터인 경우, 상기 동일 데이터의 사이즈만큼 상기 구 버전의 주소값과 상기 신 버전의 주소값을 증가하는 단계를 포함할 수 있다.The updating to the new version may include increasing the address value of the old version and the address value of the new version by the size of the same data when the data type of the divided difference data is the same data. .

상기 신 버전으로 업데이트하는 단계는, 상기 분할 차분 데이터의 데이터 종류가 추가 데이터인 경우, 상기 추가 데이터의 사이즈만큼 상기 신 버전의 주소값을 증가하는 단계를 포함할 수 있다.The updating to the new version may include increasing the address value of the new version by a size of the additional data when the data type of the divided difference data is additional data.

상기 신 버전으로 업데이트하는 단계는, 상기 분할 차분 데이터의 데이터 종류가 변경 데이터인 경우, 상기 변경 데이터의 사이즈만큼 상기 구 버전의 주소값과 상기 신 버전의 주소값을 증가하는 단계를 포함할 수 있다.The updating to the new version may include increasing the address value of the old version and the address value of the new version by the size of the changed data when the data type of the divided difference data is changed data. .

상기 신 버전으로 업데이트하는 단계는, 상기 분할 차분 데이터의 데이터 종류가 삭제 데이터인 경우, 상기 삭제 데이터의 사이즈만큼 상기 구 버전의 주소값을 증가하는 단계를 포함할 수 있다.The updating to the new version may include increasing the address value of the old version by the size of the deleted data when the data type of the divided difference data is deleted data.

상기 구 버전과 상기 로우 차분 데이터는 동일한 플래쉬 메모리에 저장될 수 있다.The old version and the raw difference data may be stored in the same flash memory.

본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 의하면, 저사양의 처리 장치와 저용량의 메모리를 갖는 차량용 제어기에 대하여 효과적이고 빠른 차분 업데이트를 가능하게 하는 효과가 있다.According to the update method of the vehicle controller according to the preferred embodiment of the present invention, there is an effect of enabling effective and fast differential update for the vehicle controller having a low-spec processing device and a low-capacity memory.

도 1은 차량용 제어기의 업데이트를 위한 시스템 구성을 설명하는 도면이다.
도 2는 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 차분 데이터를 생성하는 과정을 설명하는 도면이다.
도 3은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 생성된 차분 데이터를 나타내는 도면이다.
도 4는 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 차분 데이터를 생성하는 예시를 나타낸다.
도 5는 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 차분 데이터를 생성하는 과정을 설명하는 순서도이다.
도 6은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 섹터별로 분할한 분할 차분 데이터를 나타낸다.
도 7은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 데이터 추가에 따라 예상되는 데이터 이동을 나타내는 도면이다.
도 8은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 데이터 추가시 섹터별 차분 해제 순서가 순방향인 경우에 발생하는 문제 상황을 설명하기 위한 도면이다.
도 9는 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 데이터 추가시 섹터별 차분 해제 순서가 역방향인 경우에 도 9의 문제 상황을 해결할 수 있음을 보여주는 도면이다.
도 10은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 데이터 삭제에 따라 예상되는 데이터 이동을 나타내는 도면이다.
도 11은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 데이터 삭제시 섹터별 차분 해제 순서가 역방향인 경우에 발생하는 문제 상황을 설명하기 위한 도면이다.
도 12는 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 데이터 삭제시 섹터별 차분 해제 순서가 순방향인 경우에 도 11의 문제 상황을 해결할 수 있음을 보여주는 도면이다.
도 13은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 데이터 추가 및 삭제에 따라 예상되는 데이터 이동을 나타내는 도면이다.
도 14는 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 섹터별 데이터 이동을 나타내는 도면이다.
도 15는 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 섹터별 차분 해제 순서를 나타내는 도면이다.
도 16은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 섹터별 차분데이터 해제 방법을 나타내는 순서도이다.
도 17은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 메모리 영역별 저장되는 데이터를 나타내는 제1 도면이다.
도 18은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 메모리 영역별 저장되는 데이터를 나타내는 제2 도면이다.
도 19은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 섹터별 차분 해제 순서를 변경하여 차분 해제하는 제1 실시예이다.
도 20은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 섹터별 차분 해제 순서를 변경하여 차분 해제하는 제2 실시예이다.
1 is a view for explaining a system configuration for updating a vehicle controller.
2 is a view for explaining a process of generating difference data in a method for updating a vehicle controller according to a preferred embodiment of the present invention.
3 is a diagram illustrating difference data generated in a method for updating a vehicle controller according to a preferred embodiment of the present invention.
4 illustrates an example of generating difference data in a method for updating a vehicle controller according to a preferred embodiment of the present invention.
5 is a flowchart illustrating a process of generating difference data in a method of updating a vehicle controller according to a preferred embodiment of the present invention.
6 is a diagram illustrating divided difference data divided by sectors in a method for updating a vehicle controller according to a preferred embodiment of the present invention.
7 is a diagram illustrating expected data movement according to data addition in a method for updating a vehicle controller according to a preferred embodiment of the present invention.
FIG. 8 is a diagram for explaining a problematic situation that occurs when an order of releasing a difference for each sector is a forward direction when adding data in a method for updating a controller for a vehicle according to a preferred embodiment of the present invention.
FIG. 9 is a diagram showing that the problem situation of FIG. 9 can be solved in the case in which the order of releasing difference for each sector is reversed when data is added in the update method of the vehicle controller according to the preferred embodiment of the present invention.
10 is a diagram illustrating expected data movement according to data deletion in a method of updating a vehicle controller according to a preferred embodiment of the present invention.
11 is a diagram for explaining a problem that occurs when the order of releasing difference for each sector is reversed when data is deleted in the updating method of the vehicle controller according to the preferred embodiment of the present invention.
FIG. 12 is a diagram showing that the problem situation of FIG. 11 can be solved when the order of releasing difference for each sector is in the forward direction when data is deleted in the updating method of the vehicle controller according to the preferred embodiment of the present invention.
13 is a diagram illustrating expected data movement according to data addition and deletion in a method of updating a vehicle controller according to a preferred embodiment of the present invention.
14 is a diagram illustrating data movement for each sector in a method for updating a vehicle controller according to a preferred embodiment of the present invention.
15 is a diagram illustrating a difference canceling procedure for each sector in a method for updating a vehicle controller according to a preferred embodiment of the present invention.
16 is a flowchart illustrating a method of releasing differential data for each sector in a method for updating a vehicle controller according to a preferred embodiment of the present invention.
17 is a first diagram illustrating data stored in each memory area in a method of updating a vehicle controller according to a preferred embodiment of the present invention.
18 is a second diagram illustrating data stored in each memory area in a method of updating a vehicle controller according to a preferred embodiment of the present invention.
19 is a first embodiment of releasing a difference by changing a difference canceling order for each sector in a method for updating a vehicle controller according to a preferred embodiment of the present invention.
20 is a second embodiment of releasing a difference by changing a difference canceling order for each sector in a method for updating a vehicle controller according to a preferred embodiment of the present invention.

이하, 본 발명의 바람직한 실시예를 첨부된 도면들을 참조하여 상세히 설명한다. 우선 각 도면의 구성 요소들에 참조 부호를 부가함에 있어서, 동일한 구성 요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 이하에서 본 발명의 바람직한 실시예를 설명할 것이나, 본 발명의 기술적 사상은 이에 한정하거나 제한되지 않고 당업자에 의해 변형되어 다양하게 실시될 수 있음은 물론이다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. First, in adding reference numerals to the components of each drawing, it should be noted that the same components are given the same reference numerals as much as possible even though they are indicated on different drawings. In addition, preferred embodiments of the present invention will be described below, but the technical spirit of the present invention is not limited thereto and may be variously implemented by those skilled in the art without being limited thereto.

도 1은 차량용 제어기의 업데이트를 위한 시스템 구성을 설명하는 도면이다.1 is a view for explaining a system configuration for updating a vehicle controller.

차량용 제어기의 업데이트를 위한 시스템 구성으로서, 업데이트 정보를 제공하는 서버(1)와 상기 서버(1)와 통신하여 내부에 구비된 제어기(20)의 소프트웨어 또는 정보를 업데이트하는 차량(10)을 포함한다. 서버(1)와 차량(10)은 유선 방식으로 연결될 수 있으나, OTA(over-the-air) 방식의 업데이트를 위하여 무선 방식으로 연결될 수 있다.As a system configuration for updating a vehicle controller, it includes a server 1 that provides update information and a vehicle 10 that communicates with the server 1 to update software or information of the controller 20 provided therein. . The server 1 and the vehicle 10 may be connected in a wired manner, but may be connected in a wireless manner for over-the-air (OTA) update.

차량(10)에는 적어도 하나의 제어기(20)를 포함하고, 상기 제어기(20)는 차량의 특정 부분을 전기적으로 제어하거나, 운전자에게 특정 정보를 제공하기 위한 기능을 수행할 수 있다.The vehicle 10 includes at least one controller 20 , and the controller 20 may perform a function to electrically control a specific part of the vehicle or to provide specific information to the driver.

제어기(20)는, 제어기(20)의 기능을 제어하는 주제어부(30), 상기 제어기(20)의 외부와 통신을 수행하는 통신부(40), 제어기(20)의 기능 수행을 위한 소프트웨어 또는 정보를 저장하는 제 1 메모리(100)를 포함할 수 있다. 또한, 제어기(20)는 상기 제 1 메모리(100) 외에 추가적인 제 2 메모리(200)를 더 포함할 수 있다. 일 실시예에서, 상기 제 1 메모리(100)는 비활성 기억매체의 일종인 플래쉬 메모리(flash memory)일 수 있고, 제 2 메모리(200)는 RAM(random access memory)일 수 있다. 또한, 상기 제 2 메모리(200)는 SRAM(static random access memory)일 수 있다. 그러나, 본 발명의 실시에 있어서 제 1 메모리(100)와 제 2 메모리(200)가 상기한 바에 한정되는 것은 아님은 물론이다.The controller 20 includes a main control unit 30 that controls the functions of the controller 20 , a communication unit 40 that communicates with the outside of the controller 20 , and software or information for performing the functions of the controller 20 . It may include a first memory 100 for storing the. In addition, the controller 20 may further include an additional second memory 200 in addition to the first memory 100 . In an embodiment, the first memory 100 may be a flash memory, which is a type of non-volatile storage medium, and the second memory 200 may be a random access memory (RAM). Also, the second memory 200 may be a static random access memory (SRAM). However, it goes without saying that the first memory 100 and the second memory 200 are not limited to the above-described embodiments of the present invention.

상기 제 1 메모리(100)에 저장된 소프트웨어 또는 정보를 업데이트하고자 하는 경우, 서버(1)로부터의 데이터는 통신부(40)를 통해 주제어부(30)로 전달되고, 주제어부(30)는 해당 데이터를 이용하여 제 1 메모리(100)에 저장된 소프트웨어 또는 정보를 업데이트한다. 이 경우, 주제어부(30)는 제 1 메모리(100)의 소프트웨어 또는 정보를 업데이트함에 있어서 제 2 메모리(200)에 일부 데이터를 임시 저장하여 활용하는 것도 가능할 수 있다.When it is desired to update software or information stored in the first memory 100 , data from the server 1 is transmitted to the main control unit 30 through the communication unit 40 , and the main control unit 30 transmits the data. It is used to update software or information stored in the first memory 100 . In this case, it may be possible for the main controller 30 to temporarily store and utilize some data in the second memory 200 when updating software or information of the first memory 100 .

한편, 본 발명에 있어서, 차량용 제어기(20)의 업데이트는 차분 업데이트 방식으로 수행될 수 있다. 본 발명에 있어서, 차분 업데이트는 제어기(20)에 기 저장된 파일 정보와 업데이트할 파일 정보의 차이가 있는 부분, 즉 차분을 이용하여 소프트웨어 또는 정보를 업데이트하는 것을 말한다. 본 발명에 따른 차량용 제어기의 업데이트 방법은, 제어기(20)에 저장된 구 버전의 소프트웨어 또는 정보와 업데이트될 신 버전의 소프트웨어 또는 정보를 비교하여 차분 데이터를 생성하고 차분 데이터를 이용하여 업데이트를 수행한다.Meanwhile, in the present invention, the update of the vehicle controller 20 may be performed using a differential update method. In the present invention, the differential update refers to updating software or information using a difference between the file information pre-stored in the controller 20 and the file information to be updated, that is, the difference. In the method for updating a vehicle controller according to the present invention, difference data is generated by comparing the old version software or information stored in the controller 20 with the new version software or information to be updated, and the update is performed using the difference data.

본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법은, 대용량의 메모리를 사용하지 않고, 소프트웨어 또는 정보가 저장된 제 1 메모리(100)의 섹터에 신 버전의 소프트웨어 또는 정보를 업데이트할 수 있다.The updating method of the vehicle controller according to the preferred embodiment of the present invention may update a new version of software or information in a sector of the first memory 100 in which software or information is stored without using a large-capacity memory.

차분 데이터의 생성Generation of difference data

섹터 구조를 갖는 플래쉬 메모리는, 읽고 쓰는 것이 자유로운 RAM과는 달리 플래쉬 메모리의 기록을 위해서는 기록을 원하는 위치의 섹터를 지운 후에야 쓰기가 가능하다는 특징을 갖는다. 플래쉬 메모리의 섹터를 지우는 방식으로는 전 섹터(total sector)를 한꺼번에 지우는 chip erase 방식과 섹터별로 지우는 sector erase 방식이 있다. 만약, 제어기(20)의 연산 능력이 우수하고 업데이트될 신 버전의 프로그램 또는 정보를 모두 저장할 수 있는 저장 매체를 갖고 있는 경우라면, 구 버전의 프로그램 또는 정보(이하에서는 간단히 ‘구 버전’이라는 용어를 사용할 수 있음)를 모두 삭제하고 신 버전의 프로그램 또는 정보(이하에서는 간단히 ‘신 버전’이라는 용어를 사용할 수 있음)를 업데이트하면 된다. 그러나, 앞서 설명한 바와 같이 차량용 제어기(20)의 경우 연산 능력이나 메모리를 충분히 확보하는 것은 비용이나 설계 관점에서 바람직하지 않다. 이러한 문제에 대하여 본 발명에서는, 구 버전과 신 버전을 비교하여 차분 데이터를 생성하고 차분 데이터를 이용하여 제어기(20)를 업데이트하는 방법을 사용함으로써 효과적인 업데이트를 가능하게 한다.A flash memory having a sector structure has a characteristic that, unlike a RAM in which read/write is free, writing is possible only after erasing a sector at a desired location for writing in the flash memory. As a method of erasing sectors of the flash memory, there are a chip erase method of erasing all sectors at once and a sector erase method of erasing each sector. If the controller 20 has excellent computing power and has a storage medium capable of storing all of the program or information of the new version to be updated, the old version of the program or information (hereinafter simply referred to as 'old version') It can be used) and update the new version of the program or information (hereafter, the term 'new version' may be used for simplicity). However, as described above, in the case of the vehicle controller 20 , it is not preferable from the viewpoint of cost or design to sufficiently secure the arithmetic capability or memory. In response to this problem, in the present invention, effective update is possible by using a method of generating difference data by comparing the old version with the new version and updating the controller 20 using the difference data.

한편, 이하의 설명에서, 차분 데이터를 이용하여 구 버전이 저장된 개별 섹터를 신 버전으로 업데이트하는 것을 ‘차분 해제’라고 칭하도록 하겠다. 차분 데이터의 종류 및 차분 데이터의 크기에 따라, 저장 공간을 확보하기 위해 추가적인 섹터가 필요하거나 일부 섹터는 단순히 지워지게 됨으로, 차분 해제를 위한 순서를 고려할 필요가 있다.Meanwhile, in the following description, updating an individual sector in which an old version is stored to a new version using difference data will be referred to as 'differential release'. Depending on the type of difference data and the size of the difference data, additional sectors are needed to secure a storage space or some sectors are simply erased, so it is necessary to consider the order for releasing the difference.

도 2는 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 차분 데이터를 생성하는 과정을 설명하는 도면이고, 도 3은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 생성된 차분 데이터를 나타내는 도면이다.2 is a view for explaining a process of generating difference data in a method for updating a vehicle controller according to a preferred embodiment of the present invention, and FIG. 3 is a view for explaining a process of generating difference data in a method for updating a vehicle controller according to a preferred embodiment of the present invention. It is a figure which shows difference data.

차분 데이터는, 제어기(20)의 제 1 메모리(100)의 섹터(SA)에 저장된 구 버전의 소프트웨어 또는 정보(구 버전)와 신 버전의 소프트웨어 또는 정보(신 버전)를 비교함으로써 생성된다. 도 2를 참조하면, 제 1 메모리(100)는 제 1 섹터(SA1), 제 2 섹터(SA2) 및 제 3 섹터(SA3)를 비롯한 복수의 섹터(SA)가 구비된다.The difference data is generated by comparing the old version of software or information (old version) and the new version of software or information (new version) stored in the sector SA of the first memory 100 of the controller 20 . Referring to FIG. 2 , the first memory 100 includes a plurality of sectors SA including a first sector SA1 , a second sector SA2 , and a third sector SA3 .

차분 데이터는, 각 섹터별로 구 버전과 신 버전을 비교함으로써 생성되는데, 차분 데이터는 동일, 추가, 삭제 및 변경 데이터가 순차적으로 구성될 수 있다. 구 버전과 신 버전의 비교는 제어기(20)의 주제어부(30)에 의해 수행될 수 있다.The difference data is generated by comparing the old version and the new version for each sector. The difference data may be sequentially configured by the same, addition, deletion, and change data. The comparison between the old version and the new version may be performed by the main control unit 30 of the controller 20 .

‘동일’은 구 버전과 신 버전이 동일하여 구 버전 데이터를 유지하는 것을 의미한다. ‘동일’의 경우에는 구 버전이 변경되지 않으므로 구 버전 데이터의 사이즈 정보만 차분 데이터에 포함된다.‘Same’ means that the old version and the new version are the same, so that the old version data is maintained. In the case of 'same', since the old version is not changed, only the size information of the old version data is included in the difference data.

‘추가’는 신 버전에 구 버전 정보와 함께 추가되는 데이터가 있는 것을 의미한다. ‘추가’의 경우에는 구 버전에 존재하지 않은 새로운 데이터가 포함되므로 사이즈와 데이터가 차분 데이터에 모두 포함된다.‘Added’ means that there is data added to the new version along with the old version information. In the case of ‘addition’, new data that does not exist in the old version is included, so both size and data are included in the difference data.

‘삭제’는 신 버전에는 구 버전 데이터가 없어 구 버전 데이터를 삭제하여야 하는 것을 의미한다. ‘삭제’의 경우에는 구 버전을 삭제하는 것이므로 사이즈만 차분 데이터에 포함된다.‘Delete’ means that there is no old version data in the new version, so the old version data must be deleted. In the case of ‘delete’, since the old version is deleted, only the size is included in the difference data.

‘변경’은 구 버전 데이터를 신 버전 데이터로 변경하여야 하는 것을 의미한다. ‘변경’의 경우에는 구 버전을 신 버전으로 바꿔야 하므로 사이즈와 데이터가 차분 데이터에 모두 포함된다.‘Change’ means that the old version data should be changed to the new version data. In the case of ‘change’, since the old version needs to be replaced with the new version, both the size and data are included in the difference data.

다만, 본 발명의 실시에 있어서, ‘추가’와 ‘변경’은 별도로 구분하지 않고, ‘변경’으로 통합하여 관리되는 것도 가능할 수 있다.However, in the practice of the present invention, 'addition' and 'change' are not separately distinguished, and it may be possible to integrate and manage as 'change'.

도 3의 (b)를 참조하면, 생성된 차분 데이터의 구조가 나타난다. 차분 데이터의 헤더에는, 섹터별 차분 데이터의 사이즈와 섹터별 구 버전의 참조 위치(주소)가 포함된다. 차분 데이터의 데이터 블록에는 각 섹터별 차분에 따른 데이터가 포함된다. 이러한 차분 데이터는 후술하는 차분 해제의 순서에 따라 정렬될 수 있다.Referring to FIG. 3B , the structure of the generated difference data is shown. The header of the difference data includes the size of the difference data for each sector and the reference location (address) of the old version for each sector. The data block of the difference data includes data according to the difference for each sector. Such difference data may be sorted according to the order of difference cancellation, which will be described later.

도 4는 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 차분 데이터를 생성하는 예시를 나타낸다.4 illustrates an example of generating difference data in a method for updating a vehicle controller according to a preferred embodiment of the present invention.

도 4의 (a)는, 제 1 메모리(100)의 섹터(SA)의 순서대로 차분 데이터를 생성한 로우 차분 데이터(RDD : Raw Difference Data)의 일례를 나타낸다. 로우 차분 데이터(RDD)는 섹터(SA)의 순서대로 구 버전과 신 버전을 비교한 속성과 데이터를 정리한 것이다. 도 4의 (c)는, 로우 차분 데이터(RDD)를 이용하여 업데이트후의 제 1 메모리(100)의 섹터에 저장할 수 있도록 분할한 분할 차분 데이터(DDD : Divided Difference Data)의 일례를 나타낸다. 도 4의 (a)와 (c)에서 제 1 섹터(SA1)는 업데이트 전후에 있어서 물리적으로는 동일한 것이나, 설명의 편의를 위해 업데이트 전의 구 버전의 제 1 섹터는 ‘SA1’으로 업데이트 후의 신 버전의 제 1 섹터는 ‘SA1_U’로 표시한다.FIG. 4A shows an example of raw difference data (RDD) in which difference data is generated in the order of the sectors SA of the first memory 100 . The raw difference data RDD is a compilation of attributes and data obtained by comparing the old version and the new version in the order of the sectors SA. FIG. 4C shows an example of divided difference data (DDD) divided so that it can be stored in a sector of the first memory 100 after the update using the raw difference data RDD. In FIGS. 4A and 4C , the first sector SA1 is physically the same before and after the update, but for convenience of explanation, the first sector of the old version before the update is 'SA1', and the new version after the update is 'SA1'. The first sector of 'SA1_U' is indicated.

제 1 섹터(SA1)는 ‘동일’이고, 제 2 섹터(SA2)는 ‘삭제’이므로 각각 속성 정보와 사이즈에 대한 데이터만 있다. 제 3 섹터(SA3)는 ‘추가’에 해당하고 사이즈와 종전 데이터와 추가되는 데이터를 포함하는 제 3 섹터(SA)에 포함될 전체 데이터가 있다. 이와 같은 순서대로 로우 차분 데이터(RDD)에 제 1 내지 제 10 섹터(SA1~SA10)의 차분 데이터가 예시된다.Since the first sector SA1 is 'same' and the second sector SA2 is 'deleted', there is only attribute information and data about size, respectively. The third sector SA3 corresponds to 'addition' and includes all data to be included in the third sector SA including the size, previous data, and data to be added. In this order, the difference data of the first to tenth sectors SA1 to SA10 are exemplified in the row differential data RDD.

신 버전으로 업데이트함에 있어서 제 1 메모리(100)의 효율적인 사용을 위해서는 삭제, 추가 또는 변경되는 데이터를 반영하여 제 1 메모리(100)의 섹터에 기록하는 것이 바람직하다.In order to efficiently use the first memory 100 in updating to a new version, it is preferable to record deleted, added, or changed data in a sector of the first memory 100 reflecting the data.

도 4의 예시를 참조하여 로우 차분 데이터를 가공하는 과정을 설명한다. 업데이트된 후의 제 1 메모리(100)의 제 1 섹터(SA1_U)에는 종전 제 1 섹터(SA1)의 데이터가 그대로 저장된다. 제 2 섹터(SA2)의 데이터는 삭제되므로, 업데이트 후의 제 2 섹터(SA2_U)에는 종전 제 3 섹터(SA3)에 따른 데이터를 입력하면 될 것이나, 추가된 데이터로 인해 제 3 섹터(SA3)의 업데이트된 데이터를 제 2 섹터(SA2_U)에 모두 저장할 수 없는 경우를 고려한다. 이 경우, 제 3 섹터(SA3)의 데이터는 도 4의 (b)와 같이 신 버전에 대한 새로운 섹터 주소를 고려하여 데이터를 분할하여, 제 3-1 섹터 데이터(SA3-1)와 제 3-2 섹터 데이터(SA3-2)로 생성한다. 도 4의 (c)와 같이, 업데이트 후의 제 2 섹터(SA2_U)에는 제 3-1 섹터 데이터(SA3-1)를 할당하고, 제 3 섹터(SA3_U)에는 제 3-2 섹터 데이터(SA3-2)와 제 4 섹터(SA4)의 데이터를 할당한다.A process of processing raw difference data will be described with reference to the example of FIG. 4 . In the updated first sector SA1_U of the first memory 100 , the data of the previous first sector SA1 is stored as it is. Since the data of the second sector SA2 is deleted, data according to the previous third sector SA3 may be input into the updated second sector SA2_U, but the third sector SA3 is updated due to the added data. Consider a case where all of the data cannot be stored in the second sector SA2_U. In this case, the data of the third sector SA3 is divided into the 3-1 sector data SA3-1 and the 3-th sector data SA3-1 by considering the new sector address for the new version as shown in FIG. 4B. It is created with 2 sector data (SA3-2). As shown in FIG. 4C , the 3-1 th sector data SA3-1 is allocated to the updated second sector SA2_U, and the 3-2 th sector data SA3-2 is allocated to the third sector SA3_U. ) and data of the fourth sector SA4 are allocated.

즉, 본 발명에 있어서 로우 차분 데이터(RDD)는 차분 해제시 위치하게 될 데이터 섹터 위치를 기반으로 분할될 수 있다. 여기서, 동일, 변경, 및 추가 정보에 해당하는 데이터가 적어도 둘 이상의 섹터에 오버랩되는 경우, 오버랩되는 데이터가 섹터 기준으로 추가 분할될 수 있다.That is, in the present invention, the raw differential data RDD may be divided based on the position of the data sector to be located when the difference is released. Here, when data corresponding to the same, changed, and additional information overlaps at least two sectors, the overlapping data may be further divided based on the sector.

도 5는 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 차분 데이터를 생성하는 과정을 설명하는 순서도이다.5 is a flowchart illustrating a process of generating difference data in a method of updating a vehicle controller according to a preferred embodiment of the present invention.

신 버전 기준 섹터 분할 차분 데이터(DDD)의 생성 방법은, 로우 차분 데이터(RDD)를 순차적으로 로드하여 구 버전과 신 버전의 시작섹터 주소를 검출하고, 신 버전의 시작섹터 주소에 맞춰 섹터 위치를 계산하여 로우 차분 데이터(RDD)를 해당 섹터에 입력한다.The method of generating the new version reference sector division differential data (DDD) sequentially loads the raw differential data (RDD) to detect the start sector addresses of the old version and the new version, and determine the sector position according to the start sector address of the new version It is calculated and the raw differential data RDD is input to the corresponding sector.

이때, 동일, 추가, 및 변경에 해당하는 로우 차분 데이터(RDD)는 신 버전의 주소값을 변화시키기 때문에, 데이터가 상이한 섹터에 오버랩될 수 있는데, 이러한 경우 오버랩되는 데이터를 해당 섹터 사이즈에 맞춰 분리하여 각 섹터에 저장된다.At this time, since the raw differential data RDD corresponding to the same, addition, and change change the address value of the new version, data may overlap in different sectors. In this case, the overlapping data is separated according to the sector size. is stored in each sector.

구 버전의 주소값을 계산하는 것은 섹터가 천이될 때, 구 버전의 주소를 저장하기 위함이다. 구 버전의 주소값은 섹터 별 차분 해제 시 구 버전의 참조 위치로 쓰기 위해 도출된다.The calculation of the old version address value is to store the old version address when the sector is transitioned. The address value of the old version is derived to be used as the reference location of the old version when the sector-by-sector differential is released.

도 5를 참고하여, 분할 차분 데이터를 생성하는 과정을 구체적으로 설명하면, 먼저 제1 메모리(100)의 섹터 순서별로 로우 차분데이터(RDD)의 데이터 종류를 판단한다(S10). 여기서, 로우 차분 데이터(RDD) 종류가 동일, 추가, 또는 변경인 경우 S12 단계가 수행되고, 로우 차분 데이터(RDD) 종류가 삭제인 경우 S32 단계가 수행될 수 있다.Referring to FIG. 5 , the process of generating the divided difference data will be described in detail. First, the data type of the row difference data RDD is determined for each sector order of the first memory 100 ( S10 ). Here, when the type of the row difference data RDD is the same, addition, or change, step S12 may be performed, and if the type of the row difference data RDD is deleted, step S32 may be performed.

로우 차분 데이터(RDD)의 데이터 종류가 ‘동일’, ‘추가’, 또는 ‘변경’인 경우, 신 버전의 섹터주소를 기반으로 시작섹터로 변환하고, 신 버전의 섹터주소와 사이즈에 따라 종료섹터로 변환한다(S12).When the data type of the raw differential data (RDD) is 'same', 'addition', or 'change', it is converted into a start sector based on the sector address of the new version, and the end sector is converted according to the sector address and size of the new version. converted to (S12).

시작섹터와 종료섹터를 비교하여 차이가 있는지를 판단한다(S14). 여기서, 시작섹터와 종료섹터가 다른 경우, S16 단계가 수행되고, 시작섹터와 종료섹터가 같은 경우, S21 단계가 수행될 수 있다.It is determined whether there is a difference by comparing the start sector and the end sector (S14). Here, when the start sector and the end sector are different, step S16 may be performed, and if the start sector and the end sector are the same, step S21 may be performed.

시작섹터와 종료섹터가 다른 경우, 시작섹터부터 종료섹터까지 섹터경계에 맞춰 사이즈 및 데이터를 구분한다(S16).When the start sector and the end sector are different, the size and data are divided according to the sector boundary from the start sector to the end sector (S16).

섹터별 분할 차분 데이터(DDD)가 섹터의 시작에 위치할 때 구 버전의 주소를 저장한다(S18). 여기서, 구 버전 주소는 섹터별 구 버전 시작 주소에 대응한다.When the sector-by-sector divisional differential data DDD is located at the beginning of the sector, the address of the old version is stored (S18). Here, the old version address corresponds to the old version start address for each sector.

분할된 로우 차분 데이터(RDD)를 섹터별 분할 차분 데이터(DDD)로 저장한다(S20).The divided raw differential data RDD is stored as sector-by-sector division differential data DDD (S20).

시작섹터와 종료섹터가 같은 경우, 섹터별 분할 차분 데이터(DDD)가 섹터의 시작에 위치할 때 구 버전의 주소(섹터별 구 버전 시작 주소)를 저장한다(S21).When the start sector and the end sector are the same, the old version address (the old version start address for each sector) is stored when the sector-by-sector divisional differential data DDD is located at the beginning of the sector (S21).

섹터별 분할 차분 데이터(DDD)에 시작섹터를 추가한다(S22).A start sector is added to the sector-by-sector divisional differential data DDD (S22).

S20 단계와 S22 단계 이후, 로우 차분데이터(RDD)의 데이터 종류를 판단한다(S24).After steps S20 and S22, the data type of the row difference data RDD is determined (S24).

로우 차분데이터(RDD)의 데이터 종류가 ‘동일’인 경우, 분할 차분 데이터(DDD)의 구 버전 참조 주소에 구 버전 주소와 사이즈 정보가 포함되고, 분할 차분 데이터(DDD)의 신 버전 주소에 데이터 종류 ‘동일’과 사이즈 정보가 포함된다(S26).When the data type of the raw difference data (RDD) is 'same', the old version address and size information are included in the old version reference address of the divided difference data (DDD), and the data is stored in the new version address of the divided difference data (DDD) The type 'same' and size information are included (S26).

로우 차분데이터(RDD)의 데이터 종류가 ’추가’ 인 경우, 분할 차분 데이터(DDD)의 신 버전 주소에 데이터 종류 ‘추가’, 사이즈 정보와, 데이터 내용이 포함된다(S28).When the data type of the raw difference data RDD is 'addition', the data type 'addition', size information, and data content are included in the new version address of the divided differential data DDD (S28).

로우 차분데이터(RDD)의 데이터 종류가 ‘변경’인 경우, 분할 차분 데이터(DDD)의 구 버전 참조 주소에 구 버전 주소와 사이즈 정보가 포함되고, 분할 차분 데이터(DDD)의 신 버전 주소에 데이터 종류 ‘변경’, 사이즈 정보와, 데이터 내용이 포함된다(S30).When the data type of the raw difference data (RDD) is 'change', the old version address and size information are included in the old version reference address of the divided difference data (DDD), and data is stored in the new version address of the divided difference data (DDD) The type 'change', size information, and data content are included (S30).

한편, S10 단계로 돌아가서, 로우 차분데이터(RDD)의 데이터 종류가 ‘삭제’인 경우, 신 버전 주소의 섹터를 시작섹터로 변환한다(S32).On the other hand, returning to step S10, when the data type of the row differential data RDD is 'delete', the sector of the new version address is converted into a start sector (S32).

변환된 시작섹터를 분할 차분 데이터(DDD)에 추가한다(S34).The transformed start sector is added to the divided difference data DDD (S34).

분할 차분 데이터(DDD)의 구 버전 참조주소에 구 버전 주소가 포함되고, 분할 차분 데이터(DDD)의 시작섹터에 데이터 종류 ‘삭제’와, 사이즈 정보가 포함된다(S36).The old version address is included in the old version reference address of the divided difference data DDD, and the data type 'delete' and size information are included in the start sector of the divided differential data DDD (S36).

S26, S28, S30, S36 단계 이후에, 로우 차분 데이터(RDD)의 섹터별 분할이 완료되었는지를 판단한다(S38). 로우 차분 데이터(RDD)의 섹터별 분할이 완료되지 않은 경우, S10 단계 이후 단계가 계속해서 수행될 수 있다.After steps S26, S28, S30, and S36, it is determined whether the sector-by-sector division of the row difference data RDD is completed (S38). When the sector-by-sector division of the row differential data RDD is not completed, the steps after step S10 may be continuously performed.

도 6은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 섹터별로 분할한 분할 차분 데이터를 나타낸다.6 is a diagram illustrating divided difference data divided by sectors in a method for updating a vehicle controller according to a preferred embodiment of the present invention.

도 6을 참고하면, 로우 차분 데이터(RDD)는 제1 섹터(섹터1 차분), 제2 섹터(섹터2 차분), 제3 섹터(섹터3 차분), 및 제4 섹터(섹터4 차분) 각각에 분할될 수 있다. 이때 섹터에 오버랩되는 차분 데이터가 발생할 경우, 오버랩되는 차분 데이터가 추가 분할될 수 있다.Referring to FIG. 6 , the raw differential data RDD includes a first sector (sector 1 difference), a second sector (sector 2 difference), a third sector (sector 3 difference), and a fourth sector (sector 4 difference), respectively. can be divided into In this case, when overlapping differential data occurs in a sector, the overlapping differential data may be further divided.

이를 통해, 신 버전 기준 분할 차분 데이터(DDD1)가 생성될 수 있다. 신 버전 기준 분할 차분 데이터(DDD1)는 차분 해제시 위치할 데이터 섹터 위치를 기반으로 차분 데이터를 나눈 것일 수 있다.Through this, the new version reference divided difference data DDD1 may be generated. The new version reference divided difference data DDD1 may be obtained by dividing differential data based on a data sector position to be located when the difference is released.

신 버전 기준 분할 차분 데이터(DDD1)는 섹터별 구 버전 참조 위치와 차분 해제 순서를 포함하는 분할 차분 데이터(DDD2)로 변환될 수 있다. 차분 해제 순서를 포함하는 분할 차분 데이터(DDD2)는 섹터별 구 버전 참조 위치를 포함함에 따라 다른 섹터의 데이터를 보존할 수 있고, 별도의 대용량 임시 저장 메모리 없이 차분 해제가 가능하다.The new version reference divided difference data DDD1 may be converted into divided difference data DDD2 including the reference position of the old version for each sector and a difference cancellation order. The divided difference data DDD2 including the difference cancellation order can preserve data of other sectors by including the reference position of the old version for each sector, and differential cancellation is possible without a separate large-capacity temporary storage memory.

차분 해제(섹터별 업데이트) 순서Order of difference release (update by sector)

도 7은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 데이터 추가에 따라 예상되는 데이터 이동을 설명하기 위한 도면이다.7 is a diagram for explaining expected data movement according to data addition in a method of updating a vehicle controller according to a preferred embodiment of the present invention.

도 7을 참고하면, 구 버전의 제1 섹터는 A 주소 영역(섹터1_A)과 B 주소 영역(섹터1_B)에 신 버전과 동일한 데이터 정보가 저장되고, 구 버전의 제2 섹터는 A 주소 영역(섹터2_A)과, B 주소 영역(섹터2_B)에 신 버전과 동일한 데이터 정보가 저장되어 있다. 이때, 신 버전의 제1 섹터에는 추가 데이터 정보와, 구 버전의 제1 섹터의 A 주소 영역(섹터1_A)과 동일한 데이터 정보가 저장되어 있다. 또한, 신 버전의 제2 섹터에는 구 버전의 제1 섹터의 B 주소 영역(섹터1_B)과 제2 섹터의 A 주소 영역(섹터2_A)와 동일한 데이터 정보가 저장되어 있다.Referring to FIG. 7 , in the first sector of the old version, the same data information as the new version is stored in the A address area (sector 1_A) and the B address area (sector 1_B), and the second sector of the old version is stored in the A address area ( The same data information as the new version is stored in the sector 2_A) and the B address area (sector 2_B). In this case, additional data information and the same data information as the address area A (sector 1_A) of the first sector of the old version are stored in the first sector of the new version. In addition, the same data information as the B address area (sector 1_B) of the first sector and the A address area (sector 2_A) of the second sector of the old version is stored in the second sector of the new version.

이하, 도 8및 도 9를 통해 추가 데이터를 보유한 신 버전의 데이터가 구 버전이 저장된 섹터로 이동할 시 예상되는 데이터 이동을 설명한다.Hereinafter, data movement expected when the new version of data having additional data is moved to the sector in which the old version is stored will be described with reference to FIGS. 8 and 9 .

도 8은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 데이터 추가시 섹터별 차분 해제 순서가 순방향인 경우에 발생하는 문제 상황을 설명하기 위한 도면이다.FIG. 8 is a diagram for explaining a problematic situation that occurs when an order of releasing a difference for each sector is a forward direction when adding data in a method for updating a controller for a vehicle according to a preferred embodiment of the present invention.

도 8을 참고하면, 차분 해제시 롬 데이터의 전체 사이즈가 차분해제 버퍼와 동일한 사이즈이거나, 저장공간 사이즈의 여유가 없는 경우이면, 한 섹터에 해당하는 저장공간만 확보하여 처리해야 하는데, 이때, 제1 섹터에서 제2 섹터 순서로 순방향으로 차분 해제를 하면 신 버전의 제2 섹터에서 A 주소 영역의 동일 데이터 정보(섹터1_B)의 유실 문제가 발생 한다.Referring to FIG. 8, if the total size of the ROM data is the same size as that of the difference cancellation buffer or there is no room for the storage space when the difference is released, only the storage space corresponding to one sector needs to be secured and processed. When the difference is released from sector 1 to sector 2 in the forward direction, the same data information (sector 1_B) in the address area A is lost in the second sector of the new version.

도 9는 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 데이터 추가시 섹터별 차분 해제 순서가 역방향인 경우에 도 9의 문제 상황을 해결할 수 있음을 보여주는 도면이다.FIG. 9 is a diagram showing that the problem situation of FIG. 9 can be solved in the case in which the difference release order for each sector is reversed when data is added in the update method of the vehicle controller according to the preferred embodiment of the present invention.

도 9를 참고하면, 차분 해제시 롬 데이터 전체 사이즈가 차분해제 버퍼와 동일한 사이즈이거나, 저장공간 사이즈의 여유가 없는 경우, 제2 섹터에서 제1 섹터 순서로 역방향으로 차분 해제를 하면, 제2 섹터의 차분 해제 때 신 버전의 제2 섹터에서 A 주소 영역의 동일 데이터 정보(섹터1_B)는 유실 문제없이 모두 존재하게 된다.Referring to FIG. 9 , when the total size of the ROM data is the same size as that of the difference cancellation buffer or there is no room for the storage space, when the difference is released in the reverse direction from the second sector to the first sector, the second sector In the second sector of the new version, the same data information (sector 1_B) of the address area A exists without a problem of loss when the difference is released.

도 10은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 데이터 삭제에 따라 예상되는 데이터 이동을 나타내는 도면이다.10 is a diagram illustrating expected data movement according to data deletion in a method of updating a vehicle controller according to a preferred embodiment of the present invention.

도 10을 참고하면, 구 버전의 제1 섹터는 A 주소 영역(섹터1_A)의 데이터가 신 버전에서 삭제 처리되고, B 주소 영역(섹터1_B)에 신 버전과 동일한 데이터 정보가 저장되어 있다. 구 버전의 제2 섹터는 A 주소 영역(섹터2_A)과, B 주소 영역(섹터2_B)에 신 버전과 동일한 데이터 정보가 저장되어 있다. 이때, 신 버전의 제1 섹터에는 구 버전의 제1 섹터의 B 주소 영역(섹터1_A)과 동일한 데이터 정보 및 구 버전의 제2 섹터의 A 주소 영역(섹터2_A)과 동일한 데이터 정보가 저장되어 있다. 또한, 신 버전의 제2 섹터에는 구 버전의 제2 섹터의 B 주소 영역(섹터2_B)과 동일한 데이터 정보가 저장되어 있다.Referring to FIG. 10 , in the first sector of the old version, data in the A address area (sector 1_A) is deleted in the new version, and the same data information as the new version is stored in the B address area (sector 1_B). In the second sector of the old version, the same data information as that of the new version is stored in the A address area (sector 2_A) and the B address area (sector 2_B). In this case, data information identical to the B address area (sector 1_A) of the first sector of the old version and data information identical to the address area A (sector 2_A) of the second sector of the old version are stored in the first sector of the new version. . In addition, the same data information as the B address area (sector 2_B) of the second sector of the old version is stored in the second sector of the new version.

이와 같이, 데이터 추가 등의 이유로 데이터가 밀릴 수 있지만, 데이터 삭제 등의 이유로 데이터가 당겨 질 수도 있다.In this way, data may be pushed due to data addition or the like, but data may be pulled due to data deletion or the like.

이하, 도 11및 도 12를 통해 데이터 삭제에 따른 신 버전의 데이터가 구 버전이 저장된 섹터로 이동할 시 예상되는 데이터 이동을 설명한다.Hereinafter, the expected data movement when the new version of data is moved to the sector in which the old version is stored according to data deletion will be described with reference to FIGS. 11 and 12 .

도 11은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 데이터 삭제시 섹터별 차분 해제 순서가 역방향인 경우에 발생하는 문제 상황을 설명하기 위한 도면이다.11 is a diagram for explaining a problem that occurs when the order of releasing difference for each sector is reversed when data is deleted in the updating method of the vehicle controller according to the preferred embodiment of the present invention.

도 11를 참고하면, 차분 해제시 제2 섹터에서 제1 섹터 순서로 역방향으로 차분 해제를 하면, 신 버전의 제1 섹터에서 B 주소 영역의 동일 데이터 정보(섹터2_A)의 유실 문제가 발생 한다.Referring to FIG. 11 , when the difference is released in the reverse direction from the second sector to the first sector, the same data information (sector 2_A) in the B address area is lost in the first sector of the new version.

도 12는 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 데이터 삭제시 섹터별 차분 해제 순서가 순방향인 경우에 도 11의 문제 상황을 해결할 수 있음을 보여주는 도면이다.FIG. 12 is a diagram showing that the problem situation of FIG. 11 can be solved in the case in which the difference release order for each sector is forward when data is deleted in the update method of the vehicle controller according to the preferred embodiment of the present invention.

도 12를 참고하면, 제1 섹터에서 제2 섹터 순서로 순방향으로 차분 해제를 하면, 제2 섹터의 해제 때 신 버전의 제1 섹터에서 B 주소 영역의 데이터 정보(섹터2_A)의 유실 문제없이 모두 존재하게 된다.Referring to FIG. 12 , when the difference is released in the forward direction from the first sector to the second sector, when the second sector is released, all data information (sector 2_A) of the address area B is lost in the new version of the first sector without a problem. come to exist

도 13은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 데이터 추가 및 삭제에 따라 예상되는 데이터 이동을 나타내는 도면이다.13 is a diagram illustrating expected data movement according to data addition and deletion in a method of updating a vehicle controller according to a preferred embodiment of the present invention.

구 버전의 데이터 L이 신 버전에서 데이터 L’로 데이터 이동이 발생할 수 있으나, 구 버전의 데이터 L에서 신 버전의 데이터 M’, 또는 구 버전의 데이터 M에서 신 버전의 데이터 N’ 등의 데이터 이동은 발생할 수 없다. 즉, 구 버전의 데이터 위치가 L, M, N 순서이면, 이를 복사한 신 버전 데이터의 위치 또한 L’, M’, N’ 순서이다.Data movement may occur in the old version of data L from the new version to the data L', but data movement such as data M' from the old version data L to the new version data M', or the old version data M to the new version data N', etc. cannot occur That is, if the data location of the old version is in the order of L, M, N, the location of the new version data copied from it is also in the order of L', M', N'.

도 14는 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 섹터별 데이터 이동을 나타내는 도면이다.14 is a diagram illustrating data movement for each sector in a method for updating a vehicle controller according to a preferred embodiment of the present invention.

도 14를 참고하면, 도 13의 데이터 이동을 섹터 단위에 적용해 보면, N 번째 섹터는 다른 섹터와 데이터 이동 관계가 단일 방향임을 알 수 있다. N이 4인 경우, 섹터 5, 섹터 4, 및 섹터 3 순서로 데이터 이동이 발생한 경우라면, 이를 역전한 데이터의 이동은 동시에 존재 할 수 없다. 예를 들어, 섹터 4 에서 섹터 5로 데이터 이동이 발생할 수 없고, 섹터 3에서 섹터 4로 데이터 이동이 발생할 수 없고, 섹터 3에서 섹터 5로 데이터 이동이 발생할 수 없다.Referring to FIG. 14 , when the data movement of FIG. 13 is applied to each sector, it can be seen that the N-th sector has a unidirectional data movement relation with other sectors. When N is 4, if data movement occurs in the order of sector 5, sector 4, and sector 3, the reversed data movement cannot exist at the same time. For example, data movement cannot occur from sector 4 to sector 5, data movement from sector 3 to sector 4 cannot occur, and data movement from sector 3 to sector 5 cannot occur.

도 15는 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 섹터별 차분 해제 순서를 나타내는 도면이다.15 is a diagram illustrating a difference canceling procedure for each sector in a method for updating a vehicle controller according to a preferred embodiment of the present invention.

도 15를 참고하면, 데이터의 추가 또는 삭제에 의해 섹터 간 데이터 이동이 이루질 수 있다.Referring to FIG. 15 , data may be moved between sectors by adding or deleting data.

섹터의 데이터는, 예를 들어, 섹터 2에서 섹터 1, 섹터 3, 및 섹터 4로 단일 방향 좌에서 우로 이동할 수 있고, 섹터 7에서 섹터 6으로 단일 방향 좌에서 우로 이동할 수 있다. 또한, 섹터의 데이터는 섹터 3에서 섹터 4, 섹터 5, 섹터 6으로 단일 방향 좌에서 우로 이동할 수 있다. 그러나, 섹터의 데이터는 섹터 1에서 섹터 2로 이동이 불가능하고, 섹터 7에서 섹터 3으로 이동이 불가능하다.Data in a sector may move, for example, from sector 2 to sector 1, sector 3, and sector 4 unidirectional left-to-right, and from sector 7 to sector 6 unidirectional left-to-right movement, for example. In addition, sector data may move from sector 3 to sector 4, sector 5, and sector 6 in a unidirectional left to right direction. However, data in the sector cannot be moved from sector 1 to sector 2 and from sector 7 to sector 3 cannot be moved.

차분 데이터를 내보내는 섹터를 낮은 우선순위로 정하고, 차분 데이터를 수신하는 섹터를 높은 우선순위로 정함으로써 차분 해제 순서가 설정될 수 있다. 일 실시예에 있어서, 섹터 2와 섹터 7은 차분 데이터 내보내는 섹터로서, 가장 낮은 우선순위가 설정될 수 있다. 섹터 1과 섹터 3은 차분 데이터를 수신하는 섹터로서, 섹터 2와 섹터 7보다 높은 우선순위가 설정될 수 있다. 한편, 섹터 3은 차분 데이터를 내보내는 섹터로서, 섹터 1보다 낮은 우선순위가 설정될 수 있다. 섹터 4, 섹터 5와 섹터 6은 차분 데이터를 수신하는 섹터로서, 가장 높은 우선순위가 설정될 수 있다.The difference cancellation order can be set by setting a sector that emits difference data as a low priority and a sector that receives difference data as a high priority. In an embodiment, sector 2 and sector 7 are sectors for exporting differential data, and the lowest priority may be set. Sector 1 and sector 3 are sectors for receiving differential data, and a higher priority than sector 2 and sector 7 may be set. Meanwhile, sector 3 is a sector that emits difference data, and a lower priority than sector 1 may be set. Sector 4, sector 5, and sector 6 are sectors that receive differential data, and the highest priority may be set.

데이터의 이동과 반대로 차분 해제가 수행되면, 데이터의 유실없이 모든 섹터의 차분 해제가 가능해 진다. 여기서, 동일 수직선상의 섹터는 순서와 무관하다.If differential cancellation is performed opposite to data movement, differential cancellation of all sectors is possible without data loss. Here, the sectors on the same vertical line are irrespective of the order.

본 발명의 차량용 제어기의 업데이트 방법은, 차분 해제 순서에 따라 섹터별 차분 데이터의 차분 해제가 이루어질 수 있으며, 참조하는 다른 섹터의 데이터를 보존하고, 별도의 대용량 메모리없이 차분 데이터의 차분 해제가 가능한 것을 특징으로 한다.The update method of the vehicle controller according to the present invention is that differential data for each sector can be released according to the difference canceling order, data of other sectors to be referenced is preserved, and differential data can be released without a separate large-capacity memory. characterized.

도 16은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 섹터별 차분데이터 해제 방법을 나타내는 순서도이다.16 is a flowchart illustrating a method of releasing differential data for each sector in a method for updating a vehicle controller according to a preferred embodiment of the present invention.

도 16을 참고하면, 차분 해제를 위해서는 차분 데이터와 구 버전의 데이터가 필요하다. 또한, 섹터 별로 나누어진 차분 데이터의 경우, 구 버전의 참조 위치가 필요하다.Referring to FIG. 16 , difference data and old version data are required to cancel the difference. In addition, in the case of differential data divided for each sector, the reference position of the old version is required.

구 버전의 시작 주소값은 차분 데이터 생성 시 계산된 구 버전 참조 위치로부터 설정된다. 신 버전의 시작 주소값은 차분 해제 버퍼의 시작 주소이므로 0으로 초기화한다(S101).The starting address value of the old version is set from the old version reference position calculated when generating the difference data. Since the start address value of the new version is the start address of the difference cancellation buffer, it is initialized to 0 (S101).

차분 데이터를 로드한다(S103).The difference data is loaded (S103).

로드된 차분 데이터의 종류를 판단한다(S105).The type of the loaded difference data is determined (S105).

차분 데이터의 종류가 동일인 경우, 구 버전의 데이터를 로드한다(S107). 여기서, 구 버전의 데이터에는 구 버전의 섹터 주소와 사이즈 정보가 포함된다.When the types of difference data are the same, the data of the old version is loaded (S107). Here, the old version data includes the old version sector address and size information.

로드된 구 버전의 데이터를 차분 해제 버퍼에 저장한다(S109). 여기서, 차분 해제 버퍼는 플래쉬 메모리 또는 SRAM일 수 있다.The loaded old version data is stored in the difference cancellation buffer (S109). Here, the difference release buffer may be a flash memory or an SRAM.

구 버전의 섹터 주소는 현재 구 버전의 섹터 주소값에서 사이즈만큼 증가하고, 신 버전의 섹터 주소는 현재 신 버전의 섹터 주소값에서 사이즈만큼 증가한다(S111). 이때, 차분 해제 버퍼에 구 버전의 섹터 주소와 신 버전의 섹터 주소를 저장한다.The sector address of the old version is increased by the size from the current sector address value of the old version, and the sector address of the new version is increased by the size from the sector address value of the current version (S111). At this time, the sector address of the old version and the sector address of the new version are stored in the difference cancellation buffer.

차분 데이터의 종류가 추가인 경우, 사이즈 정보가 포함된 차분 데이터를 로드한다(S113).When the type of difference data is additional, difference data including size information is loaded (S113).

로드된 차분 데이터를 차분 해제 버퍼에 저장한다(S115). 여기서, 차분 해제 버퍼는 플래쉬 메모리 또는 SRAM일 수 있다.The loaded difference data is stored in the difference cancellation buffer (S115). Here, the difference release buffer may be a flash memory or an SRAM.

신 버전의 섹터 주소는 현재 신 버전의 섹터 주소값에서 사이즈만큼 증가한다(S117). 이때 신 버전의 섹터 주소를 차분 해제 버퍼에 저장한다. 구 버전의 섹터 주소는 증가시키지 않는다.The sector address of the new version increases by a size from the current sector address value of the new version (S117). At this time, the sector address of the new version is stored in the de-differential buffer. Sector addresses of older versions are not incremented.

차분 데이터의 종류가 변경인 경우, 사이즈 정보가 포함된 차분 데이터를 로드한다(S119).When the type of difference data is change, the difference data including size information is loaded ( S119 ).

로드된 차분 데이터를 차분 해제 버퍼에 저장한다(S121). 여기서, 차분 해제 버퍼는 플래쉬 메모리 또는 SRAM일 수 있다.The loaded difference data is stored in the difference cancellation buffer (S121). Here, the difference release buffer may be a flash memory or an SRAM.

구 버전의 주소는 현재 구 버전의 주소값에서 사이즈만큼 증가하고, 신 버전의 주소는 현재 신 버전의 주소값에서 사이즈만큼 증가한다(S123). 이때 구 버전의 주소와 신 버전의 주소를 차분 해제 버퍼에 저장한다.The address of the old version increases by the size from the address value of the current version, and the address of the new version increases by the size from the address value of the current version (S123). At this time, the address of the old version and the address of the new version are stored in the difference cancellation buffer.

차분 데이터의 종류가 삭제인 경우, 구 버전의 주소는 현재 구 버전의 주소값에서 삭제된 데이터의 사이즈만큼 증가한다(S125). 이때 구 버전의 주소를 차분 해제 버퍼에 저장한다.When the type of difference data is deletion, the address of the old version increases by the size of the deleted data from the address value of the current old version (S125). At this time, the address of the old version is stored in the difference cancellation buffer.

섹터별 차분 데이터의 차분 해제가 완료될 때까지 반복한다(S127).This is repeated until the difference cancellation of the difference data for each sector is completed (S127).

섹터별 차분 데이터의 차분 해제가 완료되면, 해당 섹터의 차분 데이터를 플래쉬 메모리에 저장한다(S120).When the difference release of the differential data for each sector is completed, the differential data of the corresponding sector is stored in the flash memory (S120).

마지막 순서의 섹터의 차분 해제가 이루어졌는지 판단한다(S131). 모든 섹터의 차분 해제가 이루어졌으면 종료한다.It is determined whether the difference between the sectors in the last order has been released (S131). When all sectors have been de-differentiated, the process ends.

마지막 순서가 아닌 경우, 미리 해석된 순서에 맞춰 다음 섹터별 차분 데이터에 대해 차분 해제를 수행한다(S133).If it is not the last order, difference release is performed on the difference data for each next sector according to the pre-interpreted order (S133).

도 17은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 메모리 영역별 저장되는 데이터를 나타내는 제1 도면이다.17 is a first diagram illustrating data stored in each memory area in a method of updating a vehicle controller according to a preferred embodiment of the present invention.

도 17을 참고하면, 일반적인 차분 데이터의 해제 방법에 따르면, 도 17의 (a)와 도 17의 (b)와 같이 각종 데이터가 메모리 영역별로 구분되어 저장될 수 있다.Referring to FIG. 17 , according to a general method of releasing difference data, various types of data may be stored separately for each memory area as shown in FIGS. 17A and 17B .

도 17의 (a)에서, 일 예를 들면, 차량용 제어기의 플래쉬 메모리 영역이 롬데이터의 2배 이상에 해당하고, 구 버전과 차분 데이터가 플래쉬 메모리 영역에 저장되고, 플래쉬 메모리 영역의 새로운 메모리 영역에 신 버전이 저장될 수 있다.In FIG. 17A , for example, the flash memory area of the vehicle controller corresponds to twice or more of the ROM data, the old version and the difference data are stored in the flash memory area, and the new memory area of the flash memory area A new version may be stored in .

도 17의 (b)에서, 다른 예를 들면, 단일 섹터에 해당하는 차분 해제 버퍼와 데이터의 이동을 위한 임시 저장 버퍼가 마련될 수 있다. 차분 해제 버퍼와 임시 저장 버퍼는 새로운 플래쉬 메모리 또는 SRAM으로 구성될 수 있다. 이때 차분 해제 버퍼 및 임시 저장 버퍼를 SRAM이 아닌 플래쉬 메모리로 구성하는 경우, 차분 해제 시간이 과다 소요될 수 있다. 또한, SRAM으로 구성하기에 용량 문제가 있다.In (b) of FIG. 17 , for example, a difference cancellation buffer corresponding to a single sector and a temporary storage buffer for data movement may be provided. The difference release buffer and temporary storage buffer can be configured with new flash memory or SRAM. In this case, when the difference release buffer and the temporary storage buffer are configured by flash memory instead of SRAM, the difference release time may be excessive. In addition, there is a capacity problem to be configured with SRAM.

도 18은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 메모리 영역별 저장되는 데이터를 나타내는 제2 도면이다.18 is a second diagram illustrating data stored in each memory area in a method of updating a vehicle controller according to a preferred embodiment of the present invention.

도 18을 참고하면, 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 따르면, 플래쉬 메모리 영역에 원본 데이터와 차분 데이터가 저장되고, 별도의 플래쉬 메모리 또는 SRAM 영역에 차분 해제 버퍼가 저장될 수 있다.Referring to FIG. 18 , according to the update method of the vehicle controller according to the preferred embodiment of the present invention, original data and difference data are stored in a flash memory area, and a difference release buffer may be stored in a separate flash memory or SRAM area. have.

이는 도 17의 (a)와 같이, 롬데이터보다 2배 이상의 플래쉬 메모리 영역이 필요하지 않고, 도 17의 (b)와 같이, 임시 저장 버퍼가 필요하지도 않는 것을 보여준다.This shows that, as shown in (a) of FIG. 17 , a flash memory area twice as large as that of ROM data is not required, and a temporary storage buffer is not required as in (b) of FIG. 17 .

또한, 플래쉬 메모리에 차분 해제 버퍼를 구성하더라도, 도 17의 (b)와 같이 플래쉬 메모리 영역에 대한 삭제 및 쓰기 시간이 줄어들게 되고, 상대적으로 작은 메모리를 필요로 하기 때문에 SRAM을 이용하기 차분 해제 버퍼를 구성할 수 있으며, 이때 차분 해제 속도가 가장 빠르게 된다.In addition, even if the difference cancellation buffer is configured in the flash memory, the erase and write time for the flash memory area is reduced as shown in FIG. 17(b), and since a relatively small memory is required, the difference cancellation buffer using SRAM is used. It can be configured, and in this case, the speed of releasing the difference is the fastest.

도 19은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 섹터별 차분 해제 순서를 변경하여 차분 해제하는 제1 실시예이다.19 is a first embodiment of releasing a difference by changing a difference canceling order for each sector in a method of updating a vehicle controller according to a preferred embodiment of the present invention.

도 19를 참고하면, 본 발명은 데이터의 이동에 따른 섹터별 차분 해제 순서를 변경하여 차분 해제하는 데 특징이 있다. 제1 실시예에 따르면, 섹터의 차분 해제 순서를 차분 데이터 자체에 포함할 수 있다.Referring to FIG. 19 , the present invention is characterized in that the difference canceling order is changed according to the movement of data by sector. According to the first embodiment, the difference canceling order of sectors may be included in the difference data itself.

도 20은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법에 있어서 섹터별 차분 해제 순서를 변경하여 차분 해제하는 제2 실시예이다.20 is a second embodiment of releasing a difference by changing a difference releasing order for each sector in a method for updating a vehicle controller according to a preferred embodiment of the present invention.

도 20을 참고하면, 본 발명의 제2 실시예에 따르면, 차분 데이터에는 차분 해제 순서가 포함하지 않지만, 차량 제어기의 주제어부가 해당 순서를 파악하여 섹터별 차분 해제를 수행하는 방법이 있다.Referring to FIG. 20 , according to the second embodiment of the present invention, although the difference canceling order is not included in the difference data, there is a method in which the main controller of the vehicle controller grasps the corresponding order to perform the sector-by-sector differential cancellation.

상술한 바와 같은 본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법은, 플래쉬 메모리 섹터의 특성(섹터 단위 삭제, 데이터 쓰기 순으로 수행, 매우 느린 삭제 및 쓰기 속도)을 보완하고, 저용량의 메모리 (SRAM)를 사용하여 차분 업데이트가 가능하게 하기 위하여, 섹터 단위의 차분 데이터를 생성하고 차분 데이터를 이동 순서대로 정렬하고, 이후 역순으로 섹터 단위의 차분 데이터를 해제하는 방법이다.As described above, the update method of the vehicle controller according to the preferred embodiment of the present invention supplements the characteristics of the flash memory sector (sector-unit deletion, data writing sequentially, very slow deletion and writing speed), and a low-capacity memory ( In order to enable differential update using SRAM), it is a method of generating sector-by-sector differential data, arranging the differential data in a movement order, and then releasing sector-by-sector differential data in the reverse order.

본 발명의 바람직한 실시예에 따른 차량용 제어기의 업데이트 방법은, 차분 해제 버퍼를 구성하는 저용량의 메모리(단일 섹터 사이즈)만으로 차분 데이터의 이동에 따른 추가 메모리 사용없이 차분 업데이트가 가능한 효과가 있다.The method of updating a vehicle controller according to a preferred embodiment of the present invention has an effect that differential update is possible without using additional memory according to the movement of difference data using only a low-capacity memory (single sector size) constituting the difference cancellation buffer.

이상의 설명은 본 발명의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위 내에서 다양한 수정, 변경 및 치환이 가능할 것이다. 따라서, 본 발명에 개시된 실시예 및 첨부된 도면들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예 및 첨부된 도면에 의하여 본 발명의 기술 사상의 범위가 한정되는 것은 아니다.The above description is merely illustrative of the technical idea of the present invention, and those of ordinary skill in the art to which the present invention pertains may make various modifications, changes, and substitutions within the scope without departing from the essential characteristics of the present invention. will be. Accordingly, the embodiments disclosed in the present invention and the accompanying drawings are for explaining, not limiting, the technical spirit of the present invention, and the scope of the technical spirit of the present invention is not limited by these embodiments and the accompanying drawings. .

본 발명에 따른 단계들 및/또는 동작들은 기술분야의 통상의 기술자에 의해 이해될 수 있는 것과 같이, 다른 순서로, 또는 병렬적으로, 또는 다른 에포크(epoch) 등을 위해 다른 실시 예들에서 동시에 일어날 수 있다.Steps and/or operations according to the present invention may occur concurrently in different embodiments, in a different order, or in parallel, or for different epochs, etc., as would be understood by one of ordinary skill in the art. can

실시 예에 따라서는, 단계들 및/또는 동작들의 일부 또는 전부는 하나 이상의 비-일시적 컴퓨터-판독가능 매체에 저장된 명령, 프로그램, 상호작용 데이터 구조(interactive data structure), 클라이언트 및/또는 서버를 구동하는 하나 이상의 프로세서들을 사용하여 적어도 일부가 구현되거나 또는 수행될 수 있다. 하나 이상의 비-일시적 컴퓨터-판독가능 매체는 예시적으로 소프트웨어, 펌웨어, 하드웨어, 및/또는 그것들의 어떠한 조합일 수 있다. 또한, 본 명세서에서 논의된 "모듈"의 기능은 소프트웨어, 펌웨어, 하드웨어, 및/또는 그것들의 어떠한 조합으로 구현될 수 있다.Depending on the embodiment, some or all of the steps and/or operations run instructions, programs, interactive data structures, clients and/or servers stored in one or more non-transitory computer-readable media. At least some may be implemented or performed using one or more processors. The one or more non-transitory computer-readable media may be illustratively software, firmware, hardware, and/or any combination thereof. Further, the functionality of a “module” discussed herein may be implemented in software, firmware, hardware, and/or any combination thereof.

1: 서버
10: 차량
20: 제어기
30: 주제어부
40: 통신부
100: 제1 메모리
200: 제2 메모리
1: Server
10: vehicle
20: controller
30: main fisherman
40: communication department
100: first memory
200: second memory

Claims (17)

구 버전과 신 버전의 데이터를 비교하여 로우 차분 데이터를 생성하는 단계;
상기 로우 차분 데이터를 메모리 섹터별로 분할하여 분할 차분 데이터를 생성하는 단계; 및
상기 분할 차분 데이터를 이용하여 상기 구 버전을 상기 신 버전으로 업데이트하는 단계;
를 포함하는 차량용 제어기의 업데이트 방법.
generating raw difference data by comparing the data of the old version and the new version;
generating divided difference data by dividing the row difference data for each memory sector; and
updating the old version to the new version using the divided difference data;
An update method of a vehicle controller comprising a.
제 1 항에 있어서,
상기 로우 차분 데이터는, 동일, 추가, 변경, 삭제 데이터를 포함하여 구성되는 것을 특징으로 하는 차량용 제어기의 업데이트 방법.
The method of claim 1,
The raw difference data, the updating method of the vehicle controller, characterized in that configured to include the same, addition, change, and deletion data.
제 2 항에 있어서,
상기 동일 데이터와 상기 삭제 데이터는, 사이즈 정보를 포함하고,상기 추가 데이터와 상기 변경 데이터는, 사이즈 정보와 데이터 정보를 포함하는 것을 특징으로 하는 차량용 제어기의 업데이트 방법.
3. The method of claim 2,
The same data and the deleted data include size information, and the additional data and the changed data include size information and data information.
제 2 항에 있어서,
상기 분할 차분 데이터를 생성하는 단계는,
상기 로우 차분 데이터를 섹터 순으로 순차적으로 로드하는 단계,상기 로드된 데이터의 구 버전 주소와 신 버전 주소를 계산하는 단계, 및상기 신 버전 주소에 해당하는 메모리 섹터에 상기 로드된 데이터를 이동하는 단계를포함하는 것을 특징으로 하는 차량용 제어기의 업데이트 방법.
3. The method of claim 2,
The step of generating the divided difference data includes:
Sequentially loading the raw differential data in sector order, calculating an old version address and a new version address of the loaded data, and moving the loaded data to a memory sector corresponding to the new version address. An update method of a vehicle controller comprising a.
제 4 항에 있어서,
상기 분할 차분 데이터를 생성하는 단계는,
상기 로드된 데이터가 동일 데이터, 추가 데이터, 또는 변경 데이터이고, 둘 이상의 메모리 섹터에 오버랩되는 경우, 오버랩된 데이터를 추가 분할하는 단계를 포함하는 것을 특징으로 하는 차량용 제어기의 업데이트 방법.
5. The method of claim 4,
The step of generating the divided difference data includes:
and dividing the overlapped data further when the loaded data is the same data, additional data, or changed data and overlaps two or more memory sectors.
제 4 항에 있어서,
상기 분할 차분 데이터를 생성하는 단계는,
상기 메모리 섹터에 이동되는 데이터를 고려하여, 데이터 이동의 역순으로 섹터별 차분 해제 순서를 정하는 단계를 포함하는 것을 특징으로 하는 차량용 제어기의 업데이트 방법.
5. The method of claim 4,
The step of generating the divided difference data includes:
and determining a difference cancellation order for each sector in a reverse order of data movement in consideration of data moved to the memory sector.
제 6 항에 있어서,
상기 분할 차분 데이터를 생성하는 단계는,
상기 메모리 섹터에 이동되는 데이터의 구 버전의 섹터 주소를 구 버전의 참조 위치로 정하는 단계를 포함하는 것을 특징으로 하는 차량용 제어기의 업데이트 방법.
7. The method of claim 6,
The step of generating the divided difference data includes:
and determining a sector address of the old version of the data moved to the memory sector as a reference location of the old version.
제 7 항에 있어서,
상기 분할 차분 데이터를 생성하는 단계는,
상기 차분 해제 순서와 상기 구 버전의 참조 위치를 상기 분할 차분 데이터에 포함시키는 단계를 포함하는 것을 특징으로 하는 차량용 제어기의 업데이트 방법.
8. The method of claim 7,
The step of generating the divided difference data includes:
and including the difference release order and the reference position of the old version in the divided difference data.
제 4 항에 있어서,
상기 메모리 섹터는, 상기 구 버전 및 상기 로우 차분 데이터와 다른 메모리 장치에 적용되는 것을 특징으로 하는 차량용 제어기의 업데이트 방법.
5. The method of claim 4,
and the memory sector is applied to a memory device different from the old version and the raw difference data.
제 9 항에 있어서,
상기 메모리 섹터는 차분 해제 버퍼로서 플래쉬 메모리 또는 SRAM를 구성하는 것을 특징으로 하는 차량용 제어기의 업데이트 방법.
10. The method of claim 9,
and the memory sector constitutes a flash memory or an SRAM as a difference release buffer.
제 1 항에 있어서,
상기 신 버전으로 업데이트하는 단계는,
상기 분할 차분 데이터를 차분 해제하기 위하여, 상기 구 버전의 참조 위치를 참조하여 구 버전의 주소값을 획득하는 단계,
상기 분할 차분 데이터가 저장되는 차분 해제 버퍼의 시작 주소를 신 버전의 주소값으로 획득하는 단계, 및
상기 분할 차분 데이터의 데이터 종류, 상기 구 버전 주소값, 및 상기 신 버전의 주소값에 따라 상기 분할 차분 데이터를 차분 해제하는 단계를 포함하는 것을 특징으로 하는 차량용 제어기의 업데이트 방법.
The method of claim 1,
The step of updating to the new version is,
obtaining an address value of the old version with reference to the reference position of the old version in order to de-differentiate the divided difference data;
obtaining a start address of a difference release buffer in which the divided difference data is stored as an address value of a new version; and
and de-differentiating the divided difference data according to a data type of the divided difference data, the old version address value, and the new version address value.
제 11 항에 있어서,
상기 차분 해제하는 단계는,
미리 마련된 차분 해제 순서를 고려하여 분할 차분 데이터를 차분 해제하는 것을 특징으로 하는 차량용 제어기의 업데이트 방법.
12. The method of claim 11,
The step of canceling the difference is
An update method of a vehicle controller, characterized in that the divided difference data is released in consideration of a predetermined difference cancellation order.
제 11 항에 있어서,
상기 신 버전으로 업데이트하는 단계는,
상기 분할 차분 데이터의 데이터 종류가 동일 데이터인 경우, 상기 동일 데이터의 사이즈만큼 상기 구 버전의 주소값과 상기 신 버전의 주소값을 증가하는 단계를 포함하는 것을 특징으로 하는 차량용 제어기의 업데이트 방법.
12. The method of claim 11,
The step of updating to the new version is,
and increasing the address value of the old version and the address value of the new version by the size of the same data when the data type of the divided difference data is the same data.
제 11 항에 있어서,
상기 신 버전으로 업데이트하는 단계는,
상기 분할 차분 데이터의 데이터 종류가 추가 데이터인 경우, 상기 추가 데이터의 사이즈만큼 상기 신 버전의 주소값을 증가하는 단계를 포함하는 것을 특징으로 하는 차량용 제어기의 업데이트 방법.
12. The method of claim 11,
The step of updating to the new version is,
and increasing the address value of the new version by the size of the additional data when the data type of the divided difference data is additional data.
제 11 항에 있어서,
상기 신 버전으로 업데이트하는 단계는,
상기 분할 차분 데이터의 데이터 종류가 변경 데이터인 경우, 상기 변경 데이터의 사이즈만큼 상기 구 버전의 주소값과 상기 신 버전의 주소값을 증가하는 단계를 포함하는 것을 특징으로 하는 차량용 제어기의 업데이트 방법.
12. The method of claim 11,
The step of updating to the new version is,
and increasing the address value of the old version and the address value of the new version by the size of the changed data when the data type of the divided difference data is changed data.
제 11 항에 있어서,
상기 신 버전으로 업데이트하는 단계는,
상기 분할 차분 데이터의 데이터 종류가 삭제 데이터인 경우, 상기 삭제 데이터의 사이즈만큼 상기 구 버전의 주소값을 증가하는 단계를 포함하는 것을 특징으로 하는 차량용 제어기의 업데이트 방법.
12. The method of claim 11,
The step of updating to the new version is,
and increasing the address value of the old version by the size of the deleted data when the data type of the divided difference data is deleted data.
제 1 항에 있어서,
상기 구 버전과 상기 로우 차분 데이터는 동일한 플래쉬 메모리에 저장되는 것을 특징으로 하는 차량용 제어기의 업데이트 방법.
The method of claim 1,
and the old version and the raw difference data are stored in the same flash memory.
KR1020190168432A 2019-11-26 2019-12-17 Method for updating vehicular control unit KR102275140B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/101,530 US11650811B2 (en) 2019-11-26 2020-11-23 Method of updating control unit for vehicle

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20190153807 2019-11-26
KR1020190153807 2019-11-26

Publications (2)

Publication Number Publication Date
KR20210064994A true KR20210064994A (en) 2021-06-03
KR102275140B1 KR102275140B1 (en) 2021-07-08

Family

ID=76396736

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190168432A KR102275140B1 (en) 2019-11-26 2019-12-17 Method for updating vehicular control unit

Country Status (1)

Country Link
KR (1) KR102275140B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100729525B1 (en) * 2005-10-06 2007-06-15 삼성에스디에스 주식회사 Method and system for updating firmware
KR20080083512A (en) * 2007-03-12 2008-09-18 (주)프레스토블루 Firmware over the air system
KR20190074346A (en) 2017-12-20 2019-06-28 현대자동차주식회사 Method for software update for vehicle and the vehicle usiing of the same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100729525B1 (en) * 2005-10-06 2007-06-15 삼성에스디에스 주식회사 Method and system for updating firmware
KR20080083512A (en) * 2007-03-12 2008-09-18 (주)프레스토블루 Firmware over the air system
KR20190074346A (en) 2017-12-20 2019-06-28 현대자동차주식회사 Method for software update for vehicle and the vehicle usiing of the same

Also Published As

Publication number Publication date
KR102275140B1 (en) 2021-07-08

Similar Documents

Publication Publication Date Title
US7363421B2 (en) Optimizing write/erase operations in memory devices
US7971022B2 (en) Apparatus and method of processing data of non-volatile memory using transaction block
JP6008325B2 (en) Data storage system and control method thereof
JP2009003880A (en) Control device and method for non-volatile memory and storage device
US8271721B2 (en) Data writing method and data storage device
JP2015191336A (en) Memory controller, information processor, control method of information processor and program
US7809878B2 (en) Apparatus and method for controlling flash memory
US11650811B2 (en) Method of updating control unit for vehicle
US11481120B2 (en) Reducing wear on zoned storage devices for storing digital data
JP2016062319A (en) Data reading device, program and data reading method
KR102275140B1 (en) Method for updating vehicular control unit
US10969970B2 (en) Storage optimization of database in volatile and non-volatile storing unit
JP6988445B2 (en) Storage system, control device and control method
KR101676175B1 (en) Apparatus and method for memory storage to protect data-loss after power loss
US20160259579A1 (en) Storage control apparatus and storage control method
KR102452400B1 (en) Difference update method for vehicullr control unit and difference update roll back method
JP2006202233A (en) Controller and program for same
JP2016103261A (en) Firmware downloading method and firmware built-in device
JP6521694B2 (en) Storage control system and storage control device
US20110082995A1 (en) Information processing apparatus
CN113127376B (en) Control method, device and equipment for solid state drive
JP4468342B2 (en) Data management method
JP6512091B2 (en) INFORMATION MANAGEMENT DEVICE, INFORMATION MANAGEMENT METHOD, AND INFORMATION MANAGEMENT PROGRAM
JP2005321843A (en) Rewriting method for firmware
US20100094804A1 (en) Method and Device for Updating a Database, and Computer Program Product

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right