CN105550005A - Debugging and upgrading method through USB port - Google Patents

Debugging and upgrading method through USB port Download PDF

Info

Publication number
CN105550005A
CN105550005A CN201610054204.2A CN201610054204A CN105550005A CN 105550005 A CN105550005 A CN 105550005A CN 201610054204 A CN201610054204 A CN 201610054204A CN 105550005 A CN105550005 A CN 105550005A
Authority
CN
China
Prior art keywords
debugging
usb
upgrading
target device
rompaq
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610054204.2A
Other languages
Chinese (zh)
Other versions
CN105550005B (en
Inventor
王春华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NANJING YIHUO TECHNOLOGY Co Ltd
Original Assignee
NANJING YIHUO TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NANJING YIHUO TECHNOLOGY Co Ltd filed Critical NANJING YIHUO TECHNOLOGY Co Ltd
Priority to CN201610054204.2A priority Critical patent/CN105550005B/en
Publication of CN105550005A publication Critical patent/CN105550005A/en
Application granted granted Critical
Publication of CN105550005B publication Critical patent/CN105550005B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • 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/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • 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
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]

Landscapes

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

Abstract

The invention discloses a debugging and upgrading method through a USB port. The method comprises following steps: starting a debugging and upgrading platform by a user, starting the USB-Host function unit in the debugging and upgrading platform, operating an ISP debugging and upgrading program; connecting a target device with the debugging and upgrading platform through a USB connecting device, after the target device is electrified, operating a guide debugging and upgrading program, starting a USB-Device communication function, not starting the internal upward pull of the target device; wherein the USB-Host function unit in the debugging and upgrading platform monitors the connecting action of the target device according to the triggering signals provided by the upward pull resistor in the USB connecting device, informing the ISP debugging and upgrading program, sending a debugging and upgrading command packet to the target device by the ISP debugging and upgrading program; after receiving the debugging and upgrading command packet by the target device, entering a debugging and upgrading mode. When a user needs to debug and upgrade, the method can be used; the target device only reserving an embedded system USB interface can be conveniently debugged and upgraded through the method.

Description

