An optical module

The MCU in the optical module controls the reset and write protection pins, and uses the SPI bus to realize write protection of the Flash chip data area, which solves the problem that the DSP chip cannot protect the Flash chip data area and ensures data security.

CN114201784BActive Publication Date: 2024-10-22NAZHEN TECHNOLOGY (SINGAPORE) PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111500734.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-09
Publication Date
2024-10-22
Estimated Expiration
2041-12-09

AI Technical Summary

Technical Problem

Existing DSP chips cannot implement write protection in the data area of ​​the Flash chip, causing the data content to be easily rewritten by mistake and lacking an effective protection mechanism.

Method used

Design an optical module that controls the reset pin and write-protect pin through the MCU, so that the write-protection of the Flash chip data area can be completed without the DSP chip modifying the control register. The first and second SPI buses are used for data programming and writing respectively. Register modifications ensure the protection of the data area.

Benefits of technology

It achieves effective write protection of the Flash chip data area, avoids data content from being accidentally rewritten, and solves the problem that the DSP chip cannot control the write protection of the Flash chip data area.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114201784B_ABST
    Figure CN114201784B_ABST
Patent Text Reader

Abstract

The present application discloses an optical module, including a circuit board, on which an MCU, a data processing chip and a storage chip are arranged, and the MCU includes a first interface, a first control pin and a second control pin. The data processing chip includes a reset pin and a second interface. The storage chip includes a third interface and a write protection pin. The first interface can be switched between a high impedance state and a non-high impedance state, and the second interface is connected to the third interface. The reset pin is connected to the first control pin. The write protection pin is connected to the second control pin. After the MCU controls the reset pin to reset the data processing chip, the first interface is controlled to complete the resistance state switching. In the present application, after the MCU controls the reset pin to reset the data processing chip, the first interface is controlled to complete the resistance state switching. At this time, the first SPI bus is connected, the MCU modifies the control register, and completes the write protection of the data area, and there is no need for the data processing chip to control the write protection of the data area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of optical communication technology, and in particular to an optical module. Background Art

[0002] The optical module's DSP (Digital Signal Processing) chip requires a storage chip, such as a Flash chip (encoded flash memory), to operate. This storage chip stores the microcode required for DSP operation. After the microcode is initially written to the Flash chip, the DSP chip reads the microcode from the Flash chip each time it is powered on. This requires that after the DSP chip has initially written the microcode to the Flash chip, the Flash chip must be write-protected to prevent accidental overwriting of its contents.

[0003] Flash memory chips consist of control registers and a data area. Both the control registers and the data area are accessed via SPI (Serial Peripheral Interface) bus instructions. The WP pin (write-protect pin) on a Flash memory chip protects the control registers from being overwritten, but it does not protect the contents of the data area. To lock the data area's write protection, the basic process is as follows: First, the MCU pulls the WP pin high to enable overwriting of the control registers; second, the DSP issues an SPI instruction to modify the control registers, thus write-protecting the data area; finally, the MCU pulls the WP pin low to disable overwriting of the control registers.

[0004] The existing solution basically adopts the above operation process to control the write protection of the data area of ​​the Flash chip. However, some DSP chips do not support the second step operation, and the DSP chip can no longer be used to control the write protection of the data area of ​​the Flash. Summary of the Invention

[0005] The present application provides an optical module that implements write protection of the data area of ​​the Flash without requiring the DSP chip to modify the control register.

[0006] An optical module, comprising:

[0007] circuit boards;

[0008] The circuit board is equipped with an MCU, a data processing chip and a storage chip;

[0009] The MCU includes a first interface, a first control pin, and a second control pin;

[0010] A data processing chip, including a reset pin and a second interface;

[0011] A memory chip, including a control register, a data area, a third interface and a write protection pin;

[0012] The first interface can be switched between a high-impedance state and a non-high-impedance state, and is connected to the third interface for modifying the control register to complete the write protection of the data area;

[0013] A reset pin, connected to the first control pin, for controlling the reset of the data processing chip;

[0014] The second interface is connected to the third interface and is used to write data to the storage chip;

[0015] A write protection pin connected to the second control pin, used to control whether the control register can be rewritten or not;

[0016] After the MCU controls the reset pin to reset the data processing chip, it controls the first interface to complete the resistance state switching.

[0017] A method for writing write protection, the method comprising:

[0018] Configuring the first interface to a high impedance state so that the data processing chip can write data into the storage chip;

[0019] Control the write protection pin to make the control register of the memory chip rewritable;

[0020] After controlling the reset pin to reset the data processing chip, the first interface is configured from a high-impedance state to a non-high-impedance state;

[0021] Modify the control register of the memory chip to complete the write protection of the data area of ​​the memory chip;

[0022] Control the write protection pin to prevent the control register of the memory chip from being written or rewritten.

[0023] Beneficial effect: The present application provides an optical module, including a circuit board. An MCU, a data processing chip and a memory chip are provided on the circuit board. The MCU includes a first interface, a first control pin and a second control pin. The data processing chip includes a reset pin and a second interface. The memory chip includes a control register, a data area, a third interface and a write protection pin. The first interface can be switched between a high-impedance state and a non-high-impedance state, and is connected to the third interface for modifying the control register to complete the write protection of the data area. The reset pin is connected to the first control pin for controlling the reset of the data processing chip. The second interface is connected to the third for burning data to the memory chip. The write protection pin is connected to the second control pin for controlling whether the control register can be rewritten or not. After the MCU controls the reset pin to reset the data processing chip, it controls the first serial peripheral interface to complete the resistance state switching. The first interface of the MCU is connected to the third of the memory chip through the first SPI bus, and the second interface of the data processing chip is connected to the third of the memory chip through the second SPI bus. When the first interface is in high-impedance state, the first SPI bus connection between the MCU and the memory chip is disconnected; when the second interface is in non-high-impedance state, the first SPI bus connection between the MCU and the memory chip is connected. When the first SPI bus is connected, the MCU can modify the control register and complete the write protection of the data area; when the second SPI bus is connected, data can be burned to the memory chip. The usage process is as follows: when the optical module is powered on for the first time, the first interface is configured to high-impedance state. At this time, the first SPI bus is disconnected, and the data processing chip writes data to the memory chip; after the data is burned, the second control pin controls the write protection pin of the memory chip, making the control register rewritable; the first control pin controls the reset pin of the data processing chip, resetting the data processing chip. At this time, the second SPI bus is disconnected, and the data processing chip can no longer burn data to the memory chip; the first interface is configured to non-high-impedance state. At this time, the first SPI bus is connected, and the MCU modifies the control register through the first SPI bus to complete the write protection of the data area; the second control pin controls the write protection pin of the memory chip, making the control register non-rewritable. In this application, after the MCU controls the reset pin to reset the data processing chip, it controls the first interface to complete the resistance state switching. At this time, the first SPI bus is connected, and the MCU modifies the control register to complete the write protection of the data area. There is no need for the data processing chip to modify the control register to complete the write protection of the data area. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0025] Figure 1 Schematic diagram of electrical connection relationship of optical communication terminal;

[0026] Figure 2 This is a schematic diagram of the optical network terminal structure;

[0027] Figure 3 A schematic diagram of the structure of an optical module provided in an embodiment of the present application;

[0028] Figure 4 Provides a schematic diagram of the decomposed structure of the optical module for the embodiment of the present application;

[0029] Figure 5 A schematic diagram of the structure of a circuit board and an optical transceiver device provided in an embodiment of the present application;

[0030] Figure 6 Schematic diagram provided for the embodiments of this application;

[0031] Figure 7 A flow chart of the method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0032] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present disclosure.

[0033] Optical communication technology uses light to carry the information to be transmitted. This information is then transmitted through optical fiber or waveguide transmission equipment, such as information transmission equipment, to information processing equipment such as computers. Because optical signals are passive when transmitted through optical fiber or waveguide transmission equipment, they enable low-cost, low-loss information transmission. Furthermore, the signals transmitted by optical fiber or waveguide transmission equipment are optical signals, while the signals that information processing equipment such as computers can recognize and process are electrical signals. Therefore, in order to establish an information connection between optical fiber or waveguide transmission equipment and information processing equipment such as computers, conversion between electrical and optical signals is necessary.

[0034] In the field of fiber-optic communications, optical modules implement the aforementioned conversion between optical and electrical signals. They include both an optical port and an electrical port. The optical port enables optical communication with information transmission equipment such as optical fibers or optical waveguides, while the electrical port enables electrical connection to an optical network terminal (e.g., an optical modem). This electrical connection is primarily used for power supply, I2C signal transmission, data signal transmission, and grounding. The optical network terminal transmits the electrical signals to information processing equipment such as computers via network cables or wireless fidelity (Wi-Fi).

[0035] Figure 1 FIG. 1 is a diagram showing the connection relationship of an optical communication system according to some embodiments. Figure 1 As shown, the optical communication system mainly includes a remote server 1000, a local information processing device 2000, an optical network terminal 100, an optical module 200, an optical fiber 101 and a network cable 103;

[0036] One end of optical fiber 101 is connected to remote server 1000, and the other end is connected to optical network terminal 100 via optical module 200. Optical fiber itself can support long-distance signal transmission, for example, signal transmission over several kilometers (6 to 8 kilometers). Furthermore, if repeaters are used, ultra-long-distance transmission is theoretically possible. Therefore, in typical optical communication systems, the distance between remote server 1000 and optical network terminal 100 can typically reach several thousand meters, tens of kilometers, or even hundreds of kilometers.

[0037] One end of the network cable 103 is connected to the local information processing device 2000, and the other end is connected to the optical network terminal 100. The local information processing device 2000 can be any one or more of the following devices: a router, a switch, a computer, a mobile phone, a tablet computer, a television, etc.

[0038] The physical distance between the remote server 1000 and the optical network terminal 100 is greater than the physical distance between the local information processing device 2000 and the optical network terminal 100. The connection between the local information processing device 2000 and the remote server 1000 is completed by the optical fiber 101 and the network cable 103; and the connection between the optical fiber 101 and the network cable 103 is completed by the optical module 200 and the optical network terminal 100.

[0039] Optical module 200 includes an optical port and an electrical port. The optical port is configured to connect to optical fiber 101, thereby establishing a bidirectional optical signal connection between optical module 200 and optical fiber 101. The electrical port is configured to connect to optical network terminal 100, thereby establishing a bidirectional electrical signal connection between optical module 200 and optical network terminal 100. Optical module 200 converts optical signals into electrical signals, thereby establishing a connection between optical fiber 101 and optical network terminal 100. For example, optical signals from optical fiber 101 are converted into electrical signals by optical module 200 and then input into optical network terminal 100. Similarly, electrical signals from optical network terminal 100 are converted into optical signals by optical module 200 and then input into optical fiber 101.

[0040] The optical network terminal 100 includes a roughly rectangular housing, an optical module interface 102, and a network cable interface 104 disposed on the housing. The optical module interface 102 is configured to connect to the optical module 200, thereby establishing a bidirectional electrical signal connection between the optical network terminal 100 and the optical module 200. The network cable interface 104 is configured to connect to the network cable 103, thereby establishing a bidirectional electrical signal connection between the optical network terminal 100 and the network cable 103. The connection between the optical module 200 and the network cable 103 is established through the optical network terminal 100. For example, the optical network terminal 100 transmits electrical signals from the optical module 200 to the network cable 103, and transmits signals from the network cable 103 to the optical module 200. Therefore, the optical network terminal 100 serves as the host computer of the optical module 200 and can monitor the operation of the optical module 200. In addition to the optical network terminal 100, the host computer of the optical module 200 may also include an optical line terminal (OLT), etc.

[0041] The remote server 1000 establishes a bidirectional signal transmission channel with the local information processing device 2000 through the optical fiber 101 , the optical module 200 , the optical network terminal 100 and the network cable 103 .

[0042] Figure 2 FIG1 is a structural diagram of an optical network terminal according to some embodiments, in order to clearly show the connection relationship between the optical module 200 and the optical network terminal 100, Figure 2 Only the structure of the optical network terminal 100 related to the optical module 200 is shown. Figure 2 As shown, the optical network terminal 100 further includes a PCB 105 disposed within the housing, a cage 106 disposed on the surface of the PCB 105, and an electrical connector disposed within the cage 106. The electrical connector is configured to connect to the electrical port of the optical module 200; the heat sink 107 has protrusions such as fins that increase the heat dissipation area.

[0043] The optical module 200 is inserted into the cage 106 of the optical network terminal 100. The cage 106 secures the optical module 200. Heat generated by the optical module 200 is transferred to the cage 106 and then dissipated through the heat sink 107. After the optical module 200 is inserted into the cage 106, the electrical port of the optical module 200 connects to the electrical connector inside the cage 106, thereby establishing a bidirectional electrical signal connection between the optical module 200 and the optical network terminal 100. Furthermore, the optical port of the optical module 200 connects to the optical fiber 101, thereby establishing a bidirectional electrical signal connection between the optical module 200 and the optical fiber 101.

[0044] Figure 3 This is a structural diagram of an optical module provided according to some embodiments. Figure 4 FIG. 1 is a diagram showing the decomposition structure of an optical module according to some embodiments. Figure 3 and Figure 4 As shown, the optical module 200 includes a housing, a circuit board 300 disposed in the housing, and an optical transceiver device;

[0045] The housing includes an upper housing 201 and a lower housing 202 . The upper housing 201 covers the lower housing 202 to form the housing having two openings 204 and 205 . The outer contour of the housing is generally a square.

[0046] In some embodiments, the lower shell 202 includes a base plate and two lower side plates located on both sides of the base plate and arranged perpendicularly to the base plate; the upper shell 201 includes a cover plate and two upper side plates located on both sides of the cover plate and arranged perpendicularly to the cover plate, and is combined with two side walls and two side plates to achieve the upper shell 201 covering the lower shell 202.

