The invention relates to the technical field of
serial port communication, and discloses a
serial port-based DSP (
Digital Signal Processor) application program online upgrading method, which comprises the following steps of: 1, designing an upgrading program to be used as a program which is firstly operated after a DSP is powered on, judging whether upgrading is needed or not, and executing an upgrading process, and 2, designing a circuit with a power-off detection function and integrating the circuit in a
power management module of the DPS host. According to the method, smaller data structures and algorithms are selected from data structures of arrays, linked lists, stacks and queues and
linear search algorithms to design the upgrading program, so that memory occupation can be reduced, and in the upgrading process, upgrading program codes are divided into
small data packets which are sent to a buffer area of an RAM in batches; the data volume transmitted each time can be ensured to be controllable, the pressure on
system resources can be reduced by sending the data packets in batches, and particularly on equipment with
limited resources, the situation that a large amount of memory or
processor time is occupied at a time is avoided.