A kind of being undertaken by USB port debugs the method for upgrading
technical field:
The present invention relates to a kind of method of carrying out debugging upgrading by USB port.
background technology:
Along with electronic information technology develop rapidly, embedded system application is ubiquitous, is not recurrent, is but absolutely necessary to the renewal of embedded system, upgrading.Embedded system inside guides debugging ROMPaq (BootLoader) mainly in order to realize the function such as remote upgrade, renewal of embedded system, guide debugging ROMPaq (BootLoader) first to run after embedded system powers on, it judges whether to carry out debugging upgrading according to some specific trigger conditions.Under normal circumstances, the triggering mode of embedded systems debugging upgrading comprises: one, by additional physical detection mode, as button, jumps and emits; Two, in limiting time, self-defining packet is monitored by certain interface (USB interface, serial ports etc.).
For mode one, producer may need the embedded systems debugging upgrade interface reserved in Embedded System Product external packing for receiving physics trigger pip, but this may affect the overall appearance of Embedded System Product and cause hardware cost to waste; If do not reserve this interface in Embedded System Product external packing, then need to product tear machine open to carry out debugging upgrading, this concerning user use very not convenient.
For mode two, if the target device of band USB interface is connected with computing machine, first guiding debugging ROMPaq (BootLoader) run in target device can simulate a USB device, namely a USB device is ejected on computers, for the user not needing to carry out debugging upgrading, this USB device does not wish to occur.Such as: target device is a USB flash disk, when this USB flash disk is connected with computing machine, then first can eject a self-defining USB device on computers, or the USB device (UnknownDevice) that ejection one is unknown, and then there is a USB flash disk equipment, this have impact on the use not needing to carry out the user debugging upgrading.
In sum, provide a kind of by USB port carry out debug upgrading method become a urgent problem.
summary of the invention:
The object of the invention is for above-mentioned Problems existing, a kind of method of carrying out debugging upgrading by USB port is provided.Its object is to, when user needs to carry out debugging upgrading, use the USB coupling arrangement in this method to connect, also conveniently can complete its debugging updating operation to the target device only reserving embedded system USB interface, and maintain target device overall appearance and save hardware cost.In most cases, user does not need to carry out debugging upgrading, uses generic USB line to connect, there is not the phenomenon of appearance twice USB device.
The present invention is achieved by the following technical solutions:
Carry out a method of debugging upgrading by USB port, described method comprises: user opens debugging upgrading platform, enables USB-Host functional unit in debugging upgrading platform, runs ISP and debug ROMPaq, and now debugging upgrading platform is in AM automatic monitoring pattern; Target device is connected by USB coupling arrangement and debugging platform of upgrading, described USB coupling arrangement comprises the pull-up resistor for providing connecting moves signal to debugging upgrading platform, run after target device powers on and guide debugging ROMPaq (BootLoader), enable USB-Device communication function, do not enable the inner pull-up of target device; In debugging upgrading platform, USB-Host functional unit listens to target device connecting moves by the trigger pip that pull-up resistor in USB coupling arrangement provides, and notice ISP debugs ROMPaq, and ISP debugs ROMPaq and sends debugging upgrade command bag to target device; Target device enters debugging upgrade mode after receiving debugging upgrade command bag.
Described a kind of being undertaken by USB port debugs the method for upgrading, and described USB coupling arrangement adopts USB connecting line or USB connector, and described USB connecting line or USB connector comprise the pull-up resistor for providing connecting moves signal to debugging upgrading platform.
Described a kind of being undertaken by USB port debugs the method for upgrading, and platform comprises USB-Host communication function unit, ISP debugs ROMPaq in described debugging upgrading;
Described USB-Host functional unit, for monitoring USB device connecting moves, communicates with target device;
Described ISP debugs ROMPaq and is used for communicating with guiding debugging ROMPaq (BootLoader) of target device, sends debugging upgrade command bag.
Described a kind of being undertaken by USB port debugs the method for upgrading, and described target device comprises USB-Device functional unit, guides debugging ROMPaq (BootLoader), user program (Applicationcode);
Described USB-Device functional unit is used for upgrading with debugging Platform communication;
Described guiding debugging ROMPaq (BootLoader) carries out debugging upgrading for guiding target equipment, is the first program run after powering on;
Described user program (Applicationcode) is the target program that user will run.When after escape leading debugging ROMPaq, then can run user program.If user does not carry out debugging upgrading, adopt generic USB line to connect, target device does not receive debugging upgrade command bag within a certain period of time, then can debug ROMPaq, run user program by overtime escape leading.
Beneficial effect:
A kind of being undertaken by USB port provided by the invention debugs the method for upgrading, when user needs to carry out debugging upgrading, the USB coupling arrangement in this method is used to connect, also conveniently can complete its debugging updating operation to the target device only reserving embedded system USB interface, and maintain target device overall appearance and save hardware cost.In most cases, user does not need to carry out debugging upgrading, uses generic USB line to connect, there is not the phenomenon of appearance twice USB device.
embodiment:
Below the specific embodiment of the present invention is described in detail.According to following description and in conjunction with claims, advantages and features of the invention will be clearer.
In the present embodiment, a kind of being undertaken by USB port debugs the method for upgrading, and said method comprising the steps of:
User opens debugging upgrading platform, enables USB-Host functional unit in debugging upgrading platform, runs ISP and debug ROMPaq, and now debugging upgrading platform is in AM automatic monitoring pattern.Debugging upgrading platform can be on computing machine, mobile phone; Target device is connected by external USB coupling arrangement and debugging platform of upgrading, described USB coupling arrangement comprises the pull-up resistor for providing connecting moves signal to debugging upgrading platform, run after target device powers on and guide debugging ROMPaq (BootLoader), enable USB-Device communication function, do not enable the inner pull-up of target device; In debugging upgrading platform, USB-Host functional unit listens to target device connecting moves by the trigger pip that pull-up resistor in USB coupling arrangement provides, and notice ISP debugs ROMPaq, and ISP debugs ROMPaq and sends debugging upgrade command bag to target device; Target device enters debugging upgrade mode after receiving debugging upgrade command bag.
In the present embodiment, a kind of being undertaken by USB port debugs the method for upgrading, described USB coupling arrangement adopts USB connecting line or USB connector, and described USB connecting line or USB connector comprise the pull-up resistor for providing connecting moves signal to debugging upgrading platform.According to usb protocol, the upstream port of USB device end is furnished with the pull-up resistor of a 1.5kohm, if be connected on D+, being high speed or full-speed device, if be connected on D-, is low-speed device.USB-Host port is exactly carried out the connection of judgment device by the level of two data lines in detection physical cord and removed, and the type of equipment.
In the present embodiment, a kind of being undertaken by USB port debugs the method for upgrading, and platform comprises USB-Host functional unit, ISP debugs ROMPaq in described debugging upgrading; Described USB-Host functional unit is for monitoring USB device connecting moves, when there is no equipment connection, USB-Host port D+ and D-line are all low levels, and when there being USB-Device equipment connection, D+ and D-has one to become the stage of high level state transit time through one.If high speed or full-speed device, then D+ is driven high, and D-is constant; Low-speed device then in contrast.USB-Host detects this signal, can judge there is equipment connection, and the type of this equipment, then communicates with target device; When equipment removes, D+ or D-has one to become the stage of low level state transit time through one.Described ISP debugs ROMPaq and is used for communicating with guiding debugging ROMPaq (BootLoader) of target device, sends debugging upgrade command bag.
In the present embodiment, a kind of being undertaken by USB port debugs the method for upgrading, and described target device comprises USB-Device functional unit, guides debugging ROMPaq (BootLoader), user program (Applicationcode); Described USB-Device functional unit is used for upgrading with debugging Platform communication; Described guiding debugging ROMPaq (BootLoader) carries out debugging upgrading for guiding target equipment, is the first program run after powering on.Debugging ROMPaq (BootLoader) is guided to be the first paragraph code that embedded system performs after power, judge whether to enter debugging upgrade mode according to specific condition, if enter debugging upgrade mode, then receive the data that transmit of USB interface for upgrading user program (Applicationcode); If do not enter debugging upgrade mode, then escape leading debugging ROMPaq run user program (Applicationcode).Described user program is the target program that user will run.When after escape leading debugging ROMPaq, then can run user program.If user does not carry out debugging upgrading, adopt generic USB line to connect, target device does not receive debugging upgrade command bag within a certain period of time, then can debug ROMPaq, run user program by overtime escape leading.
The above is only preferred embodiment of the present invention, not any pro forma restriction is done to the present invention, although the present invention discloses as above with preferred embodiment, but and be not used to limit the present invention, any those skilled in the art, not departing from the scope of technical solution of the present invention, make a little change when the technology contents of above-mentioned announcement can be utilized or be modified to the Equivalent embodiments of equivalent variations, in every case be the content not departing from technical solution of the present invention, according to any simple modification that technical spirit of the present invention is done above embodiment, equivalent variations and modification, all still belong in the scope of technical solution of the present invention.

