KR20110016139A - Reprogramming method of plural controllers - Google Patents

Reprogramming method of plural controllers Download PDF

Info

Publication number
KR20110016139A
KR20110016139A KR1020090073687A KR20090073687A KR20110016139A KR 20110016139 A KR20110016139 A KR 20110016139A KR 1020090073687 A KR1020090073687 A KR 1020090073687A KR 20090073687 A KR20090073687 A KR 20090073687A KR 20110016139 A KR20110016139 A KR 20110016139A
Authority
KR
South Korea
Prior art keywords
reprogramming
personal computer
target controller
controller
program target
Prior art date
Application number
KR1020090073687A
Other languages
Korean (ko)
Other versions
KR101017977B1 (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 KR1020090073687A priority Critical patent/KR101017977B1/en
Publication of KR20110016139A publication Critical patent/KR20110016139A/en
Application granted granted Critical
Publication of KR101017977B1 publication Critical patent/KR101017977B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/18Error detection or correction of the data by redundancy in hardware using passive fault-masking of the redundant circuits
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/387Information transfer, e.g. on bus using universal interface adapter for adaptation of different data processing systems to different peripheral devices, e.g. protocol converters for incompatible systems, open system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Abstract

PURPOSE: A method for reprogramming a plurality of controllers is provided to reduce the work time by reprogramming controllers at a time. CONSTITUTION: A PC(20) transmits an initialization frame, and a reprogramming application to a first programmed target controller(10). The first programmed target controller transmits the initialization frame, and the reprogramming application to a second programmed target controller(12). The second programmed target controller transmits the initialization frame, and the reprogramming application to a third programmed target controller(14). The third programmed target controller transmits the initialization frame, and the reprogramming application to the PC. If the received initialization frame, and the reprogramming application is same with the transmitted initialization frame, and the reprogramming application, the PC performs reprogramming.

Description

복수개의 제어기의 리프로그래밍 방법{Reprogramming method of plural controllers}Reprogramming method of plural controllers

본 발명은 복수개의 제어기의 리프로그래밍 방법에 관한 것으로, 더욱 상세하게는, 캔 부트스트랩 로더를 통한 복수개의 제어기에 대한 리프로그래밍 방법에 관한 것이다.The present invention relates to a reprogramming method of a plurality of controllers, and more particularly, to a reprogramming method for a plurality of controllers through a can bootstrap loader.

캔 부트스트랩 로더(CAN Bootstrap Loader) 기능은 공장에서 최초 마이크로컨트롤러(이하 마이컴 이라 칭함)생산 시에 내장되어 캔 인터페이스(CAN Interface)를 통하여 마이컴의 내부의 램(RAM)으로 코드/데이터(code/data)를 로드(load)할 수 있도록 지원하는 기능을 의미한다.The CAN Bootstrap Loader function is factory built at the time of production of the first microcontroller (hereinafter referred to as micom) and can be transferred to the internal RAM of the microcomputer via the CAN interface. Refers to a function that supports loading data.

이 기능은 최초 리프로그래밍 시에 JTAG을 사용하지 않기 때문에 별도의 디버깅 장비가 필요하지 않을 뿐만 아니라, 하우징과 제어기가 결합된 상태에서도 마스터 제어기(일반적으로 퍼스널 컴퓨터)와 리프로그래밍 대상 제어기가 CAN(Control Area Network)통신만 연결되어 있다면 리프로그래밍 할 수 있다는 장점 때문에 널리 쓰여지고 있다.This function eliminates the need for a separate debugging device because JTAG is not used for the initial reprogramming. In addition, the master controller (usually a personal computer) and the controller to be reprogrammed are CAN (Control) even when the housing and controller are combined. It is widely used because of the advantage of reprogramming if only Area Network communication is connected.

도 1은 종래기술에 따른 CAN 통신장치의 일예를 나타낸 도면이고, 도 2는 종 래기술에 따른 CAN 통신장치의 다른 예를 나타낸 도면이고, 도 3은 종래기술에 따른 CAN 통신장치의 다른 예를 나타낸 도면이다.1 is a view showing an example of a CAN communication device according to the prior art, Figure 2 is a view showing another example of a CAN communication device according to the prior art, Figure 3 is another example of a CAN communication device according to the prior art The figure shown.

도 1을 참조하면, 퍼스널 컴퓨터(20)와 하나의 제어기(10)가 연결되어, 제어기(10)는 최초 퍼스널 컴퓨터(20)로부터 플래시 메모리에 쓰기 기능을 수행하는 어플리케이션 프로그램을 CAN통신을 통하여 수신하게 되고, 이렇게 쓰여진 데이터는 램(RAM) 영역에 저장된다. 이때 제어기(10)는 퍼스널 컴퓨터(20)로부터 성공적으로 데이터 수신이 완료되면 정해진 CAN ID로 응답메시지를 전송한다. 어플리케이션 프로그램이 램영역에 저장되게 되면 어플리케이션 프로그램이 수행되고, 이 프로그램에 의해 작업자가 전송한 데이터가 실제 플래시 메모리에 쓰여짐으로써 하나의 제어기에 리프로그램이 완료된다.Referring to FIG. 1, a personal computer 20 and one controller 10 are connected, and the controller 10 receives an application program for performing a writing function from a first personal computer 20 to a flash memory through CAN communication. The written data is stored in the RAM area. At this time, the controller 10 transmits the response message to the determined CAN ID upon successful completion of data reception from the personal computer 20. When the application program is stored in the RAM area, the application program is executed, and the data transferred by the operator is written to the actual flash memory by the program, thereby completing the reprogramming in one controller.

도 1에 따르면, 퍼스널 컴퓨터(20)와 대상 제어기(10)가 1:1 연결되어야 하기 때문에 다수의 제어기(10; 동일한 제어기)를 리프로그래밍해야 할 때, 각각의 제어기(10)를 리프로그래밍 해야하고 이로 인해 작업자의 불편함 및 작업시간, 작업인원이 증가될 수 밖에 없다는 문제점이 있다. 또한 퍼스널 컴퓨터(20)에서 전송된 데이터가 정상적으로 플래시 메모리에 쓰여졌는지 확인하기가 어려운 문제점이 있다.According to FIG. 1, when a plurality of controllers 10 (the same controller) need to be reprogrammed because the personal computer 20 and the target controller 10 must be connected 1: 1, each controller 10 must be reprogrammed. And there is a problem that the inconvenience of the worker and the working time, the number of workers will have to increase. In addition, there is a problem that it is difficult to confirm whether the data transmitted from the personal computer 20 is normally written to the flash memory.

도 2를 참조하면, 여러개의 제어기(10, 12, 14)를 도 1과 같은 방식으로 동일 CAN 버스에 연결하게 되면, 각각의 제어기(10, 12, 14)는 퍼스널 컴퓨터(20)에 응답하여 동일한 CAN ID에 메시지를 전송하게 되고, 이는 버스상에서 데이터 충돌을 일으키기 때문에 정상적으로 리프로그래밍을 수행할 수 없는 문제점이 있다.Referring to FIG. 2, when several controllers 10, 12, 14 are connected to the same CAN bus in the same manner as in FIG. 1, each controller 10, 12, 14 responds to the personal computer 20. The message is sent to the same CAN ID, which causes a data collision on the bus, and thus cannot be reprogrammed normally.

특히, 제어기(10, 12, 14)의 개발 및 테스트 단계에서는 여러 개의 제어기(10, 12, 14)가 단계별로 투입되기 때문에 불필요한 비용이 많이 드는 문제점이 있다.In particular, in the development and testing stages of the controllers 10, 12 and 14, since a plurality of controllers (10, 12, 14) are put in stages, there is a problem that the unnecessary cost is expensive.

도 3을 참조하면, 여러개의 제어기(300a, 300b, ㆍㆍㆍ, 300n)와 호스트 컴퓨터(100)가 별도의 버스라인(200)에 공통 연결된 구조이지만(대한민국 공개특허공보 공개번호 10-2006-0134446 공개일자 2006년 12월 28일), 호스트 컴퓨터(100)는 별도의 ID를 관리해야하는 부담이 있고, 제어기(300a, 300b, ㆍㆍㆍ, 300n)의 리프로그래밍에 시간이 많이 소요되는 문제점이 있다.Referring to FIG. 3, although a plurality of controllers 300a, 300b,..., 300n and a host computer 100 are commonly connected to a separate bus line 200 (Korean Patent Laid-Open Publication No. 10-2006- 0134446 Publication date (December 28, 2006), the host computer 100 has a burden of managing a separate ID, a problem that takes a long time to reprogram the controller (300a, 300b, ..., 300n) have.

본 발명의 목적은 상기한 바와 같은 종래기술의 문제점을 개선하기 위하여 제안된 것으로, 퍼스널 컴퓨터와 다수의 대상 제어기를 시리얼로 연결하여 캔 부트스트랩 로더를 통하여 한 번에 여러개의 제어기를 리프로그래밍 할 수 있는 복수개의 제어기의 리프로그래밍 방법을 제공함에 있다.An object of the present invention is to improve the problems of the prior art as described above, it is possible to reprogram several controllers at once through a can bootstrap loader by serially connecting a personal computer and a plurality of target controllers. The present invention provides a reprogramming method of a plurality of controllers.

상기한 바와 같은 목적을 달성하기 위한 본 발명의 바람직한 실시예에 따른 복수개의 제어기의 리프로그래밍 방법은 퍼스널 컴퓨터, 상기 퍼스널 컴퓨터와 시리얼로 연결된 복수 개의 제어기에 대한 리프로그래밍 방법에 관한 것으로서, 퍼스널 컴퓨터가 제1 프로그램 대상 제어기로 부트로더 진입을 위한 초기화 프레임 및 리프로그래밍 어플리케이션 소프트웨어를 전송하는 제1 단계; 상기 제1 프로그램 대상 제어기가 제2 프로그램 대상 제어기로 부트로더 진입을 위한 초기화 프레임 및 리프로그래밍 어플리케이션 소프트웨어를 전송하는 제2 단계; 상기 제2 프로그램 대상 제어기가 제3 프로그램 대상 제어기로 부트로더 진입을 위한 초기화 프레임 및 리프로그래밍 어플리케이션 소프트웨어를 전송하는 제3 단계; 상기 제3 프로그램 대상 제어기가 상기 퍼스널 컴퓨터로 부트로더 진입을 위한 초기화 프레임 및 리프로그래밍 어플리케이션 소프트웨어를 전송하는 제4 단계; 및 상기 퍼스널 컴퓨터가 상기 제3 프로그램 대상 제어기로부터 전송된 부트로더 진입을 위한 초기화 프레임 및 리프로그래밍 어플리케이션을 최초의 부트로더 진입을 위한 초기화 프레 임 및 리프로그래밍 어플리케이션과 비교하여 일치하는 경우 리프로그래밍을 수행하도록 하는 제5 단계;를 포함하여 이루어진 것을 특징으로 하는 복수 개의 제어기에 대한 리프로그래밍 방법이 제공된다.Reprogramming method of a plurality of controllers according to a preferred embodiment of the present invention for achieving the above object relates to a personal computer, a reprogramming method for a plurality of controllers connected in series with the personal computer, A first step of transmitting an initialization frame and reprogramming application software for entering a boot loader to a first program target controller; A second step of transmitting, by the first program target controller, an initialization frame and reprogramming application software for entering a boot loader to a second program target controller; A third step of transmitting, by the second program target controller, an initialization frame and reprogramming application software for entering a boot loader to a third program target controller; Transmitting, by the third program target controller, the initialization frame and reprogramming application software for entering a boot loader to the personal computer; And if the personal computer compares the initialization frame and reprogramming application for bootloader entry transmitted from the third program target controller with the initial frame and reprogramming application for initial bootloader entry, and performs reprogramming. A fifth step is to provide a reprogramming method for a plurality of controllers comprising a.

이상 설명한 바와 같이, 본 발명에 따른 복수개의 제어기의 리프로그래밍 방법에 의하면, 한 번에 여러 제어기를 리프로그래밍 할 수 있기 때문에, 하나의 제어기씩 리프로그래밍 하는 방법보다 작업시간이 크게 줄어들게 되는 효과가 있다. 특히, 리프로그래밍할 제어기의 수가 많아 질 수록 더욱 효과가 있다.As described above, according to the reprogramming method of a plurality of controllers according to the present invention, since several controllers can be reprogrammed at a time, the work time is significantly reduced compared to the method of reprogramming one controller one by one. . In particular, the greater the number of controllers to be reprogrammed, the more effective it is.

또한 마지막 대상 제어기는 퍼스널 컴퓨터로 수신한 데이터를 재전송하며, 퍼스널 컴퓨터는 1번 제어기로 전송한 데이터와 마지막 제어기로부터 수신한 데이터를 비교함으로써 리프로그래밍 도중 데이터가 손상되었는지를 판단할 수 있는 효과가 있다.Also, the last target controller retransmits the data received to the personal computer, and the personal computer compares the data transmitted to the first controller with the data received from the last controller to determine whether the data is damaged during reprogramming. .

또한 퍼스널 컴퓨터는 일정 시간내에 마지막 제어기로부터 응답메시지의 수신 여부로 리프로그래밍 도중 에러의 발생여부를 판단하여 리프로그래밍을 재시도할 수 있는 효과가 있다.In addition, the personal computer has an effect of retrying the reprogramming by determining whether an error occurs during the reprogramming by receiving a response message from the last controller within a predetermined time.

이하, 본 발명에 따른 복수개의 제어기의 리프로그래밍 방법에 대하여 첨부도면을 참조로 상세히 설명한다.Hereinafter, a reprogramming method of a plurality of controllers according to the present invention will be described in detail with reference to the accompanying drawings.

도 4는 본 발명에 따른 CAN 통신장치의 일예를 나타낸 도면이고, 도 5 내지 도 8은 본 발명에 따른 CAN 통신장치의 리프로그램과정을 도식적으로 나타낸 도면 들이다.4 is a view showing an example of a CAN communication device according to the present invention, Figures 5 to 8 are diagrams showing a reprogramming process of the CAN communication device according to the present invention.

도 4 내지 도 8을 참조하면, 퍼스널 컴퓨터(20)와 여러 제어기(10)들을 시리얼로 연결함으로써, 각각의 제어기(10)의 CAN 버스를 독립시켜 특정 제어기에 에러(Error)가 발생하여 미응답하여도 퍼스널 컴퓨터에서 제어기에 에러가 발생했음을 판단하여 작업자가 리프로그래밍을 재시도할 수 있도록 하였다.4 to 8, by connecting the personal computer 20 and the various controllers 10 in series, an CAN bus of each controller 10 is independent and an error occurs in a specific controller, thereby failing to respond. Even if the personal computer determines that an error has occurred in the controller, the operator can retry reprogramming.

또한, 리프로그래밍에 대한 제어권은 퍼스널 컴퓨터에만 위임된 것이 아니라 퍼스널 컴퓨터를 시작으로 N개의 대상 제어기(N:연결된 리프로그램 대상 제어기의 수)에 순차적으로 위임되기 때문에 작업자는 최초 퍼스널 컴퓨터에서 리프로그래밍 시작 커맨드만 전송하여도 전체적인 리프로그래밍이 수행되게 된다. 즉, 퍼스널 컴퓨터(20)는 1번째 제어기에 리드프로그래밍 어플리케이션 프로그램 또는 플래시 메모리에 라이팅(writing)할 소프트웨어를 블록 단위로 전송하고 전송이 완료되면 1번째 제어기는 퍼스널 컴퓨터로부터 수신한 리프로그래밍 어플리케이션 프로그램 또는 플래시 메모리에 라이팅할 소프트웨어를 자신의 램(RAM)에 저장하거나 실제 플래시 메모리에 라이팅한 뒤, 2번째 제어기로 퍼스널 컴퓨터로부터 자신이 수신한 데이터를 그대로 전송하게 된다. 2번째 제어기도 위와 같은 과정을 동일하게 수행하게 되고, 마지막 N번째의 대상 제어기는 다시 퍼스널 컴퓨터와 연결되어 있어, N-1번째 제어기로부터 수신된 메시지를 퍼스널 컴퓨터로 재 전송하게 된다. 그리고 퍼스널 컴퓨터에서는 최초 1번째 대상 제어기로 보낸 데이터와 마지막 N번째 대상 제어기로부터 수신된 데이터를 비교하여 전체 리프로그래밍 과정 도중 데이터가 손실되지 않았는지를 판단할 수 있게 된다.In addition, since the control over reprogramming is not delegated only to the personal computer, it is delegated sequentially to the N target controllers (N: number of connected reprogrammed target controllers) starting from the personal computer, so that the worker starts reprogramming on the first personal computer. The entire reprogramming is performed by sending only the command. That is, the personal computer 20 transmits the read programming application program or the software to be written to the flash memory in units of blocks to the first controller, and when the transfer is completed, the first controller receives the reprogramming application program received from the personal computer or the like. After writing the software to be written to the flash memory in the RAM or the actual flash memory, the second controller transfers the data received from the personal computer as it is. The second controller performs the same process as above, and the last N-th target controller is connected to the personal computer again, and retransmits the message received from the N-th controller to the personal computer. The personal computer compares the data sent to the first first target controller with the data received from the last N-th target controller to determine whether data has been lost during the entire reprogramming process.

도 5 및 도 6을 좀더 자세히 설명하면, 먼저 퍼스널 컴퓨터(20)에서 1번 제어기(10)로 부트로더 진입을 위한 초기화 프레임이 전송된다. 또한 퍼스널 컴퓨터(20)에서 1번 제어기(10)로 리프로그래밍 어플리케이션 소프트웨어가 전송된다.5 and 6, the initialization frame for entering the boot loader is first transmitted from the personal computer 20 to the first controller 10. Reprogramming application software is also sent from the personal computer 20 to the first controller 10.

이후 1번 제어기(10)로부터 2번 제어기(12)로 부트로더 진입을 위한 초기화 프레임 및 리프로그래밍 어플리케이션 소트트웨어가 전송된다.Thereafter, an initialization frame and reprogramming application software for entering the boot loader are transmitted from the first controller 10 to the second controller 12.

이후 2번 제어기(12)로부터 3번 제어기(14)로 부트로더 진입을 위한 초기화 프레임 및 리프로그래밍 어플리케이션 소트트웨어가 전송된다.Thereafter, an initialization frame and reprogramming application software for entering the boot loader are transmitted from the controller 12 to the controller 14.

이후 3번 제어기(14)로부터 퍼스널 컴퓨터(20)로 부트로더 진입을 위한 초기화 프레임 및 리프로그래밍 어플리케이션 소트트웨어가 전송되고 최초 전송된 초기화 프레임 및 리프로그래밍 어플리케이션 소프트웨어와 비교된다.Thereafter, the initialization frame and reprogramming application software for entering the boot loader from the controller 14 to the personal computer 20 are transmitted and compared with the initially transmitted initialization frame and the reprogramming application software.

또한, 도 7 및 도 8을 좀더 자세히 설명하면, 퍼스널 컴퓨터(20)에서 1번 제어기(10)로 롬(ROM)에 라이팅하기 위한 리프로그램 데이터 블록이 전송된다.7 and 8, a reprogram data block for writing to a ROM is transferred from the personal computer 20 to the first controller 10.

이후 1번 제어기(10)로부터 2번 제어기(12)로 롬(ROM)에 라이팅하기 위한 리프로그램 데이터 블록이 전송된다.Thereafter, a reprogram data block for writing to the ROM is transmitted from the first controller 10 to the second controller 12.

이후 2번 제어기(12)로부터 3번 제어기(14)로 롬(ROM)에 라이팅하기 위한 리프로그램 데이터 블록이 전송된다.The reprogram data block for writing to the ROM is then sent from controller 12 to controller 14.

이후 3번 제어기(14)로부터 퍼스널 컴퓨터(20)로 롬(ROM)에 라이팅하기 위한 리프로그램 데이터 블록이 전송되고 최초 전송된 리프로그램 데이터블록과 비교된다. 이후 모든 데이터 블록 전송이 완료되고 송신 데이터 블록과 수신 데이터 블록이 일치되면 리프로그램이 완료된다.Then, the reprogram data block for writing to the ROM from the third controller 14 is transferred to the personal computer 20 and compared with the first reprogram data block transmitted. After all data block transmissions are completed and the transmission data block and the reception data block match, the reprogram is completed.

도 9는 본 발명에 따른 CAN 통신장치에서 퍼스널 컴퓨터측의 리프로그램 시퀀스를 나타낸 도면이다.9 is a diagram showing a reprogram sequence on the personal computer side in a CAN communication device according to the present invention.

도 9를 참조하면, 퍼스널 컴퓨터(20)는 1번 제어기(10)로 CAN 부트스트랩 로더모드로 진입하기 위한 메시지를 전송한다(S1). 즉, 최초 작업자가 퍼스널 컴퓨터(20)에서 부트스트랩 로더를 시작하기 위한 초기화 메시지(initialization message)를 1번 대상 제어기(10)의 CAN 노드A(혹은 도 5에서는 CAN 1)에 전송한다.Referring to FIG. 9, the personal computer 20 transmits a message for entering the CAN bootstrap loader mode to the first controller 10 (S1). That is, the first worker sends an initialization message for starting the bootstrap loader in the personal computer 20 to the CAN node A (or CAN 1 in FIG. 5) of the first controller 10.

이후, 현재시간(T,설정된 시간)과 부트스트랩 로더 초기화 메시지 프레임 전송후 리프로그램 어플리케이션 소프트웨어를 전송하기 까지의 대기시간(T1)을 비교한다(S3).Thereafter, the current time (T, set time) is compared with the waiting time (T1) before transmitting the bootstrap loader initialization message frame and transmitting the reprogram application software (S3).

현재시간(T)이 대기시간(T1)보다 큰 경우, 퍼스널 컴퓨터(20)는 1번 제어기(10)로 리프로그래밍 어플리케이션 프로그램을 전송한다(S5).If the current time T is greater than the waiting time T1, the personal computer 20 transmits the reprogramming application program to the first controller 10 (S5).

전송된 리프로그래밍 어플리케이션 프로그램은 1번 제어기(10) 측의 램(RAM)에 저장되고 램 영역에서 수행되며, 플래시 메모리에 라이팅 하는 기능을 포함하고 있어서 이후 수신되는 블록(block)단위의 소프트웨어를 실제 플래시 메모리에 라이팅하게 된다.The transferred reprogramming application program is stored in the RAM of the first controller 10 and executed in the RAM area. The reprogramming application program includes a function of writing to the flash memory. It will write to flash memory.

이후, 현재시간(T)과 모든 제어기에 리프로그래밍 어플리케이션 소프트웨어가 라이팅되기 위한 예상시간(T2)를 비교한다(S7).Thereafter, the current time T is compared with the expected time T2 for writing the reprogramming application software to all controllers (S7).

현재시간(T)이 예상시간(T2)보다 작은 경우, 수신된 데이터가 있는지 판단하고(S9), 만약 접수된 데이터가 있는 경우, 데이터를 비교한다(S11). 즉 송신데이터와 수신데이터를 비교하여 만약 두 데이터가 서로 일치하는 경우에는(S13) 데이터 블록을 전송하게 된다(S17). 만약 두 데이터가 서로 일치하지 않는 경우에는 타임아웃 에러 메시지를 출력하게된다(S15).If the current time T is smaller than the expected time T2, it is determined whether there is received data (S9), and if there is received data, the data is compared (S11). In other words, when the transmission data and the reception data are compared, if the two data coincide with each other (S13), the data block is transmitted (S17). If the two data do not coincide with each other, a timeout error message is output (S15).

이후 현재시간(T)과 모든 제어기(10,12,14)에 데이터블록이 라이팅되기 위한 예상시간(T3)을 비교한다.Thereafter, the current time T is compared with the expected time T3 for writing the data block to all the controllers 10, 12, and 14.

만약 현재시간(T)이 예상시간(T3)보다 작은 경우, 수신된 데이터가 있는지 판단하고(S21), 만약 접수된 데이터가 있는 경우, 데이터를 비교한다(S23). 즉 송신데이터와 수신데이터를 비교하여 만약 두 데이터가 서로 일치하는 경우에는(S25) 전송할 데이터 블록이 있는지 판단하여(S27) 전송할 데이터블록이 없는 경우에는 오케이 메시지를 출력하게 된다(S29). 만약 두 데이터가 서로 일치하지 않는 경우에는 타임아웃 에러 메시지를 출력하게된다(S31). 마지막 제어기(14)는 퍼스널 컴퓨터(20)의 CAN 노드B(도 4에서는 CAN 2)에 초기화 메시지, 리프로그램 어플리케이션 프로그램 및 리프로그램 데이터블록을 전송하게 된다.If the current time T is smaller than the expected time T3, it is determined whether there is received data (S21), and if there is received data, the data is compared (S23). In other words, if the two data match each other by comparing the transmission data and the reception data (S25), it is determined whether there is a data block to be transmitted (S27). If the two data do not coincide with each other, a timeout error message is output (S31). The last controller 14 sends an initialization message, a reprogram application program and a reprogram data block to the CAN node B (CAN 2 in FIG. 4) of the personal computer 20.

도 10은 본 발명에 따른 CAN 통신장치에서 리프로그램 대상 제어기측의 리프로그램 시퀀스를 나타낸 도면이다.10 is a diagram illustrating a reprogram sequence on the reprogram target controller side in a CAN communication device according to the present invention.

먼저 제어기(10)는 부트 로더 초기화 프레임을 수신하게된다(S41). 이후 리프로그래밍 어플리케이션 소프트웨어를 수신하게 된다(S43). 이후 리프로그래밍 어플리케이션 소프트웨어를 램에 라이팅하게 된다(S45). 이후 부트로더 초기화 프레임을 다음 제어기(12)(다음 제어기가 없는 경우 퍼스널 컴퓨터로 전송)로 전송하게 된다(S47). 이후 리프로그램 대상 제어기의 현재 타임값(T')과 부트로더 초기화 프 레임 전송 후 리프로그래밍 어플리케이션 소프트웨어를 전송하기 까지의 대기시간(T1)을 비교한다. 만약 현재 타임값(T')이 대기시간(T1)보다 큰 경우에는 리프로그램 어플리케이션 소프트웨어를 전송하게 된다(S51). 이 과정은 마지막 제어기(14)까지 이루어지며, 마지막 제어기(14)는 퍼스널 컴퓨터(20)로 초기화 프레임 및 리프로그래밍 어플리케이션 소프트웨어를 전송하게 된다.First, the controller 10 receives a boot loader initialization frame (S41). Thereafter, the reprogramming application software is received (S43). After that, the reprogramming application software is written to RAM (S45). Thereafter, the boot loader initialization frame is transmitted to the next controller 12 (if there is no next controller, transmitted to the personal computer) (S47). After that, compare the current time value (T ') of the controller to be reprogrammed with the waiting time (T1) before transmitting the bootloader initialization frame and transmitting the reprogramming application software. If the current time value T 'is greater than the waiting time T1, the reprogram application software is transmitted (S51). This process takes place up to the last controller 14, which sends the initialization frame and reprogramming application software to the personal computer 20.

이후 데이터 블록 수신여부를 판단하게 된다(S53). 만약 수신된 데이터 블록이 있는 경우 데이터 블록을 롬(ROM)에 라이팅하게된다(S55). 이후 데이터 블록을 다음 제어기(다음 제어기가 없는 경우 퍼스널 컴퓨터로 전송)에 전송하게 된다. 이후 수신할 데이터가 존재하는 지를 판단하게 되고(S59), 수신할 데이터가 존재하는 경우 데이터 블록 수신여부를 다시 판단하게 된다(S61).It is then determined whether the data block is received (S53). If there is a received data block, the data block is written to the ROM (S55). The data block is then transferred to the next controller (if there is no next controller, sent to the personal computer). After that, it is determined whether there is data to be received (S59), and when there is data to be received, it is again determined whether to receive a data block (S61).

데이터 블록 수신 뿐만 아니라 앞서 설명한 부트로더 진입을 위한 초기화 프레임 및 리프로그래밍 어플리케이션 소프트웨어 모두 동일한 과정을 통해 전송된다.In addition to receiving a data block, the above-described initialization frame and reprogramming application software for entering the boot loader are transmitted through the same process.

도 1은 종래기술에 따른 CAN 통신장치의 일예를 나타낸 도면이다.1 is a view showing an example of a CAN communication device according to the prior art.

도 2는 종래기술에 따른 CAN 통신장치의 다른 예를 나타낸 도면이다.2 is a view showing another example of a CAN communication device according to the prior art.

도 3은 종래기술에 따른 CAN 통신장치의 다른 예를 나타낸 도면이다.3 is a view showing another example of a CAN communication device according to the prior art.

도 4는 본 발명에 따른 CAN 통신장치의 일예를 나타낸 도면이다.4 is a view showing an example of a CAN communication device according to the present invention.

도 5 내지 도 8은 본 발명에 따른 CAN 통신장치의 리프로그램과정을 도식적으로 나타낸 도면들이다.5 to 8 are diagrams schematically showing a reprogramming process of a CAN communication device according to the present invention.

도 9는 본 발명에 따른 CAN 통신장치에서 퍼스널 컴퓨터측의 리프로그램 시퀀스를 나타낸 도면이다.9 is a diagram showing a reprogram sequence on the personal computer side in a CAN communication device according to the present invention.

도 10은 본 발명에 따른 CAN 통신장치에서 리프로그램 대상 제어기측의 리프로그램 시퀀스를 나타낸 도면이다.10 is a diagram illustrating a reprogram sequence on the reprogram target controller side in a CAN communication device according to the present invention.

<도면의 주요부분에 대한 부호의 설명><Description of the symbols for the main parts of the drawings>

10: 제어기 20: 퍼스널 컴퓨터10: controller 20: personal computer

Claims (4)

퍼스널 컴퓨터, 상기 퍼스널 컴퓨터와 시리얼로 연결된 복수 개의 제어기에 대한 리프로그래밍 방법에 관한 것으로서, A personal computer, and a reprogramming method for a plurality of controllers connected in series with the personal computer, 퍼스널 컴퓨터가 제1 프로그램 대상 제어기로 부트로더 진입을 위한 초기화 프레임 및 리프로그래밍 어플리케이션 소프트웨어를 전송하는 제1 단계;A first step of the personal computer transmitting an initialization frame and reprogramming application software for entering the boot loader to the first program target controller; 상기 제1 프로그램 대상 제어기가 제2 프로그램 대상 제어기로 부트로더 진입을 위한 초기화 프레임 및 리프로그래밍 어플리케이션 소프트웨어를 전송하는 제2 단계;A second step of transmitting, by the first program target controller, an initialization frame and reprogramming application software for entering a boot loader to a second program target controller; 상기 제2 프로그램 대상 제어기가 제3 프로그램 대상 제어기로 부트로더 진입을 위한 초기화 프레임 및 리프로그래밍 어플리케이션 소프트웨어를 전송하는 제3 단계;A third step of transmitting, by the second program target controller, an initialization frame and reprogramming application software for entering a boot loader to a third program target controller; 상기 제3 프로그램 대상 제어기가 상기 퍼스널 컴퓨터로 부트로더 진입을 위한 초기화 프레임 및 리프로그래밍 어플리케이션 소프트웨어를 전송하는 제4 단계; 및Transmitting, by the third program target controller, the initialization frame and reprogramming application software for entering a boot loader to the personal computer; And 상기 퍼스널 컴퓨터가 상기 제3 프로그램 대상 제어기로부터 전송된 부트로더 진입을 위한 초기화 프레임 및 리프로그래밍 어플리케이션을 최초의 부트로더 진입을 위한 초기화 프레임 및 리프로그래밍 어플리케이션과 비교하여 일치하는 경우 리프로그래밍을 수행하도록 하는 제5 단계;를 포함하여 이루어진 것을 특징으로 하는 복수 개의 제어기에 대한 리프로그래밍 방법.The personal computer compares the initialization frame and reprogramming application for bootloader entry transmitted from the third program target controller with the initialization frame and reprogramming application for initial bootloader entry to perform reprogramming if matched. Reprogramming method for a plurality of controllers comprising the; 청구항 1에 있어서,The method according to claim 1, 상기 제 5 단계후에After the fifth step 퍼스널 컴퓨터가 제1 프로그램 대상 제어기로 리프로그래밍 데이터블록을 전송하는 제6 단계;A sixth step of sending, by the personal computer, the reprogramming data block to the first program target controller; 상기 제1 프로그램 대상 제어기가 제2 프로그램 대상 제어기로 리프로그래밍 데이터블록을 전송하는 제7 단계;A seventh step of sending, by the first program target controller, a reprogramming data block to a second program target controller; 상기 제2 프로그램 대상 제어기가 제3 프로그램 대상 제어기로 리프로그래밍 데이터블록을 전송하는 제8 단계;An eighth step of sending, by the second program target controller, a reprogramming data block to a third program target controller; 상기 제3 프로그램 대상 제어기가 상기 퍼스널 컴퓨터로 리프로그래밍 데이터블록을 전송하는 제9 단계; 및A ninth step of transmitting, by the third program target controller, the reprogramming data block to the personal computer; And 상기 퍼스널 컴퓨터가 상기 제3 프로그램 대상 제어기로부터 전송된 리프로그래밍 데이터블록을 최초의 리프로그램 데이터 블록과 비교하여 일치하는 경우 리프로그래밍을 완료하도록 하는 제10 단계;를 포함하여 이루어진 것을 특징으로 하는 복수 개의 제어기에 대한 리프로그래밍 방법.And a tenth step of comparing, by the personal computer, the reprogramming data block transmitted from the third program target controller with the first reprogramming data block to complete reprogramming if the personal computer matches. Reprogramming method for the controller. 청구항 1에 있어서,The method according to claim 1, 상기 퍼스널 컴퓨터는 상기 제 1 프로그램 대상 제어기와 CAN 1노드로 연결되고 상기 제3 프로그램 대상제어기와는 CAN 2노드를 통해 연결되어 독립적으로 데이터를 송수신하는 것을 특징으로 하는 복수 개의 제어기에 대한 리프로그래밍 방 법.The personal computer is connected to the first program target controller as a CAN 1 node, and the third program target controller is connected via a CAN 2 node to independently transmit and receive data. method. 청구항 1에 있어서,The method according to claim 1, 상기 제1 프로그램 대상 제어기 내지 제3 프로그램 대상 제어기는 각각 다른 프로그램 대상 제어기 또는 퍼스널 컴퓨터와 별도의 독립적인 노드를 통해 연결되어 데이터를 송수신하는 것을 특징으로 하는 복수 개의 제어기에 대한 리프로그래밍 방법.And the first program target controller to the third program target controller are connected to each other through a separate node independently from another program target controller or a personal computer to transmit / receive data.
KR1020090073687A 2009-08-11 2009-08-11 Reprogramming method of plural controllers KR101017977B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020090073687A KR101017977B1 (en) 2009-08-11 2009-08-11 Reprogramming method of plural controllers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020090073687A KR101017977B1 (en) 2009-08-11 2009-08-11 Reprogramming method of plural controllers

Publications (2)

Publication Number Publication Date
KR20110016139A true KR20110016139A (en) 2011-02-17
KR101017977B1 KR101017977B1 (en) 2011-03-02

Family

ID=43774613

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020090073687A KR101017977B1 (en) 2009-08-11 2009-08-11 Reprogramming method of plural controllers

Country Status (1)

Country Link
KR (1) KR101017977B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101438978B1 (en) * 2012-12-31 2014-09-11 현대자동차주식회사 Method and system for reprogramming

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100479640B1 (en) * 2003-04-23 2005-03-31 주식회사 케이디티 시스템즈 The base expansion of Programable Logic Controller by serial transmission and the operating method
JP4404625B2 (en) * 2003-12-25 2010-01-27 パナソニック株式会社 Information processing apparatus and ROM image generation apparatus for the apparatus
KR100996167B1 (en) * 2005-06-22 2010-11-24 주식회사 만도 method for programming memory of electronic control unit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101438978B1 (en) * 2012-12-31 2014-09-11 현대자동차주식회사 Method and system for reprogramming
US10033546B2 (en) 2012-12-31 2018-07-24 Hyundai Motor Company Method and system for reprogramming

Also Published As

Publication number Publication date
KR101017977B1 (en) 2011-03-02

Similar Documents

Publication Publication Date Title
US10409587B2 (en) Method for programming vehicle electronic control modules
CN104579719B (en) A kind of upgrade method and system, host computer and optical module of firmware
CN101145042B (en) On-vehicle electronic control device
US7991988B2 (en) Communication device and firmware update method thereof
EP3608775B1 (en) Electronic control system
CN107704285B (en) Multi-version configuration chip, system and method for field programmable gate array
CN102945173A (en) User program on-line upgrading system and method
KR20110076432A (en) System for upgrading multi-program by using can communication and method thereof
CN105468390B (en) BOOT online upgrading device and method
CN113778739B (en) System repair method, system, equipment and storage medium of all-in-one machine
CN102081526B (en) Basic input/output system architecture
US10936236B2 (en) Rewriting system, rewriting device and computer
KR101017977B1 (en) Reprogramming method of plural controllers
JP6217543B2 (en) Electronic control device and system for rewriting stored contents for electronic control device
CN100435099C (en) Method for upgrading program of embedded system
CN112799887A (en) Chip FT test system and test method
US20220147040A1 (en) Electronic Control Device and Method for Setting Control Data
CN108845823B (en) Software online upgrading method based on F2812 chip
US9026762B2 (en) Semiconductor system including a controller having reduced number of memory buffers for transmitting data to a plurality of memory chips
CN106775796B (en) Firmware upgrading method, device and system
KR20110039066A (en) Reprogramming method of plural controllers
JP4965909B2 (en) IC card
CN101436139A (en) FPGA downloading method and apparatus
CN110286935B (en) Dual-chip program updating device and method
CN110096047B (en) Robot motion control system upgrading method and system

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20140307

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20170213

Year of fee payment: 9