A kind of method and apparatus of ten thousand mbit ethernet of fast driving
Technical field
The present invention relates to a kind of method of ten thousand mbit ethernet of technical field of optical fiber communication more particularly to fast driving and set
It is standby.
Background technique
With the development of fiber optic communication, ten thousand mbit ethernet chips using more and more, simultaneously using several in an equipment
The case where a or more than ten of ten thousand mbit ethernet chips, occurs again and again.And the driving method of most of producers is each 10,000,000,000 now
The plug-in configuration chip-SPIROM of Ethernet chip, does so and undoubtedly considerably increases manufacturing cost to equipment, also increase
The size of equipment, also has a small number of producers in order to save cost certainly, without plug-in configuration chip, and MCU is used to take turns stream configuration
The mode of ten thousand mbit ethernets, the time for doing so one ten thousand mbit ethernet chip of configuration is assumed if being one minute, configures ten
Ten thousand mbit ethernet chips are exactly ten minutes, and the starting of equipment will take a lot of time in configuration, this requires the starting time
Equipment be obviously not all right, and a kind of inefficient configuration method.
Summary of the invention
The present invention and is proposed a kind of simple fast in the case where seeing that ten thousand mbit ethernet method of conventional arrangement has drawback
The method and apparatus of prompt ten thousand mbit ethernet of fast driving.The stability of the technical program and each of traditional ten thousand mbit ethernet cores
The stability of the plug-in configuration chip of piece is consistent.Advantage of the invention exists only in equipment the feelings for having multiple ten thousand mbit ethernets
Under condition, if only one ten thousand mbit ethernet, advantage are not obvious in equipment.
The present invention adopts the following technical scheme:
A kind of method of ten thousand mbit ethernet of fast driving, comprising:
Step S1, the pin of the external configuration chip of N number of ten thousand mbit ethernets chip is directly hanging;By N number of ten thousand mbit ethernet
The hardware address pin of chip pulls into different hardware address by the different low and high levels that MCU module controls;By N number of 10,000,000,000
The MII configuration pin of Ethernet chip is unified to draw onto the identical GPIO mouth of MCU module, and N number of ten thousand mbit ethernets chip
Reseting pin is then drawn onto the different GPIO mouths of MCU module;
Step S2, after device power starting, the reseting pin that MCU module passes through N number of ten thousand mbit ethernets chip first is first multiple
Ten thousand mbit ethernet chips of position, then by working condition register write 0 of the MII configuration pin to N number of ten thousand mbit ethernets chip, indicate
Into offline mode;
Step S3, MCU module issues what producer provided to the ten thousand mbit ethernet chips that address is 00 by MII configuration pin
Firmware is driven, ten thousand mbit ethernets chip N number of in this way can all receive driving firmware simultaneously;
Step S4, the check register for reading ten thousand mbit ethernet chips, reconfigures if check errors;If quite right
Then continue the working condition register of the N number of ten thousand mbit ethernets chip of poll, if ten thousand mbit ethernet chips are in operating mode shape
State, then it represents that ten thousand mbit ethernet chips are working properly, and driver is downloaded successfully;If ten thousand mbit ethernet chips are not places
In operational mode state, then MCU module re-issues configuration to the ten thousand mbit ethernet chips that address is 00.
Wherein, the reseting pin of the ten thousand mbit ethernets chip is RESET;
The MII configuration pin of the ten thousand mbit ethernets chip is MDC, MDIO;
The check register is crc register;
The pin of the external configuration chip of the ten thousand mbit ethernets chip is SPI_OUT, SPI_SCK, SPI_IN, SPI_
CSB;
The hardware address pin of the ten thousand mbit ethernets chip is PRTAD0-PRTAD4.
Wherein, the MII configuration pin unification of N number of ten thousand mbit ethernets chip is drawn onto the identical GPIO mouth of MCU module,
Specifically:
The MII configuration pin MDC unification of N number of ten thousand mbit ethernets chip is drawn onto a GPIO mouth of MCU module, by N
The MII configuration pin MDIO of a ten thousand mbit ethernets chip is unified to be drawn onto another GPIO mouth of MCU module.
Wherein, the check register for reading ten thousand mbit ethernet chips, reconfigures if check errors;Specifically:
The check register for reading ten thousand mbit ethernet chips, judges whether ten thousand mbit ethernet chips have received complete drive
Dynamic firmware, re-issues driving firmware if check errors.
A kind of equipment of the method using ten thousand mbit ethernet of fast driving described above, comprising: MCU module and N number of ten thousand
Mbit ethernet chip;
The pin of the external configuration chip of N number of ten thousand mbit ethernets chip is directly hanging;By the hard of N number of ten thousand mbit ethernets chip
Part address pins pull into different hardware address by the different low and high levels that MCU module controls;By N number of ten thousand mbit ethernets core
The MII configuration pin of piece is unified to draw onto the identical GPIO mouth of MCU module, and the reseting pin of N number of ten thousand mbit ethernets chip
Then draw onto the different GPIO mouths of MCU module;
Device power starting after, the reseting pin that MCU module passes through N number of ten thousand mbit ethernets chip first first reset 10,000,000,000 with
Too steel wire rack piece, then off line is indicated entry into the working condition register write 0 of N number of ten thousand mbit ethernets chip by MII configuration pin
Mode;
MCU module issues the driving that producer provides to the ten thousand mbit ethernet chips that address is 00 by MII configuration pin and consolidates
Part, ten thousand mbit ethernets chip N number of in this way can all receive driving firmware simultaneously;
The check register for reading ten thousand mbit ethernet chips, reconfigures if check errors;Continue if quite right
The working condition register of the N number of ten thousand mbit ethernets chip of poll, if ten thousand mbit ethernet chips are in operational mode state, table
Show that ten thousand mbit ethernet chips are working properly, driver is downloaded successfully;If ten thousand mbit ethernet chips are not in work
Mode state, then MCU module re-issues configuration to the ten thousand mbit ethernet chips that address is 00.
Wherein, the reseting pin of the ten thousand mbit ethernets chip is RESET;
The MII configuration pin of the ten thousand mbit ethernets chip is MDC, MDIO;
The check register is crc register;
The pin of the external configuration chip of the ten thousand mbit ethernets chip is SPI_OUT, SPI_SCK, SPI_IN, SPI_
CSB;
The hardware address pin of the ten thousand mbit ethernets chip is PRTAD0-PRTAD4.
Wherein, the MII configuration pin unification of N number of ten thousand mbit ethernets chip is drawn onto the identical GPIO mouth of MCU module,
Specifically:
The MII configuration pin MDC unification of N number of ten thousand mbit ethernets chip is drawn onto a GPIO mouth of MCU module, by N
The MII configuration pin MDIO of a ten thousand mbit ethernets chip is unified to be drawn onto another GPIO mouth of MCU module.
Wherein, the check register for reading ten thousand mbit ethernet chips, reconfigures if check errors;Specifically:
The check register for reading ten thousand mbit ethernet chips, judges whether ten thousand mbit ethernet chips have received complete drive
Dynamic firmware, re-issues driving firmware if check errors.
The utility model has the advantages that
The invention proposes a kind of method and apparatus of simple and fast ten thousand mbit ethernet of fast driving.The present invention saves outer
In the case that portion configures chip, while making all ten thousand mbit ethernets chip operations, greatly shortens the driving of ten thousand mbit ethernets
Time.The present invention changes one-to-one configuration mode between traditional single-chip microcontroller and ten thousand mbit ethernet chips, becomes MCU module still
Two pins of MDIO and MDC are only so needed, by public address, multiple ten thousand mbit ethernets chips is configured, also solves MCU module
The not enough problem of pin.Compared with the existing technology, the technical program can effectively reduce matching for ten thousand mbit ethernet chips of configuration
It sets the time, equipment starting is fast, and the less size of equipment cost and equipment, the stability of the technical program and traditional every
The stability of a plug-in configuration chip of ten thousand mbit ethernets chip is consistent.Advantage of the invention exist only in equipment have it is multiple
In the case where ten thousand mbit ethernets, if only one ten thousand mbit ethernet, advantage are not obvious in equipment.
Detailed description of the invention
Fig. 1 is a kind of method flow diagram of ten thousand mbit ethernet of fast driving provided by the invention.
Fig. 2 is a kind of apparatus structure schematic diagram of ten thousand mbit ethernet of fast driving provided by the invention.
Specific embodiment
The present invention will be described in further detail with reference to the accompanying drawings and embodiments.
Embodiment 1
Fig. 1 is a kind of method flow diagram of ten thousand mbit ethernet of fast driving provided by the invention.As shown in Figure 1, of the invention
A kind of method of ten thousand mbit ethernet of fast driving, comprising:
Step S1, the pin of the external configuration chip of N number of ten thousand mbit ethernets chip is directly hanging, configuration chip is not connect;By N
The hardware address pin of a ten thousand mbit ethernets chip by the different low and high levels that MCU module controls with pulling into different hardware
Location;The MII configuration pin unification of N number of ten thousand mbit ethernets chip is drawn onto the identical GPIO mouth of MCU module, and N number of 10,000,000,000
The reseting pin of Ethernet chip is then drawn onto the different GPIO of MCU module.
Step S2, after device power starting, the reseting pin that MCU module passes through N number of ten thousand mbit ethernets chip first is first multiple
Ten thousand mbit ethernet chips of position, then by working condition register write 0 of the MII configuration pin to N number of ten thousand mbit ethernets chip, indicate
Into offline mode.
Step S3, and then MCU module issues producer to the ten thousand mbit ethernet chips that address is 00 by MII configuration pin and mentions
The driving firmware of confession, this process are exactly the configuration deposit that will drive firmware that ten thousand mbit ethernet chips are written in the form of byte
Device, ten thousand mbit ethernets chip N number of in this way can all receive driving firmware simultaneously.It should be noted that ten thousand mbit ethernet chips into
After entering offline mode, the data for writing the ten thousand mbit ethernet chips that address is 00 can be received, because of each ten thousand mbit ethernets core
The GPIO that the configuration pin of piece is connected to MCU module is identical, so under the ten thousand mbit ethernet chips that MCU module is 00 to address
When hair driving firmware, N number of ten thousand mbit ethernets chip can receive driving firmware simultaneously.
Etc. step S4, after driving firmware writes, the check register of ten thousand mbit ethernet chips is first read, if check errors
It then reconfigures, continues the working condition register of the N number of ten thousand mbit ethernets chip of poll if quite right, if ten thousand mbit ethernets
In operational mode state, then it represents that ten thousand mbit ethernet chips are working properly, and driver is downloaded successfully, if 10,000,000,000 with
Too steel wire rack piece is not in operational mode state, then MCU module re-issues configuration to the ten thousand mbit ethernet chips that address is 00.
In the present solution, the reseting pin of the ten thousand mbit ethernets chip is RESET;
The MII configuration pin of the ten thousand mbit ethernets chip is MDC, MDIO;
The check register is crc register;
The pin of the external configuration chip of the ten thousand mbit ethernets chip is SPI_OUT, SPI_SCK, SPI_IN, SPI_
CSB;
The hardware address pin of the ten thousand mbit ethernets chip is PRTAD0-PRTAD4.
The MII configuration pin of the ten thousand mbit ethernets chip includes MDC and MDIO, then, it will be N number of described in step S1
The MII configuration pin of ten thousand mbit ethernet chips is unified to draw onto the identical GPIO mouth of MCU module, specifically:
The MII configuration pin MDC unification of N number of ten thousand mbit ethernets chip is drawn onto a GPIO mouth of MCU module, by N
The MII configuration pin MDIO of a ten thousand mbit ethernets chip is unified to be drawn onto another GPIO mouth of MCU module.
The check register of ten thousand mbit ethernet chips of reading described in the step S4, matches again if check errors
It sets;Specifically:
The check register for reading ten thousand mbit ethernet chips, judges whether ten thousand mbit ethernet chips have received complete drive
Dynamic firmware, driving firmware is re-issued if check errors, all ten thousand mbit ethernets chips is equivalent to and reconfigures again one time.
In conclusion in the case that the present invention saves exterior arrangement chip, while making all ten thousand mbit ethernets chip operations
Get up, greatly shortens the driving time of ten thousand mbit ethernets.The present invention changes between traditional single-chip microcontroller and ten thousand mbit ethernet chips
One-to-one configuration mode becomes MCU module and still only needs two pins of MDIO and MDC, by public address, configures multiple
Ten thousand mbit ethernet chips also solve the problems, such as that MCU module pin is not enough.
Embodiment 2
The embodiment of the present invention 1 and embodiment 2 belong to same technical concept, in example 2 the content of not detailed description,
Refer to embodiment 1.
Fig. 2 is a kind of apparatus structure schematic diagram of ten thousand mbit ethernet of fast driving provided by the invention.As shown in Fig. 2, this
A kind of equipment of invention method using ten thousand mbit ethernet of fast driving described above, comprising: MCU module and N number of
Ten thousand mbit ethernet chips;It should be noted that depending on functions of the equipments, the present invention does not want other hardware modules in equipment
It asks.It should be noted that PHY represents ten thousand mbit ethernet chips in Fig. 2.
The pin of the external configuration chip of N number of ten thousand mbit ethernets chip is directly hanging;By the hard of N number of ten thousand mbit ethernets chip
Part address pins pull into different hardware address by the different low and high levels that MCU module controls;By N number of ten thousand mbit ethernets core
The MII configuration pin of piece is unified to draw onto the identical GPIO mouth of MCU module, and the reseting pin of N number of ten thousand mbit ethernets chip
Then draw onto the different GPIO mouths of MCU module;
Device power starting after, the reseting pin that MCU module passes through N number of ten thousand mbit ethernets chip first first reset 10,000,000,000 with
Too steel wire rack piece, then off line is indicated entry into the working condition register write 0 of N number of ten thousand mbit ethernets chip by MII configuration pin
Mode;
MCU module issues the driving that producer provides to the ten thousand mbit ethernet chips that address is 00 by MII configuration pin and consolidates
Part, ten thousand mbit ethernets chip N number of in this way can all receive driving firmware simultaneously;
The check register for reading ten thousand mbit ethernet chips, reconfigures if check errors;Continue if quite right
The working condition register of the N number of ten thousand mbit ethernets chip of poll, if ten thousand mbit ethernet chips are in operational mode state, table
Show that ten thousand mbit ethernet chips are working properly, driver is downloaded successfully;If ten thousand mbit ethernet chips are not in work
Mode state, then MCU module re-issues configuration to the ten thousand mbit ethernet chips that address is 00.
In the present solution, the reseting pin of the ten thousand mbit ethernets chip is RESET;
The MII configuration pin of the ten thousand mbit ethernets chip is MDC, MDIO;
The check register is crc register;
The pin of the external configuration chip of the ten thousand mbit ethernets chip is SPI_OUT, SPI_SCK, SPI_IN, SPI_
CSB;
The hardware address pin of the ten thousand mbit ethernets chip is PRTAD0-PRTAD4.
The MII configuration pin of the ten thousand mbit ethernets chip includes MDC and MDIO, then, it will be N number of described in step S1
The MII configuration pin of ten thousand mbit ethernet chips is unified to draw onto the identical GPIO mouth of MCU module, specifically:
The MII configuration pin MDC unification of N number of ten thousand mbit ethernets chip is drawn onto a GPIO mouth of MCU module, by N
The MII configuration pin MDIO of a ten thousand mbit ethernets chip is unified to be drawn onto another GPIO mouth of MCU module.
The check register of ten thousand mbit ethernet chips of reading described in the step S4, matches again if check errors
It sets;Specifically:
The check register for reading ten thousand mbit ethernet chips, judges whether ten thousand mbit ethernet chips have received complete drive
Dynamic firmware, driving firmware is re-issued if check errors, all ten thousand mbit ethernets chips is equivalent to and reconfigures again one time.
In conclusion in the case that the present invention saves exterior arrangement chip, while making all ten thousand mbit ethernets chip operations
Get up, greatly shortens the driving time of ten thousand mbit ethernets.The present invention changes between traditional single-chip microcontroller and ten thousand mbit ethernet chips
One-to-one configuration mode becomes MCU module and still only needs two pins of MDIO and MDC, by public address, configures multiple
Ten thousand mbit ethernet chips also solve the problems, such as that MCU module pin is not enough.
The method that quickly simultaneously cost declining drives ten thousand mbit ethernets of one kind provided by embodiment of the present invention is carried out above
It is discussed in detail, the explanation of embodiment of above is merely used to help understand method and its core concept of the invention;Meanwhile it is right
In those of ordinary skill in the art, according to the thought of the present invention, change is had in specific embodiments and applications
Place, in conclusion the contents of this specification are not to be construed as limiting the invention.