Claims (4)

1. one kind is carried out the method for debugging upgrading by USB port, it is characterized in that, described method comprises: user opens debugging upgrading platform, enables USB-Host functional unit in debugging upgrading platform, run ISP and debug ROMPaq, now debugging upgrading platform is in AM automatic monitoring pattern; Target device is connected by USB coupling arrangement and debugging platform of upgrading, described USB coupling arrangement comprises the pull-up resistor for providing connecting moves signal to debugging upgrading platform, run after target device powers on and guide debugging ROMPaq, enable USB-Device communication function, do not enable the inner pull-up of target device; In debugging upgrading platform, USB-Host functional unit listens to target device connecting moves by the trigger pip that pull-up resistor in USB coupling arrangement provides, and notice ISP debugs ROMPaq, and ISP debugs ROMPaq and sends debugging upgrade command bag to target device; Target device enters debugging upgrade mode after receiving debugging upgrade command bag.
2. a kind of being undertaken by USB port debugs the method for upgrading as claimed in claim 1, it is characterized in that: described USB coupling arrangement adopts USB connecting line or USB connector, described USB connecting line or USB connector comprise the pull-up resistor for providing connecting moves signal to debugging upgrading platform.
3. a kind of being undertaken by USB port debugs the method for upgrading as claimed in claim 1, it is characterized in that: platform comprises USB-Host functional unit, ISP debugs ROMPaq in described debugging upgrading;
Described USB-Host functional unit, for monitoring USB device connecting moves, communicates with target device;
Described ISP debugs ROMPaq and is used for communicating with the guiding ROMPaq of target device, sends debugging upgrade command bag.
4. a kind of being undertaken by USB port debugs the method for upgrading as claimed in claim 1, it is characterized in that:
Described target device comprises USB-Device functional unit, guides debugging ROMPaq, user program;
Described USB-Device functional unit is used for upgrading with debugging Platform communication;
Described guiding debugging ROMPaq is used for guiding target equipment and carries out debugging upgrading, is the first program run after powering on;
Described user program is the target program that user will run, when after escape leading debugging ROMPaq, then and can run user program.
CN201610054204.2A 2016-01-27 2016-01-27 Method for debugging and upgrading through USB port Active CN105550005B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610054204.2A CN105550005B (en) 2016-01-27 2016-01-27 Method for debugging and upgrading through USB port

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610054204.2A CN105550005B (en) 2016-01-27 2016-01-27 Method for debugging and upgrading through USB port

Publications (2)

Publication Number Publication Date
CN105550005A true CN105550005A (en) 2016-05-04
CN105550005B CN105550005B (en) 2022-05-03

Family

ID=55829203

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610054204.2A Active CN105550005B (en) 2016-01-27 2016-01-27 Method for debugging and upgrading through USB port

Country Status (1)

