The invention relates to an
optical module firmware program online
upgrade method, comprising the following steps: S1, activating an
upgrade identifier, and entering an
upgrade mode; S2, receiving upgrade program command parameters; S3, receiving upgrade program data, and writing the upgrade program data into a corresponding application program partition after checking that the upgrade program data is correct; S4, checking the upgrade program data written into the corresponding application program partition, and trial-running the upgrade program after checking that the upgrade program data is correct; and S5, completing application program upgrade, retaining related application program upgrade information according to the result of trial run, and exiting from the upgrade mode. The problem that service is interrupted during online upgrade of an
optical module is solved. Moreover, because of
special design, the method supports a variety of communication interfaces,
firmware with a greater number of codes and a function of
firmware version fallback to the version before upgrade, and is applicable to 8051 series MCU online upgrade.