CN111240725A - DSP firmware loading circuit and method and optical module - Google Patents
DSP firmware loading circuit and method and optical module Download PDFInfo
- Publication number
- CN111240725A CN111240725A CN202010213273.XA CN202010213273A CN111240725A CN 111240725 A CN111240725 A CN 111240725A CN 202010213273 A CN202010213273 A CN 202010213273A CN 111240725 A CN111240725 A CN 111240725A
- Authority
- CN
- China
- Prior art keywords
- dsp
- mcu
- firmware
- interface
- loading
- 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.)
- Pending
Links
- 238000011068 loading method Methods 0.000 title claims abstract description 53
- 230000003287 optical effect Effects 0.000 title claims abstract description 18
- 238000000034 method Methods 0.000 title abstract description 18
- 238000003860 storage Methods 0.000 claims description 26
- 238000006243 chemical reaction Methods 0.000 claims description 4
- 238000004891 communication Methods 0.000 abstract description 7
- 230000002093 peripheral effect Effects 0.000 abstract description 5
- 230000017525 heat dissipation Effects 0.000 abstract description 4
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 235000015429 Mirabilis expansa Nutrition 0.000 description 1
- 244000294411 Mirabilis expansa Species 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 235000013536 miso Nutrition 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000008054 signal transmission Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/654—Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
- G06F8/63—Image based installation; Cloning; Build to order
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The invention relates to the technical field of optical communication, and discloses a DSP firmware loading circuit and method and an optical module. The DSP firmware loading method comprises the following steps: after the equipment is powered on, the MCU controls the DSP unit to enter a non-working mode through the GPIO interface and then initializes the DSP unit; the MCU controls the DSP unit to enter a working mode through the GPIO interface; the DSP unit sends a loading control instruction to the MCU through the SPI interface; and after receiving the loading control instruction, the MCU sends the DSP firmware to the DSP unit through the SPI to realize the loading of the DSP firmware. According to the embodiment of the invention, the DSP firmware is stored in the memory of the MCU, and the MCU can directly control the DSP unit to realize the loading of the DSP firmware, so that the use of an externally-hung EEPROM chip and a peripheral circuit is reduced, the realization cost is reduced, the assembly space is greatly saved, the heat dissipation of a product is facilitated, and the stability of the product performance is ensured.
Description
Technical Field
The invention relates to the technical field of optical communication, in particular to a DSP firmware loading circuit and method and an optical module.
Background
PAM4 is one of PAM (Pulse Amplitude Modulation) Modulation techniques. The PAM signal is a hot signal transmission technique following NRZ (Non-Return-to-Zero), and is also a representative of a multi-order modulation technique, and can effectively improve bandwidth utilization efficiency, and is currently widely used in the field of high-speed signal interconnection. The NRZ signal adopts high and low signal levels to represent 1 and 0 of a digital logic signal, and 1bit of logic information can be transmitted in each clock cycle. The PAM4 signal is signaled using 4 different signal levels, which can transmit 2 bits of logic information, i.e., 00, 01, 10, 11, per clock cycle. Therefore, under the condition of the same baud rate, the bit rate of the PAM4 signal is 2 times that of the NRZ signal, the transmission efficiency is improved by one time, and meanwhile, the cost can be effectively reduced.
The existing PAM4 optical module mainly adopts the following two methods to load DSP firmware:
the method 1 comprises the steps of adopting an externally-connected EEPROM chip for storing a firmware program of the DSP, burning the DSP firmware into the EEPROM chip through a burner before the EEPROM chip is pasted with a chip, and loading the firmware of the EEPROM by controlling the DSP when the MCU is powered on and started every time.
And 2, adopting an externally-connected EEPROM chip to store the firmware program of the DSP, firstly burning the program of the MCU after the module is manufactured, then burning the DSP firmware into the EEPROM chip by the MCU through a control command, and subsequently loading the firmware of the EEPROM by controlling the DSP when the MCU is powered on and started every time.
However, both of these loading methods have the following drawbacks:
(1) in any mode, an EEPROM chip needs to be externally hung, a peripheral circuit needs to be added, the cost is high, a large assembly space is occupied, and PCB layout and heat dissipation are not facilitated.
Particularly, the SFP56 PAM4 optical module has very limited board subspace, a plug-in EEPROM chip is basically not required to be placed, and the stability of the optical module is greatly influenced.
(2) In order to complete firmware loading, a burner or a professional programmer is required to be used for burning a program for 2 times, a DSP is required for one time, and an MCU is required for one time, so that not only is the operation complicated, but also the burner or the professional programmer is expensive and difficult to operate, and even the optical module is damaged if the operation is not standard.
Disclosure of Invention
The invention aims to provide a DSP firmware loading circuit and method and an optical module, and solves the problems of high cost, complex operation and influence on the performance of the optical module in the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme:
a DSP firmware loading circuit comprises an MCU and a DSP unit;
the MCU comprises a memory; the memory comprises a DSP firmware storage area for storing a DSP firmware program, an MCU firmware storage area for storing MCU firmware and a Bootloader program storage area for storing a Bootloader control program;
the MCU and the DSP unit respectively comprise a GPIO interface, an SMI interface and an SPI interface; the MCU is connected with the DSP through the GPIO interface, the SMI interface and the SPI interface respectively;
when the GPIO interface outputs a low level, the SPI interface of the DSP unit is in a high-resistance state for outputting; and when the GPIO interface outputs a high level, the MCU loads DSP firmware to the DSP unit through the SPI interface.
Optionally, the SMI interface of the MCU and the SMI interface of the DSP unit are connected via a two-wire power conversion chip.
Optionally, the storage space of the memory is 256K bytes; the DSP firmware storage area is 128K byte, the MCU firmware storage area is 127K byte, and the Bootloader program storage area is 1K byte.
Optionally, the SPI interface includes: the chip selection device comprises a main device data input interface, a main device data output interface, a clock interface and a chip selection interface.
A DSP firmware loading method applied to the DSP firmware loading circuit as described above, comprising the steps of:
after the equipment is powered on, the MCU controls the DSP unit to enter a non-working mode through the GPIO interface and then initializes the DSP unit;
after the initialization is finished, the MCU controls the DSP unit to enter a working mode through the GPIO interface;
after entering a working mode, the DSP unit sends a loading control instruction to the MCU through the SPI interface;
and after receiving the loading control instruction, the MCU sends the DSP firmware stored in the MCU to the DSP unit through the SPI to realize DSP firmware loading.
Optionally, the method further includes: and after the DSP firmware is loaded, the MCU stops communicating with the SPI of the DSP unit and carries out initialization configuration on the DSP unit through an SMI interface.
Optionally, the method further includes: and when a DSP firmware upgrading instruction is received, the MCU updates the DSP firmware in the storage area through a Bootloader control program.
Optionally, the method further includes: and when receiving the DSP firmware upgrading instruction and the MCU firmware upgrading instruction at home, the MCU updates the DSP firmware and the MCU firmware in the storage area simultaneously through the Bootloader control program.
An optical module comprising a DSP firmware loading circuit as described in any one of the above.
A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the DSP firmware loading method as described in any one of the above.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
different from the mode of adopting an external EEPROM chip, the embodiment of the invention stores the DSP firmware in the memory of the MCU, and the MCU can directly control the DSP unit to realize the loading of the DSP firmware, thereby not only reducing the use of the external EEPROM chip and peripheral circuits, reducing the realization cost, but also greatly saving the assembly space, being beneficial to the heat dissipation of products and ensuring the stability of the product performance.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a schematic diagram of a DSP firmware loading circuit according to an embodiment of the present invention;
fig. 2 is a schematic diagram of distribution of an MCU internal program in flash according to an embodiment of the present invention;
fig. 3 is a flowchart of a DSP firmware loading method according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the embodiments of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments of the present invention without any creative efforts shall fall within the protection scope of the embodiments of the present invention.
The terms "comprises" and "comprising," and any variations thereof, in the description and claims of embodiments of the present invention and the above-described drawings, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Referring to fig. 1, an embodiment of the present invention provides a DSP firmware loading circuit, which includes an MCU (micro controller Unit) and a DSP (digital signal processing) Unit.
MCU and DSP unit all include: a GPIO (general-purpose input/output) Interface, an SMI (Serial Management Interface), and an SPI (Serial peripheral Interface).
The GPIO interface may be configured by software, in this embodiment the GPIO interface is configured as a control signal interface.
And the SMI interface comprises an MDC interface and an MDIO interface. The MDIO interface is a management interface of the DSP and is used for reading/writing a register of the DSP so as to control the behavior of the DSP or obtain the state of the DSP, and the MDC interface provides a clock for the MDIO.
The SPI interface adopts 4 line communications, includes: MISO (master data input) interface, MOSI (master data output) interface, SCLK (clock) interface, CS (chip select) interface.
The MCU is connected with the DSP unit through the GPIO interface, the SMI interface and the SPI interface respectively. The DSP is used as a Master (Master) end, the MCU is used as a Slave (Slave) end, and the MCU controls the DSP to work through the GPIO interface.
An MCU including a memory; as shown in fig. 2, the memory includes: the device comprises a DSP firmware storage area for storing a DSP firmware program, an MCU firmware storage area for storing MCU firmware and a Bootloader program storage area for storing a Bootloader control program.
For example, when the storage space of the selected memory is 256K bytes, the memory can be divided as follows: the DSP firmware storage area is 128K byte, the MCU firmware storage area is 127K byte, and the Bootloader program storage area is 1K byte. Of course, the size of each storage interval can be flexibly adjusted according to different storage types and different use requirements, and the invention is not limited.
In the DSP firmware loading circuit of this embodiment, when the GPIO interface outputs a low level, the SPI interface of the DSP unit is in a high impedance state output, and the MCU and the DSP unit cannot perform SPI communication; when GPIO interface output high level, the SPI interface of DSP unit is in low resistance state output, and MCU and DSP can carry out normal SPI communication, and MCU accessible SPI interface sends its inside DSP firmware of storage to the DSP unit realizes the loading of DSP firmware.
In addition, because the typical voltage of DSP unit work is 1.8V, and MCU is 3.3V, in this embodiment between MCU's SPI interface and the SPI interface of DSP unit, through the two-wire power conversion chip connection to realize voltage conversion and handle, guarantee DSP unit and MCU both's normal operating.
The embodiment further provides a DSP firmware loading method, which is applied to the DSP firmware loading circuit, and specifically includes:
In this step, MCU control GPIO interface output low level can let the DSP unit enter non-operating mode, and four lines of SPI of DSP are in high impedance state output this moment, do not communicate between DSP unit and the MCU like this.
And 102, after the initialization is finished, the MCU controls the DSP unit to enter a working mode through the GPIO interface.
The MCU controls the GPIO interface to output high level, so that the DSP unit can enter a working mode.
And 103, after the working mode is entered, the DSP unit sends a loading control instruction to the MCU through the SPI interface.
And step 104, after receiving the loading control instruction, the MCU sends the DSP firmware stored in the MCU to the DSP unit through the SPI to realize DSP firmware loading.
Specifically, after receiving the loading control instruction, the MCU continuously sends the DSP firmware program to the DSP unit through the SPI communication source by interrupting the service program through the SPI; and after the MCU finishes sending, the MCU closes the interrupt service program and stops the SPI communication.
And 105, the MCU initializes and configures the DSP unit through the SMI interface so that all functions of the DSP unit work normally.
Thereafter, the MCU performs some other normal initialization operations to put the entire device into a normal operating mode.
Different from the mode of adopting the plug-in EEPROM chip, the DSP firmware is stored in the memory of the MCU, and the DSP firmware loading can be realized through simple control, so that the use of the plug-in EEPROM chip and peripheral circuits is reduced, the realization cost is reduced, the assembly space is greatly saved, and the heat dissipation of equipment is facilitated.
The Bootloader control program is solidified in false after being firstly burnt to the MCU, and can not be changed under general conditions. Therefore, when the MCU firmware program needs to be upgraded, the MCU firmware in false can be updated according to the MCU firmware upgrade control instruction through the Bootloader control program.
Similarly, when the DSP firmware needs to be upgraded, the DSP firmware in false can be updated according to the DSP firmware upgrading control instruction through the Bootloader control program.
Of course, if the DSP firmware and the MCU firmware are both required to be updated, the DSP firmware and the MCU firmware in false can be updated simultaneously through the Bootloader control program.
When the traditional realization mode of adopting the plug-in EEPROM chip, if the DSP firmware needs to be upgraded subsequently, the equipment shell needs to be disassembled firstly, and then the SPI interface of the EEPROM chip is connected through the burner for burning, so that the DSP firmware in the EEPROM chip can be upgraded, and the whole upgrading operation is very troublesome. Compared with the traditional mode, the mode of upgrading the DSP firmware through the Bootloader control program is obviously simple and quick, and the subsequent production and maintenance problems of the equipment are solved.
The embodiment also provides an optical module, which comprises the DSP firmware loading circuit. Through the DSP firmware loading circuit, the optical module can realize simple and reliable DSP firmware loading, the performance stability is ensured, and the market competitiveness is greatly improved.
It will be understood by those skilled in the art that all or part of the steps in the above DSP firmware loading method may be performed by instructions or by instructions controlling associated hardware, and the instructions may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present invention further provides a storage medium, where a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in the low power consumption control method provided in the embodiment of the present invention.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A DSP firmware loading circuit is characterized by comprising an MCU and a DSP unit;
the MCU comprises a memory; the memory comprises a DSP firmware storage area for storing a DSP firmware program, an MCU firmware storage area for storing MCU firmware and a Bootloader program storage area for storing a Bootloader control program;
the MCU and the DSP unit respectively comprise a GPIO interface, an SMI interface and an SPI interface; the MCU is connected with the DSP through the GPIO interface, the SMI interface and the SPI interface respectively;
when the GPIO interface outputs a low level, the SPI interface of the DSP unit is in a high-resistance state for outputting; and when the GPIO interface outputs a high level, the MCU loads DSP firmware to the DSP unit through the SPI interface.
2. The DSP firmware loading circuit of claim 1 wherein the SMI interface of the MCU and the SMI interface of the DSP unit are connected via a two-wire power conversion chip.
3. The DSP firmware loading circuit of claim 1 wherein the memory has a memory space of 256K bytes; the DSP firmware storage area is 128K byte, the MCU firmware storage area is 127K byte, and the Bootloader program storage area is 1K byte.
4. The DSP firmware loading circuit of claim 1, wherein the SPI interface comprises: the chip selection device comprises a main device data input interface, a main device data output interface, a clock interface and a chip selection interface.
5. A DSP firmware loading method applied to the DSP firmware loading circuit of claim 1, comprising the steps of:
after the equipment is powered on, the MCU controls the DSP unit to enter a non-working mode through the GPIO interface and then initializes the DSP unit;
after the initialization is finished, the MCU controls the DSP unit to enter a working mode through the GPIO interface;
after entering a working mode, the DSP unit sends a loading control instruction to the MCU through the SPI interface;
and after receiving the loading control instruction, the MCU sends the DSP firmware stored in the MCU to the DSP unit through the SPI to realize DSP firmware loading.
6. The DSP firmware loading method of claim 5, further comprising:
and after the DSP firmware is loaded, the MCU stops communicating with the SPI of the DSP unit and carries out initialization configuration on the DSP unit through an SMI interface.
7. The DSP firmware loading method of claim 5, further comprising: and when a DSP firmware upgrading instruction is received, the MCU updates the DSP firmware in the storage area through a Bootloader control program.
8. The DSP firmware loading method of claim 5, further comprising: and when receiving the DSP firmware upgrading instruction and the MCU firmware upgrading instruction at home, the MCU updates the DSP firmware and the MCU firmware in the storage area simultaneously through the Bootloader control program.
9. An optical module, characterized in that the optical module comprises the DSP firmware loading circuit as claimed in any one of claims 1 to 4.
10. A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the DSP firmware loading method of any one of claims 5 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010213273.XA CN111240725A (en) | 2020-03-24 | 2020-03-24 | DSP firmware loading circuit and method and optical module |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010213273.XA CN111240725A (en) | 2020-03-24 | 2020-03-24 | DSP firmware loading circuit and method and optical module |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111240725A true CN111240725A (en) | 2020-06-05 |
Family
ID=70875523
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010213273.XA Pending CN111240725A (en) | 2020-03-24 | 2020-03-24 | DSP firmware loading circuit and method and optical module |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111240725A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114327558A (en) * | 2021-12-31 | 2022-04-12 | 深圳康咏科技有限公司 | Upgrading method and circuit of TTDI module |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106547574A (en) * | 2016-12-08 | 2017-03-29 | 航天恒星科技有限公司 | The outside download system and method for a kind of DSP programs and FPGA programs |
WO2017063577A1 (en) * | 2015-10-15 | 2017-04-20 | 中兴通讯股份有限公司 | Firmware upgrade method and apparatus for optical module |
CN211124021U (en) * | 2020-03-24 | 2020-07-28 | 东莞铭普光磁股份有限公司 | DSP firmware loading circuit and optical module |
-
2020
- 2020-03-24 CN CN202010213273.XA patent/CN111240725A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017063577A1 (en) * | 2015-10-15 | 2017-04-20 | 中兴通讯股份有限公司 | Firmware upgrade method and apparatus for optical module |
CN106547574A (en) * | 2016-12-08 | 2017-03-29 | 航天恒星科技有限公司 | The outside download system and method for a kind of DSP programs and FPGA programs |
CN211124021U (en) * | 2020-03-24 | 2020-07-28 | 东莞铭普光磁股份有限公司 | DSP firmware loading circuit and optical module |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114327558A (en) * | 2021-12-31 | 2022-04-12 | 深圳康咏科技有限公司 | Upgrading method and circuit of TTDI module |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101329663B (en) | Apparatus and method for implementing pin time-sharing multiplexing | |
CN103559053B (en) | Board system and FPGA (Field Programmable Logic Array) online update method of communication interface cards | |
CN104115137B (en) | Self selectives of the PCIe SMBus from address | |
CN102045608B (en) | Network device for optical communication and method thereof for automatically configuring exchange interface | |
US20170194756A1 (en) | Usb data cable containing extension interface and control method thereof | |
CN107111588A (en) | The data transfer of PCIe protocol is used via USB port | |
CN100383544C (en) | Method and apparatus for real-time monitoring level signal | |
CN104731746A (en) | Equipment controller device | |
EP3779708A1 (en) | Method for fast balancing, chips, and communication system | |
CN100478935C (en) | PCIE channel expansion device, system and its collocation method | |
CN104115138B (en) | The configurable apolegamy plate interface of electricity | |
CN108664440A (en) | Interface server and cabinet | |
WO2024103829A1 (en) | Port configuration method, component, and hard disk expansion apparatus | |
CN103559910A (en) | System and method applied in programming unit to realize intelligent switching of programmed chip timing | |
CN103106113A (en) | Interrupt event processing method and processing equipment | |
CN211124021U (en) | DSP firmware loading circuit and optical module | |
CN113626359A (en) | Signal switching device and method for flash memory chip of server | |
CN101369948B (en) | Communication system implementing low-power consumption | |
CN108874700A (en) | Electronic equipment | |
CN111240725A (en) | DSP firmware loading circuit and method and optical module | |
CN110554881A (en) | Switching chip working mode remote switching system and method based on CPLD | |
CN210573287U (en) | Expansion circuit | |
CN114185720B (en) | Method, device, equipment and storage medium for dynamic hot backup of server | |
CN212541067U (en) | Internet of things human-computer interface system based on SAM9X60 | |
CN103135939A (en) | Access device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |