Datasheet

Executions modes
Stop — Engine execution is stopped. The current instruction is executed and then execution stopped.
Step — Execute the instruction at the location pointed by the Program Counter, increment the Program Counter by one and
then reset ENG1_EXEC bits to 00 (enter Stop-mode).
Execute Command — Execute the instruction pointed by the current Program Counter value and reset ENG1_EXEC to 00
(i.e. enter Stop-mode). The difference between Step and Execute Command is that Execute Command does not increment the
Program Counter.
Free Run — Start program execution from the instruction pointed by the Program Counter.
30187021
FIGURE 11. Code Memory Tab
DEBUGGING CONSIDERATIONS
There are a few ways to see how the compiler translates the instructions to machine code. Listing file (*.lst) may be used for locating
assembling errors. The listing file contains the source code along with the compiled machine code. You can examine the files in
any text editor. This is helpful for debugging and seeing how source code is translated into machine code. Figure 12 shows an
example of listing file. The first column is the row number, second column indicates the SRAM memory address, third shows the
machine code data and fourth column includes the source code. Note that the .segment directives show the start address of the
program, i.e., where to the Program Counters should point.
From the produced two hex-files user can see the pure machine code represented in hexadecimal in two different ways. In *.he2
—file representation of data is 0xYY (YY being the changing data information). In *.hex file the data is represented YY, where YY
is the changing data information. In *.he2 file the 8-bit long data elements are separated with comma whereas in *.hex file they are
separated with tab. In both files data is represented like in Code memory tab memory table. First two columns correspond to first
column in Code memory tab memory table, third and fourth columns correspond to second column etc. For example, if the user
would have mux_inc instruction (9D80), in he2 it would be 0x9D, 0x80, and in hex file it would be 9D [tab] 80. In hex-file the start
addresses of the programs are at the bottom whereas in *.he2 file they are on the first row engine 1 start address being first, engine
2 second, and engine 3 start address third. Also in the bin-file user can see the pure machine code represented in binary. First
three rows represent the start addresses of the programs. After the start addresses the program code follows.
Programs can be debugged in the evaluation software Program tab by running the program in steps using Step or Execute com-
mand execution modes. Also one way to see what is written to the LP5523 is to look at the evaluation program History tab Figure
13.
AN-2227 - LP5523 Evaluation Kit
12 Copyright © 1999-2012, Texas Instruments Incorporated