![Freescale Semiconductor MC9S12ZVM series Скачать руководство пользователя страница 217](http://html1.mh-extra.com/html/freescale-semiconductor/mc9s12zvm-series/mc9s12zvm-series_reference-manual_2330602217.webp)
Chapter 6 S12Z Debug (S12ZDBGV2) Module
MC9S12ZVM Family Reference Manual Rev. 1.3
Freescale Semiconductor
217
NOTE
When a CPU indexed jump instruction is executed, the destination address
is stored to the trace buffer on instruction completion, indicating the COF
has taken place. If an interrupt occurs simultaneously then the next
instruction carried out is actually from the interrupt service routine. The
instruction at the destination address of the original program flow gets
executed after the interrupt service routine.
In the following example an IRQ interrupt occurs during execution of the
indexed JMP at address MARK1. The NOP at the destination (SUB_1) is
not executed until after the IRQ service routine but the destination address
is entered into the trace buffer to indicate that the indexed JMP COF has
taken place.
LD
X,#SUB_1
MARK1:
JMP
(0,X)
; IRQ interrupt occurs during execution of this
MARK2:
NOP
;
SUB_1:
NOP
; JMP Destination address TRACE BUFFER ENTRY 1
; RTI Destination address TRACE BUFFER ENTRY 3
NOP
;
ADDR1:
DBNE
D0,PART5
; Source address TRACE BUFFER ENTRY 4
IRQ_ISR: LD
D1,#$F0
; IRQ Vector $FFF2 = TRACE BUFFER ENTRY 2
ST
D1,VAR_C1
RTI
;
The execution flow taking into account the IRQ is as follows
LD
X,#SUB_1
MARK1:
JMP
(0,X)
;
IRQ_ISR: LD
D1,#$F0
;
ST
D1,VAR_C1
RTI
;
SUB_1:
NOP
NOP
;
ADDR1:
DBNE
D0,PART5
;
The Normal Mode trace buffer format is shown in the following tables. Whilst tracing in Normal or Loop1
modes each array line contains 2 data entries, thus in this case the DBGCNT[0] is incremented after each
separate entry. Information byte bits indicate if an entry is a source, destination or vector address.
The external event input can force trace buffer entries independent of COF occurrences, in which case the
EEVI bit is set and the PC value of the last instruction is stored to the trace buffer. If the external event
coincides with a COF buffer entry a single entry is made with the EEVI bit set.
Normal mode profiling with timestamp is possible when tracing from a single source by setting the
STAMP bit in DBGTCRL. This results in a different format (see
Table 6-47. Normal and Loop1 Mode Trace Buffer Format without Timestamp
Mode
8-Byte Wide Trace Buffer Line
7
6
5
4
3
2
1
0
Содержание MC9S12ZVM series
Страница 116: ...Chapter 2 Port Integration Module S12ZVMPIMV1 MC9S12ZVM Family Reference Manual Rev 1 3 116 Freescale Semiconductor ...
Страница 242: ...Chapter 7 ECC Generation Module SRAM_ECCV1 MC9S12ZVM Family Reference Manual Rev 1 3 242 Freescale Semiconductor ...
Страница 384: ...Chapter 10 Supply Voltage Sensor BATSV3 MC9S12ZVM Family Reference Manual Rev 1 3 384 Freescale Semiconductor ...
Страница 484: ...Chapter 13 Programmable Trigger Unit PTUV2 MC9S12ZVM Family Reference Manual Rev 1 3 484 Freescale Semiconductor ...
Страница 662: ...Chapter 17 Gate Drive Unit GDUV4 MC9S12ZVM Family Reference Manual Rev 1 3 662 Freescale Semiconductor ...
Страница 684: ...Chapter 18 LIN Physical Layer S12LINPHYV2 MC9S12ZVM Family Reference Manual Rev 1 3 684 Freescale Semiconductor ...
Страница 740: ...Chapter 19 128 KB Flash Module S12ZFTMRZ128K512V2 MC9S12ZVM Family Reference Manual Rev 1 3 740 Freescale Semiconductor ...
Страница 756: ...Appendix A MCU Electrical Specifications MC9S12ZVM Family Reference Manual Rev 1 3 756 Freescale Semiconductor ...
Страница 772: ...Appendix D LINPHY Electrical Specifications MC9S12ZVM Family Reference Manual Rev 1 3 772 Freescale Semiconductor ...
Страница 776: ...Appendix E GDU Electrical Specifications MC9S12ZVM Family Reference Manual Rev 1 3 776 Freescale Semiconductor ...
Страница 788: ...Appendix I MSCAN Electrical Specifications MC9S12ZVM Family Reference Manual Rev 1 3 788 Freescale Semiconductor ...
Страница 790: ...Appendix J Package Information MC9S12ZVM Family Reference Manual Rev 1 3 790 Freescale Semiconductor ...