[0047] The direction of the line connecting the two openings 204 and 205 may be consistent with the length direction of the optical module 200, or may be inconsistent with the length direction of the optical module 200. For example, the opening 204 is located at the end of the optical module 200 ( Figure 3 The opening 205 is also located at the end of the optical module 200 ( Figure 3 Alternatively, opening 204 is located at the end of optical module 200, while opening 205 is located on the side of optical module 200. Opening 204 is an electrical port, from which the gold finger of circuit board 300 extends and is inserted into a host computer (such as optical network terminal 100); opening 205 is an optical port, configured to receive external optical fiber 101, so that optical fiber 101 connects to the optical transceiver device inside optical module 200.

[0048] The combined assembly of upper and lower housings 201 and 202 facilitates the installation of components such as the circuit board 300 and optical transceivers within the housing, with the upper and lower housings 201 and 202 providing encapsulation and protection for these components. Furthermore, during assembly of components such as the circuit board 300, the positioning, heat dissipation, and electromagnetic shielding components of these components are easily positioned, facilitating automated production.

[0049] In some embodiments, the upper shell 201 and the lower shell 202 are generally made of metal materials, which are conducive to electromagnetic shielding and heat dissipation.

[0050] In some embodiments, the optical module 200 further includes an unlocking component 203 located on the outer wall of its housing. The unlocking component 203 is configured to achieve a fixed connection between the optical module 200 and the host computer, or to release the fixed connection between the optical module 200 and the host computer.

[0051] For example, the unlocking component 203 is located on the outer walls of the two lower side panels 2022 of the lower housing 202 and includes engaging components that mate with the cage of the host computer (e.g., the cage 106 of the optical network terminal 100). When the optical module 200 is inserted into the cage of the host computer, the engaging components of the unlocking component 203 secure the optical module 200 in the cage of the host computer. When the unlocking component 203 is pulled, the engaging components of the unlocking component 203 move accordingly, thereby changing the connection between the engaging components and the host computer, thereby releasing the engaging relationship between the optical module 200 and the host computer, thereby allowing the optical module 200 to be removed from the cage of the host computer.

[0052] The circuit board 300 includes circuit traces, electronic components (such as capacitors, resistors, transistors, MOS tubes) and chips (such as MCU, laser driver chip, limiting amplifier chip, clock data recovery CDR, power management chip, data processing chip DSP), etc.

[0053] The circuit board 300 connects the above components in the optical module 200 together according to the circuit design through circuit traces to achieve functions such as power supply, electrical signal transmission and grounding.

[0054] The circuit board 300 is generally a rigid circuit board. Due to its relatively hard material, the rigid circuit board can also perform a load-bearing function. For example, the rigid circuit board can stably carry a chip. The rigid circuit board can also be inserted into the electrical connector in the upper computer cage. In some embodiments disclosed in the present application, a metal pin / gold finger is formed on the end surface of one side of the rigid circuit board for connecting to the electrical connector. These are not easy to achieve with a flexible circuit board.

[0055] Flexible circuit boards are also used in some optical modules. Flexible circuit boards are generally used in conjunction with rigid circuit boards. For example, flexible circuit boards can be used to connect rigid circuit boards to optical transceiver devices as a supplement to rigid circuit boards.

[0056] The optical transceiver device includes an optical transmitting submodule 400 and an optical receiving submodule 500 .

[0057] The optical transmission sub-module 400 is electrically connected to the circuit board 300 and is used to transmit optical signals.

[0058] The light emitting sub-module 400 may be disposed on the surface of the circuit board 300 , or may be electrically connected to the circuit board 300 via a flexible board.

[0059] The optical receiving sub-module 500 is electrically connected to the circuit board 300 and is used to receive optical signals output by an external optical fiber.

[0060] The light receiving sub-module 500 may be disposed on the surface of the circuit board 300 , or may be electrically connected to the circuit board 300 via a flexible board.

[0061] Although the optical transmitting submodule 400 and the optical receiving submodule 500 can both be arranged on the surface of the circuit board 300 and can also be electrically connected to the circuit board 300 through a flexible board, in the embodiment of the present application, the optical transmitting submodule 400 and the optical receiving submodule 500 are electrically connected to the circuit board 300 through a flexible board.

[0062] Figure 5 A schematic diagram of the structure of the circuit board and optical transceiver device provided in an embodiment of the present application. Figure 6 This is a schematic diagram provided for the embodiment of this application. Figure 5-6 As shown, in the embodiment of the present application, an MCU 301 , a data processing chip 302 and a storage chip 303 are provided on the circuit board 300 .

[0063] Specifically, MCU301 includes a first interface, a first control pin and a second control pin, the data processing chip 302 includes a reset pin and a second interface, and the memory chip 303 includes a control register, a data area, a third and a write protection pin. Among them, the first interface is a first serial peripheral interface, the second interface is a second serial peripheral interface, and the third interface is a third serial peripheral interface. The memory chip 303 can be set inside the MCU301 (as part of the MCU301) or outside the MCU301 (as an independent chip). Specifically,

[0064] The MCU 301 is provided with an enable register, which is used to control the first serial peripheral interface to be in a high-impedance state or a non-high-impedance state.

[0065] The first serial peripheral interface can be switched between high-impedance state and non-high-impedance state, and is connected to the third serial peripheral interface to modify the control register and complete the write protection of the data area. Specifically,

[0066] The first serial peripheral interface and the third serial peripheral interface are connected via a first SPI bus. When the first serial peripheral interface is in a high-impedance state, the first serial peripheral interface is similar to being "broken," and the first SPI bus is disconnected. When the first serial peripheral interface is in a non-high-impedance state, the first serial peripheral interface is not "broken," and the first SPI bus is connected.

[0067] When the first SPI bus is connected, the MCU modifies the control register through the first SPI bus to complete the write protection of the data area.

[0068] The second serial peripheral interface is connected to the third serial peripheral interface and is used to write data to the memory chip. The data includes microcode. Specifically,

[0069] The second serial peripheral interface and the third serial peripheral interface are connected via a second SPI bus. When the data processing chip is reset, the second SPI bus is disconnected; when the data processing chip is released from reset, the second SPI bus is connected.

[0070] When the second SPI bus is connected, the data processing chip burns the microcode to the storage chip through the second SPI bus.

[0071] The third serial peripheral interface can be connected to both the first serial peripheral interface and the second serial peripheral interface, but only one serial peripheral interface can be connected at a time.

[0072] For example: when the third serial peripheral interface is connected to the first serial peripheral interface, that is, the first SPI bus is connected, then the third serial peripheral interface is not connected to the second serial peripheral interface, that is, the second SPI bus is disconnected; when the third serial peripheral interface is connected to the second serial peripheral interface, that is, the second SPI bus is connected, then the third serial peripheral interface is not connected to the first serial peripheral interface, that is, the first SPI bus is disconnected.

[0073] The first, second, and third serial peripheral interfaces each include four GPIO interfaces (General-purpose input / output). These four GPIO interfaces include SCLK (Serial Clock, clock signal interface), CS (Chip Select, slave enable signal interface), MOSI (Master Output Slave Input, master device data output interface), and MISO (Master Input Slave Output, master device data input interface).

[0074] The first control pin is connected to the reset pin to control the reset pin to be pulled high or low synchronously.

[0075] The first control pin can be pulled low or high. When the first control pin is pulled low, the reset pin is controlled to be pulled low; when the first control pin is pulled high, the reset pin is controlled to be pulled high.

[0076] The reset pin is connected to the first control pin and is used to control the data processing chip to reset. Specifically, when the reset pin is pulled low, the data processing chip is reset; when the reset pin is pulled high, the data processing chip is released from reset.

[0077] The second control pin is connected to the write protection pin to control the write protection pin to be pulled high or low synchronously.

[0078] The second control pin can be pulled low or high. When the second control pin is pulled low, the write protection pin is controlled to be pulled low; when the second control pin is pulled high, the write protection pin is controlled to be pulled high.

[0079] The write protection pin is connected to the second control pin to control whether the control register can be rewritten or not. Specifically, when the write protection pin is pulled low, the control register cannot be rewritten; when the write protection pin is pulled high, the control register can be rewritten.

[0080] After the MCU 301 controls the reset pin to reset the data processing chip, it controls the first serial peripheral interface to complete the resistance state switching, wherein the resistance state switching includes switching from high-impedance state to non-high-impedance state, or switching from non-high-impedance state to non-high-impedance state.

[0081] The usage process is as follows: when the optical module is powered on for the first time, the first serial peripheral interface is configured to a high-impedance state. At this time, the first SPI bus is disconnected, and the data processing chip burns the microcode to the memory chip; when the microcode burning is completed, the second control pin controls the write-protect pin of the memory chip to make the control register rewritable; the first control pin controls the reset pin of the data processing chip to reset the data processing chip. At this time, the second SPI bus is disconnected, and the data processing chip can no longer burn the microcode to the memory chip; the first serial peripheral interface is configured to a non-high-impedance state. At this time, the first SPI bus is connected, and the MCU modifies the control register through the first SPI bus to complete the write protection of the data area; the second control pin controls the write-protect pin of the memory chip to make the control register non-rewritable.

[0082] Figure 7 This is a flowchart of a method provided in an embodiment of the present application. As shown in the figure, in addition to the optical module provided in the present application, a method for writing write protection is also provided, which includes:

[0083] S100: Configuring the first interface to a high-impedance state so that the data processing chip can write data into the storage chip.

[0084] The first serial peripheral interface is configured to a high-impedance state, and the first SPI bus between the first serial peripheral interface and the third serial peripheral interface is disconnected, but the second SPI bus between the second serial peripheral interface and the third serial peripheral interface is still connected, and the microcode is burned between the data processing chip and the memory chip via the second SPI bus. Therefore, the MCU configures the first serial peripheral interface to a high-impedance state, and the data processing chip writes the microcode to the memory chip via the second SPI bus. After the burning is completed, the memory chip needs to be write-protected. However, since the write-protect pin of the memory chip can be used to protect the control register from being rewritten, the data area can be rewritten. In order to lock the write protection of the data area, the following steps are taken:

[0085] S200: Control the write protection pin to make the control register of the memory chip rewritable.

[0086] When the write-protect pin is pulled high, the control registers can be rewritten; when the write-protect pin is pulled low, the control registers cannot be rewritten. A second control pin controls whether the write-protect pin is pulled high or low simultaneously. When the second control pin is pulled high, the write-protect pin is pulled high, making the control registers rewritable; when the second control pin is pulled low, the write-protect pin is pulled low, making the control registers non-rewritable. Therefore, the MCU controls the write-protect pin by pulling the second control pin high, making the control registers of the memory chip rewritable.

[0087] S300: After controlling the reset pin to reset the data processing chip, the first interface is configured from a high-impedance state to a non-high-impedance state.

[0088] Pulling the reset pin high releases the data processing chip from reset; pulling the reset pin low resets the data processing chip. A first control pin controls whether the reset pin is pulled high or low simultaneously. When the first control pin is pulled high, the reset pin is pulled high, releasing the data processing chip from reset; when the first control pin is pulled low, the reset pin is pulled low, resetting the data processing chip. Therefore, the MCU resets the data processing chip by pulling the first control pin low.

[0089] When the data processing chip is reset, the second SPI bus is disconnected. To write-protect the data area, the first SPI bus needs to be connected first. Therefore, after the data processing chip is reset by controlling the reset pin, the first serial peripheral interface is configured from a high-level state to a non-high-impedance state.

[0090] S400: Modify the control register of the memory chip to complete the write protection of the data area of ​​the memory chip.

[0091] Modify the control register value to write-protect the data area. Therefore, the MCU modifies the control register of the memory chip through the first SPI bus to complete the write protection of the data area of ​​the memory chip.

[0092] S500: Control the write protection pin so that the control register of the memory chip cannot be written or rewritten.

[0093] The MCU controls the write protection pin to be pulled low by pulling down the second control pin, so that the control register of the memory chip cannot be rewritten.

[0094] S600: Configure the first interface from a non-high-impedance state to a high-impedance state.

[0095] The MCU configures the first serial peripheral interface from a non-high-impedance state to a high-impedance state, and the first SPI bus is disconnected.

[0096] S700: Control the reset pin to reset the data processing chip.

[0097] The MCU controls the reset pin to be pulled high by pulling the first control pin high, so that the data processing chip is released from reset. At this time, the data processing chip resumes normal working mode, and the data area of ​​the memory chip has been write-protected.

[0098] The above steps are for writing write protection to the memory chip when the optical module is powered on for the first time. When the optical module is powered on again, the data processing chip will still operate in normal operation mode and the above steps will not be executed.

[0099] The present application provides an optical module, including a circuit board. An MCU, a data processing chip, and a memory chip are provided on the circuit board. The MCU includes a first interface, a first control pin, and a second control pin. The data processing chip includes a reset pin and a second interface. The memory chip includes a control register, a data area, a third interface, and a write protection pin. The first interface can be switched between a high-impedance state and a non-high-impedance state, and is connected to the third interface for modifying the control register and completing write protection of the data area. The reset pin is connected to the first control pin for controlling the reset of the data processing chip. The second interface is connected to the third interface for burning microcode to the memory chip. The write protection pin is connected to the second control pin for controlling whether the control register can be rewritten or not. After the MCU controls the reset pin to reset the data processing chip, it controls the first interface to complete the resistance state switching. The first interface of the MCU is connected to the third interface of the memory chip via a first SPI bus, and the second interface of the data processing chip is connected to the third interface of the memory chip via a second SPI bus. When the first interface is in a high-impedance state, the first SPI bus connection between the MCU and the memory chip is disconnected; when the second interface is in a non-high-impedance state, the first SPI bus connection between the MCU and the memory chip is connected. When the first SPI bus is connected, the MCU can modify the control register and complete the write protection of the data area; when the second SPI bus is connected, data can be burned to the memory chip. The usage process is as follows: when the optical module is powered on for the first time, the first interface is configured to a high-impedance state. At this time, the first SPI bus is disconnected, and the data processing chip burns the microcode to the memory chip; after the microcode is burned, the second control pin controls the write protection pin of the memory chip, making the control register rewritable; the first control pin controls the reset pin of the data processing chip, resetting the data processing chip. At this time, the second SPI bus is disconnected, and the data processing chip can no longer burn the microcode to the memory chip; the first interface is configured to a non-high-impedance state. At this time, the first SPI bus is connected, and the MCU modifies the control register through the first SPI bus to complete the write protection of the data area; the second control pin controls the write protection pin of the memory chip, making the control register non-rewritable. In this application, after the MCU controls the reset pin to reset the data processing chip, it controls the first interface to complete the resistance state switching. At this time, the first SPI bus is connected, and the MCU modifies the control register to complete the write protection of the data area. There is no need for the data processing chip to modify the control register to complete the write protection of the data area.

[0100] The write protection pin can be designed to control the register to be non-rewritable when it is pulled low, or it can be designed to control the register to be rewritable when it is pulled low. If it is designed to control the register to be non-rewritable when it is pulled low, it is as described above. If it is designed to control the register to be rewritable when it is pulled low, the second control pin is pulled low, and the write protection pin is controlled to be pulled low, and the control register can be rewritten. Therefore, the specific process of controlling the write protection pin in S200 to make the control register of the memory chip rewritable is that the MCU controls the write protection pin to be pulled low by pulling the second control pin, so that the control register of the memory chip can be rewritten. The specific process of controlling the write protection pin in S500 to prevent the control register of the memory chip from being written or rewritten is that the MCU controls the write protection pin to be pulled high by pulling the second control pin, so that the control register of the memory chip cannot be rewritable.

[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present disclosure.

Claims

1. An optical module, characterized in that: include: Circuit boards; The circuit board is provided with an MCU, a data processing chip and a storage chip; The MCU comprises a first interface, a first control pin and a second control pin; The data processing chip comprises a reset pin and a second interface; The memory chip comprises a control register, a data area, a third interface and a write protection pin; The first interface can be switched between a high-impedance state and a non-high-impedance state; When the first interface is in a non-high-impedance state, the first interface is connected to the third interface to modify the control register and complete the write protection of the data area; The reset pin is connected to the first control pin and is used to control the reset of the data processing chip; When the first interface is in a high impedance state, the second interface is connected to the third interface for writing data to the storage chip; The write protection pin is connected to the second control pin and is used to control whether the control register can be rewritten or not; After the MCU controls the reset pin to reset the data processing chip, it controls the first interface to switch from a high-impedance state to a non-high-impedance state.

2. The optical module according to claim 1, characterized in that: The MCU is provided with an enable register; The enable register is used to control the first interface to be in a high-impedance state or a non-high-impedance state.

3. The optical module according to claim 1, characterized in that: The first control pin controls the reset pin to be synchronously pulled high or low, so as to reset or release the data processing chip.

4. The optical module according to claim 1, characterized in that: The second control pin controls the write protection pin to be synchronously pulled high or low, so that the control register can be rewritten or cannot be rewritten.

5. The optical module according to claim 1, characterized in that: The storage chip is arranged in the MCU.

6. The optical module according to claim 1, characterized in that: The first interface, the second interface and the third interface each include four universal input and output interfaces.

7. A method for writing write protection, comprising: selecting the optical module according to any one of claims 1 to 6, wherein: The method comprises: The MCU configures the first interface to a high impedance state so that the data processing chip burns the data into the storage chip; The MCU controls the write protection pin to make the control register of the memory chip rewritable; After the MCU controls the reset pin to reset the data processing chip, the first interface is configured from a high-impedance state to a non-high-impedance state; The MCU modifies the control register of the storage chip to complete the write protection of the data area of ​​the storage chip; The MCU controls the write protection pin to prevent the control register of the memory chip from being rewritten.

8. The method according to claim 7, characterized in that After controlling the write protection pin so that the control register of the storage chip cannot be rewritten, the method further includes: Convert the first interface from a non-high-impedance state to a high-impedance state; The reset pin is controlled to release the data processing chip from resetting.