English
Language : 

PIC18LF24K Datasheet, PDF (164/594 Pages) –
PIC18(L)F26/45/46K40
13.11.7 IN-CIRCUIT DEBUG (ICD)
INTERACTION
The scanner freezes when an ICD halt occurs, and
remains frozen until user-mode operation resumes.
The debugger may inspect the SCANCON0 and
SCANLADR registers to determine the state of the
scan.
The ICD interaction with each operating mode is
summarized in Table 13-4.
TABLE 13-4: ICD AND SCANNER INTERACTIONS
Scanner Operating Mode
ICD Halt
Peek
Concurrent
Triggered
Burst
External
Halt
PC
Breakpoint
Data
Breakpoint
Single Step
SWBP and
ICDINST
If scanner would peek an
instruction that is not executed
(because of ICD entry), the peek
will occur after ICD exit, when the
instruction executes.
If external halt is asserted during
a scan cycle, the instruction
(delayed by scan) may or may
not execute before ICD entry,
depending on external halt
timing.
If external halt is asserted during
the cycle immediately prior to the
scan cycle, both scan and
instruction execution happen
after the ICD exits.
Scan cycle occurs before ICD
entry and instruction execution
happens after the ICD exits.
The instruction with the dataBP
executes and ICD entry occurs
immediately after. If scan is
requested during that cycle, the
scan cycle is postponed until the
ICD exits.
If a scan cycle is ready after the
debug instruction is executed,
the scan will read PFM and then
the ICD is re-entered.
If scan would stall a SWBP, the
scan cycle occurs and the ICD is
entered.
If external halt is asserted during
the BSF(SCANCON.GO), ICD
entry occurs, and the burst is
delayed until ICD exit.
Otherwise, the current NVM-
access cycle will complete, and
then the scanner will be
interrupted for ICD entry.
If external halt is asserted during
the burst, the burst is suspended
and will resume with ICD exit.
If PCPB (or single step) is on
BSF(SCANCON.GO), the ICD is
entered before execution;
execution of the burst will occur
at ICD exit, and the burst will run
to completion.
Note that the burst can be
interrupted by an external halt.
If SWBP replaces
BSF(SCANCON.GO), the ICD will
be entered; instruction execution
will occur at ICD exit (from
ICDINSTR register), and the
burst will run to completion.
13.11.8 PERIPHERAL MODULE DISABLE
Both the CRC and scanner module can be disabled
individually by setting the CRCMD and SCANMD bits
of the PMD0 register (Register 7-1). The SCANMD can
be used to enable or disable to the scanner module
only if the SCANE bit of Configuration Word 4 is set. If
the SCANE bit is cleared, then the scanner module is
not available for use and the SCANMD bit is ignored.
 2016 Microchip Technology Inc.
Preliminary
DS40001816C-page 164