DSP programming device and method based on CPLD
Through the CPLD-based DSP programming device, the CPLD module and the signal conversion module are used to form a controlled SCI communication link, which solves the operational complexity and stability problems of traditional DSP chip program upgrades under on-site working conditions, and realizes operation in different places. Flexible deployment and long-distance transmission ensure the stable upgrade and programming process of DSP programs.
Patent Information
- Application Number
- CN202311695324.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-11
- Publication Date
- 2024-08-23
AI Technical Summary
The program upgrade method of traditional DSP chips relies on the JTAG interface, which is complicated to operate and has poor upgrade stability in packaged equipment. There is a risk of upgrade failure. It is especially difficult to achieve effective program simulation and programming in on-site working conditions.
Using a CPLD-based DSP programming device, the CPLD module forms the mode control logic of the DSP programming process and the controlled SCI communication link between the host computer and the DSP chip. Combined with the signal conversion module and bridge device, wired or wireless SCI can be realized Communication links enable flexible deployment and long-distance transmission between packaged devices.
It overcomes the operation and maintenance problems of DSP chip program simulation and programming in on-site working conditions, realizes DSP program simulation and programming in different places, reduces operational complexity and the risk of upgrade failure, and ensures the stability of the programming process. and automated control.
Smart Images

Figure CN118535185A
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of DSP programming, and in particular to a DSP burning device and method based on CPLD (Serial Communication Interface). Background Art
[0002] Digital control processors (DSPs) have high-speed data computing and processing functions, rich functions, diverse interfaces, powerful control capabilities, and are easy to develop. For example, embedded control systems based on TMS320F28335DSP are widely used in motor control, communication, and industrial control. For each update of the hardware system, the corresponding DSP software program must be updated and upgraded. The traditional program upgrade method relies on the JTAG interface of the DSP chip. It is necessary to connect the computer and the DSP chip through the dedicated port of the emulator. The burning program deployed by the computer simulates and burns the compiled files into the FLASH storage space of the DSP through the emulator. This burning method is only applicable to the laboratory design and development stage. Once the product is delivered and packaged in a closed equipment space, due to the strict equipment site requirements and installation requirements, the limitations and disadvantages of its upgrade method are also highlighted. If the program needs to be updated later, the simulation and burning of the DSP program will become extremely troublesome if it is only connected to the emulator through the JTAG interface. The upgrade process is poorly stable and there is a risk of upgrade failure. Summary of the invention
[0003] In view of the above problems, the embodiments of the present invention provide a DSP burning device and method based on CPLD, which solves the technical problem that the existing DSP burning process relies on the simulator and has high requirements on the operating environment.
[0004] The CPLD-based DSP programming device of the embodiment of the present invention comprises:
[0005] The CPLD module is used to form the mode control logic of the DSP burning process and establish a controlled SCI communication link between the host computer and the DSP chip, receive the host computer control command through the controlled SCI link to start the burning control logic, transmit the burning data to the DSP chip, and establish the DSP burning process;
[0006] The signal conversion module is used to form an uplink interface for the controlled SCI communication link to establish a wired or wireless connection with the host computer.
[0007] In one embodiment of the present invention, the CPLD module adopts 10M02SCU169 series chips, the DSP chip adopts TMS320F28377S series chips, and the signal conversion module adopts MAX232AESE series chips.
[0008] In one embodiment of the present invention, a matching bridge device is used between the signal conversion module and the host computer to form a bridge channel that carries the SCI communication link.
[0009] In one embodiment of the present invention, the bridge channel includes an optical communication channel, a WiFi communication channel, a Bluetooth communication channel, a UWB communication channel or a wired cable communication channel.
[0010] In one embodiment of the present invention, the bridge device for data connection of the signal conversion module provides an RS232 input pin and an RS232 output pin, the RS232 input pin corresponds to the RS232 level output pin MAX232_TX connected to the signal conversion module, and the RS232 output pin corresponds to the RS232 level input pin MAX232_RX connected to the signal conversion module; it also includes a TTL level output pin SCITXDB1 corresponding to the RS232 level input pin MAX232_RX and a TTL level input pin SCIRXDB1 corresponding to the RS232 level output pin MAX232_TX.
[0011] In one embodiment of the present invention, the TTL level output pin SCITXDB1 and the TTL level input pin SCIRXDB1 of the signal conversion module are correspondingly connected to the first pair of TTL level input pins and TTL level output pins of the CPLD module; a direct connection circuit between pins is provided in the CPLD module, so that the first pair of TTL level input pins and TTL level output pins of the CPLD module are correspondingly directly connected to the second pair of TTL level input pins and TTL level output pins.
[0012] In one embodiment of the present invention, the second pair of TTL level output pins and TTL level input pins of the CPLD module are correspondingly connected to the TTL level input pin SCIRXDB1 and the TTL level output pin SCITXDB1 of the DSP chip.
[0013] In one embodiment of the present invention, the CPLD module provides a RST pin for sending a reset signal, and a BOOT0 pin and a BOOT1 pin for selecting a boot mode, which are connected to the RST pin, GPIO84 pin and GPIO72 pin of the DSP chip respectively.
[0014] The CPLD-based DSP programming method of the embodiment of the present invention utilizes the above-mentioned CPLD-based DSP programming device, including:
[0015] The CPLD module starts receiving the burn start signal from the host computer and the confirmation process of the burn start from the lower computer;
[0016] After confirming the start signal, the CPLD module starts the programming mode setting process, outputs a control signal sequence, controls the DSP chip to start the SCI Mode mode, and enables the SCI communication link;
[0017] The CPLD module transmits program data to the DSP chip through the SCI communication link and performs data verification, so that the program burning process of the DSP chip remains running and the program is updated and solidified;
[0018] The CPLD module determines the programming process according to the state of the SCI communication pin of the DSP chip fed back by the SCI communication link, and controls the DSP chip to exit the SCI Mode and reset when it is determined that the programming process is completed.
[0019] The CPLD-based DSP burning device and method of the embodiment of the present invention solidifies the control logic of the DSP burning process through the CPLD module, and uses the signal conversion module to form a physical interface adaptation with the bridge device, so as to meet the flexible deployment between the host computer connected to the bridge device and the packaged DSP chip device. It overcomes the operational and maintenance defects that the on-site working environment is not conducive to program simulation and burning of the DSP chip. It meets the simulation and burning of DSP programs under different working conditions and can be transmitted over long distances without being restricted by the location. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 FIG. 1 is a schematic diagram of the architecture of a CPLD-based DSP programming device according to an embodiment of the present invention.
[0021] Figure 2 The figure is a flow chart of a CPLD-based DSP programming method according to an embodiment of the present invention.
[0022] Figure 3 The figure shows a specific implementation flow chart of a CPLD-based DSP programming method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present invention clearer and more understandable, the present invention is further described below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] An embodiment of the present invention is a DSP programming device based on CPLD. Figure 1 As shown. Figure 1 In this embodiment, the present invention comprises:
[0025] The CPLD module is used to form the mode control logic of the DSP burning process and establish a controlled SCI communication link between the host computer and the DSP chip. It receives the host computer control command through the controlled SCI link to start the burning control logic, transmits the burning data to the DSP chip, and establishes the DSP burning process.
[0026] Those skilled in the art can understand that the CPLD module, as a complex programmable logic device, consists of three parts: logic blocks, programmable interconnection channels, and I / O blocks, and can complete various algorithms and combinational logic. The continuous wiring structure determines that its timing delay is uniform and predictable, which is conducive to forming a certain delay in the control logic process that meets the design expectations. Through the CPLD module, the communication link control, timing control of the associated pins, potential control, mode control, and signal simulation control during the DSP burning process can be uniformly planned to form the necessary control logic required for the DSP burning process.
[0027] The signal conversion module is used to form an uplink interface for the controlled SCI communication link to establish a wired or wireless connection with the host computer.
[0028] The SCI communication link is universal. Based on the SCI serial communication rules, the signal conversion module can be connected to a wired or wireless bridge device to form a wired or wireless link physical distance extension to meet the spatial distance requirements between the host computer and the device encapsulating the DSP chip.
[0029] The CPLD-based DSP burning device of the embodiment of the present invention solidifies the control logic of the DSP burning process through the CPLD module, and uses the signal conversion module to form a physical interface adaptation with the bridge device, so as to meet the flexible deployment between the host computer connected to the bridge device and the packaged DSP chip device. It overcomes the operation and maintenance defect that the on-site working environment is not conducive to program simulation and burning of the DSP chip.
[0030] like Figure 1 As shown, in one embodiment of the present invention, the CPLD module adopts 10M02SCU169 series chips, the DSP chip adopts TMS320F28377S series chips, and the signal conversion module adopts MAX232AESE series chips. A matching bridge device is used between the signal conversion module and the host computer to form a bridge channel carrying the SCI communication link. According to the type of the bridge device, the bridge channel includes but is not limited to an optical communication channel, a WiFi communication channel, a Bluetooth communication channel, a UWB communication channel or a wired cable communication channel, etc.
[0031] The physical extension of the SCI communication link can be obtained by selecting the bridge channel. Through the channel management inside the bridge device, the bridge channel can provide the necessary physical interface and interface rate for extending the SCI communication link.
[0032] like Figure 1 As shown, in one embodiment of the present invention, the bridge device connected to the signal conversion module data provides an RS232 input pin and an RS232 output pin, the RS232 input pin corresponds to the RS232 level output pin MAX232_TX connected to the signal conversion module, and the RS232 output pin corresponds to the RS232 level input pin MAX232_RX connected to the signal conversion module. After the voltage level of the signal conversion module is converted, a TTL level output pin SCITXDB1 and a TTL level input pin SCIRXDB1MAX232_RX corresponding to TTL level input and output are formed.
[0033] The TTL level output pin SCITXDB1 and the TTL level input pin SCIRXDB1 of the signal conversion module are connected to the first pair of TTL level input pins and TTL level output pins of the CPLD module. A direct connection circuit between pins is provided in the CPLD module. The first pair of TTL level input pins and TTL level output pins of the CPLD module are directly connected to the second pair of TTL level input pins and TTL level output pins. The CPLD module forms an enable control for the direct connection circuit between pins.
[0034] The second pair of TTL level output pins and TTL level input pins of the CPLD module are connected to the TTL level input pin SCIRXDB1 and TTL level output pin SCITXDB1 of the DSP chip. The main part of the SCI communication link is formed by the above bridge device, signal conversion module, CPLD module and the orderly connected input pins and output pins on the DSP chip. The extended part of the SCI communication link is formed by the adapted bridge device.
[0035] like Figure 1 As shown, in one embodiment of the present invention, the CPLD module provides a RST pin for sending a reset signal, a BOOT0 pin and a BOOT1 pin for selecting a boot mode, which are connected to the RST pin, GPIO84 pin and GPIO72 pin of the DSP chip respectively.
[0036] The CPLD-based DSP burning device of the embodiment of the present invention utilizes the CPLD module to form a SCI communication link for controlled data transmission to the DSP chip and a control logic for controlling the burning process of the DSP chip. The control output pin of the CPLD module is connected to the control input pin of the DSP chip under the control of a preset optimized and adapted control logic signal, thereby ensuring the orderly implementation of the DSP burning process and the orderly transmission of the DSP program data, while overcoming the layout limitations of related equipment in a working environment.
[0037] The DSP programming method based on CPLD in one embodiment of the present invention is as follows Figure 2 As shown. Figure 2 In this embodiment, the DSP programming device of the above embodiment is used, including:
[0038] Step 100: The CPLD module starts receiving the burning start signal from the upper computer and the confirmation process of the burning start is confirmed by the lower computer.
[0039] Step 200: After confirming the start signal, the CPLD module starts the programming mode setting process, outputs a control signal sequence, controls the DSP chip to start the SCI Mode mode, and enables the SCI communication link.
[0040] Step 300: The CPLD module transmits program data to the DSP chip through the SCI communication link and performs data verification, so that the program burning process of the DSP chip remains running and the program is updated and solidified.
[0041] Step 400: The CPLD module determines the programming process according to the state of the SCI communication pin of the DSP chip fed back by the SCI communication link, and controls the DSP chip to exit the SCI Mode and reset when it is determined that the programming process is completed.
[0042] The CPLD-based DSP burning method of the embodiment of the present invention uses the CPLD module to form a complete control logic of the DSP chip burning process to establish an automated control process for the DSP chip burning process, thereby avoiding operational errors in the manual operation of the burning process. At the same time, the automated control process enables the control of the main link part in the SCI communication link, which can be adapted to the authority control of the DSP chip by the host computer in the instruction confirmation process and the data transmission process, thereby ensuring the access security of the DSP chip-related equipment.
[0043] The specific implementation of the DSP programming method based on CPLD in one embodiment of the present invention is as follows: Figure 3 As shown. Combined Figure 2 and Figure 3 As shown, in one embodiment of the present invention, step 100 includes confirming the start signal process:
[0044] The host computer sends a start signal to the CPLD module;
[0045] The CPLD module outputs a TTL level signal of "0x12" to the lower computer;
[0046] When the lower computer detects the TTL level signal of "0x12", it simulates the TTL level signal of "0x34" and transmits it back to the upper computer;
[0047] The upper computer transmits the TTL level signal of "0x56" to the lower computer;
[0048] When the lower computer detects the TTL level signal of "0x56", it simulates the TTL level signal of "0x78" and transmits it back to the upper computer. The upper computer confirms that the programming start instruction is correctly transmitted to the lower computer.
[0049] The CPLD-based DSP burning method of the embodiment of the present invention forms a logic control signal for the burning start confirmation process between the upper computer and the lower computer (DSP chip) through the CPLD module, ensuring that the confirmation process is recognized by the upper computer and the lower computer, and avoiding unilateral accidental interruption.
[0050] Combination Figure 2 and Figure 3 As shown, in one embodiment of the present invention, step 200 includes starting the SCI Mode process:
[0051] The RST pin of the CPLD module is set low;
[0052] The BOOT0 pin of the CPLD module is set low;
[0053] The RST pin of the CPLD module is set high after a delay of 2s, so that the DSP enters the SCI Mode startup mode;
[0054] The SCI communication link between the DSP chip and the signal conversion module is enabled through the CPLD module, so that the DSP chip enables program data reception.
[0055] The DSP burning method based on CPLD of the embodiment of the present invention forms automatic control of the DSP chip startup mode and SCI communication link through the control pin of the CPLD module, ensuring the automatic state setting of the DSP chip for the burning process, thereby avoiding the reduction of the setting success rate due to the complexity of manual operation.
[0056] Combination Figure 2 and Figure 3 As shown, in one embodiment of the present invention, step 300 includes a DSP program update and curing process:
[0057] Load the boot process and program data into the DSP chip;
[0058] Prompt the DSP chip to erase the original program;
[0059] Prompts the DSP chip to start the burning process.
[0060] The specific DSP chip operation process is as follows: the host computer loads the BOOT boot routine of TI's C2000 series DSP chip (the format of the routine is TXT format, and the hexadecimal data can be directly read), and sends the data in the boot routine to the underlying board one by one through the SCI communication link. At the same time, it receives the data replied by the underlying board. When the sent data is consistent with the received data, it indicates that the operation is completed, and then the next data is sent until the sending is completed. After receiving the boot routine, the DSP chip will copy it to the DSP's RAM for operation.
[0061] The CPLD-based DSP programming method of the embodiment of the present invention ensures data verification during the programming process of the DSP chip through the CPLD module, so that the error correction, stability and execution efficiency of the programming process can be ensured through the additional verification function formed by the CPLD module.
[0062] Combination Figure 2 and Figure 3 As shown, in one embodiment of the present invention, step 400 includes a programming process to complete the reset process:
[0063] The CPLD module detects the state of the SCI output pin of the DSP chip fed back by the SCI communication link. When it detects that the TTL level input pin SCIRXDB1 and the TTL level output pin SCITXDB1 of the DSP chip are both high and maintain the high level for 5s, it is determined that the program burning is completed at this time;
[0064] The CPLD module sets the BOOT1 pin high and sends a reset signal for 1 second through the RST pin; this forms a DSP reset and runs the DSP program that has been successfully burned.
[0065] The CPLD-based DSP burning method of the embodiment of the present invention ensures that the DSP chip enters a normal startup process after burning through the CPLD module, thereby restoring the normal functions of the DSP chip and related board devices.
[0066] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A CPLD-based DSP programming device, characterized in that: include: The CPLD module is used to form the mode control logic of the DSP burning process and establish a controlled SCI communication link between the host computer and the DSP chip, receive the host computer control command through the controlled SCI link to start the burning control logic, transmit the burning data to the DSP chip, and establish the DSP burning process; The signal conversion module is used to form an uplink interface for the controlled SCI communication link to establish a wired or wireless connection with the host computer.
2. The DSP programming device based on CPLD as claimed in claim 1, characterized in that: The CPLD module adopts 10M02SCU169 series chips, the DSP chip adopts TMS320F28377S series chips, and the signal conversion module adopts MAX232AESE series chips.
3. The DSP programming device based on CPLD as claimed in claim 1, characterized in that, A matching bridge device is used between the signal conversion module and the host computer to form a bridge channel that carries the SCI communication link.
4. The DSP programming device based on CPLD as claimed in claim 3, characterized in that: The bridge channel includes an optical communication channel, a WiFi communication channel, a Bluetooth communication channel, a UWB communication channel or a wired cable communication channel.
5. The DSP programming device based on CPLD as claimed in claim 1, characterized in that: The bridge device for data connection of the signal conversion module provides an RS232 input pin and an RS232 output pin, the RS232 input pin corresponds to the RS232 level output pin MAX232_TX connected to the signal conversion module, and the RS232 output pin corresponds to the RS232 level input pin MAX232_RX connected to the signal conversion module; it also includes a TTL level output pin SCITXDB1 corresponding to the RS232 level input pin MAX232_RX and a TTL level input pin SCIRXDB1 corresponding to the RS232 level output pin MAX232_TX.
6. The DSP programming device based on CPLD as claimed in claim 5, characterized in that: The TTL level output pin SCITXDB1 and the TTL level input pin SCIRXDB1 of the signal conversion module are correspondingly connected to the first pair of TTL level input pins and TTL level output pins of the CPLD module; a direct connection circuit between pins is provided in the CPLD module, so that the first pair of TTL level input pins and TTL level output pins of the CPLD module are correspondingly directly connected to the second pair of TTL level input pins and TTL level output pins.
7. The DSP programming device based on CPLD as claimed in claim 6, characterized in that: The second pair of TTL level output pins and TTL level input pins of the CPLD module are correspondingly connected to the TTL level input pin SCIRXDB1 and the TTL level output pin SCITXDB1 of the DSP chip.
8. The DSP programming device based on CPLD as claimed in claim 7, characterized in that: The CPLD module provides an RST pin for sending a reset signal, and a BOOT0 pin and a BOOT1 pin for selecting a boot mode, which are connected to the RST pin, the GPIO84 pin and the GPIO72 pin of the DSP chip accordingly.
9. A CPLD-based DSP programming method, characterized in that: A CPLD-based DSP programming device according to any one of claims 1 to 8, comprising: The CPLD module starts receiving the burn start signal from the host computer and the confirmation process of the burn start from the lower computer; After confirming the start signal, the CPLD module starts the programming mode setting process, outputs a control signal sequence, controls the DSP chip to start the SCIMode mode, and enables the SCI communication link; The CPLD module transmits program data to the DSP chip through the SCI communication link and performs data verification, so that the program burning process of the DSP chip remains running and the program is updated and solidified; The CPLD module determines the programming process according to the state of the SCI communication pin of the DSP chip fed back by the SCI communication link, and controls the DSP chip to exit the SCIMode mode and reset when it is determined that the programming process is completed.