Country Link
CN (1) CN105550005B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106406967A (en) * 2016-11-15 2017-02-15 恒鸿达信息技术有限公司 STM32-based USB online upgrade method and system
CN106843037A (en) * 2016-12-30 2017-06-13 硅谷数模半导体(北京)有限公司 The upgrade method and system of single-chip microcomputer
CN107885650A (en) * 2016-09-30 2018-04-06 联芯科技有限公司 A kind of program debugging method and system
CN111240965A (en) * 2020-01-03 2020-06-05 珠海亿智电子科技有限公司 ISP real-time debugging method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070006035A1 (en) * 2003-08-28 2007-01-04 Kazou Usui Microcomputer and method for developing system program
CN101963910A (en) * 2010-09-21 2011-02-02 深圳市元征软件开发有限公司 General USB (Universal Serial Bus) based equipment firmware updating method
CN102169442A (en) * 2011-03-24 2011-08-31 杭州华三通信技术有限公司 Method, equipment, device and system for performing system boot by using USB (universal serial bus) device
CN103309711A (en) * 2013-06-18 2013-09-18 天津七一二通信广播有限公司 Bootstrap loader circuit based on USB interface

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070006035A1 (en) * 2003-08-28 2007-01-04 Kazou Usui Microcomputer and method for developing system program
CN101963910A (en) * 2010-09-21 2011-02-02 深圳市元征软件开发有限公司 General USB (Universal Serial Bus) based equipment firmware updating method
CN102169442A (en) * 2011-03-24 2011-08-31 杭州华三通信技术有限公司 Method, equipment, device and system for performing system boot by using USB (universal serial bus) device
CN103309711A (en) * 2013-06-18 2013-09-18 天津七一二通信广播有限公司 Bootstrap loader circuit based on USB interface

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885650A (en) * 2016-09-30 2018-04-06 联芯科技有限公司 A kind of program debugging method and system
CN106406967A (en) * 2016-11-15 2017-02-15 恒鸿达信息技术有限公司 STM32-based USB online upgrade method and system
CN106843037A (en) * 2016-12-30 2017-06-13 硅谷数模半导体(北京)有限公司 The upgrade method and system of single-chip microcomputer
CN106843037B (en) * 2016-12-30 2019-04-12 硅谷数模半导体(北京)有限公司 The upgrade method and system of single-chip microcontroller
CN111240965A (en) * 2020-01-03 2020-06-05 珠海亿智电子科技有限公司 ISP real-time debugging method and system

Also Published As

Publication number Publication date
CN105550005B (en) 2022-05-03

Similar Documents

Publication Publication Date Title
CN105550005A (en) Debugging and upgrading method through USB port
CN103064489B (en) A kind of method and terminal of carrying out internal circuit selection according to USB interface state
US20120290761A1 (en) USB Converter and Related Method
US9785585B2 (en) Method for card reader to communicate with upper computer via USB channel communication and Bluetooth channel connection
CN101526930A (en) USB interface master-slave machine detection device and detection method
CN102387022A (en) Power over Ethernet method and device
EP2791807A1 (en) Automatic downstream to upstream mode switching at a universal serial bus physical layer
CN106786960B (en) Charge control method, device and terminal
CN107077188A (en) Interconnection wakes up response circuit and method
CN108475227A (en) Test functional component and data debugging method
CN106774790B (en) Head-mounted display equipment and power management method and device thereof
CN106294057B (en) A kind of detection method, device and the terminal of network interface insertion
CN112290985B (en) Bluetooth antenna determination method and device in vehicle-mounted intelligent device and Bluetooth system
CN105677596B (en) Control method and electronic equipment
US9397752B2 (en) Optical transceiver modules, optical transmission devices, and optical transmission methods
TW201945951A (en) Automatic USB host detection and port configuration
CN112799985A (en) USB interface control method, USB control circuit and intelligent networking equipment mainboard
JP6508912B2 (en) Storage system, storage apparatus, and non-signal analysis method of storage system
WO2015013423A1 (en) Using usb signaling on a usb host to trigger a usb device to enter a mode of operation
CN101339542A (en) Data transmission device, control circuit chip and operation mode control method
CN111726563A (en) Video storage device for train video monitoring system
CN202267962U (en) Bus interface circuit and electronic device
CN112526898B (en) Serial port line plug detection circuit and embedded equipment
US20140115378A1 (en) System and method for restoring network configuration parameters
CN102841877B (en) Detecting method and automatic detecting circuit of working mode

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: No. 18 Ningshuang Road, Yuhuatai District, Nanjing City, Jiangsu Province, 210012

Applicant after: Nanjing qinheng Microelectronics Co.,Ltd.

Address before: No. 18 Ningshuang Road, Yuhuatai District, Nanjing City, Jiangsu Province, 210012

Applicant before: NANJING YI HUO TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant