Datasheet

Emulator User’s Guide for MPLAB X IDE
DS52085A-page 88 2013 Microchip Technology Inc.
Q: I cannot get trace to work. What’s wrong?
A: Consider the following:
- Certain tool versions are required to use trace. Please refer to either Chapter
6. “Specific Debug Functions: 8- and 16-Bit Devices” or Chapter
7. “Specific Debug Functions: 32-Bit Devices”.
- For dsPIC30F/33F and PIC24F/H devices, only C code can be used with trace,
not assembly.
- In-line assembly code (assembly code within C code) cannot be traced.
- Code must be rebuilt and reprogrammed when trace macros are added.
- Ensure you do not have trace macros disabled on the Build Options Trace tab.
- Native trace, data captures and runtime watches cannot be used together.
- The target clock frequency must be reported to MPLAB IDE on the Settings
Clock tab for Native and SPI trace.
- For Port I/O Trace, all 8 pins must be dedicated to trace (i.e., not multiplexed
with the currently used PGC and PGM pins.)
- For Port I/O Trace, ensure that the chosen port is able to output 0x00 and 0xFF.
As a test, set the port TRIS to 0 (all outputs) and set the LAT to a value in the
watch window. The value written to LAT should appear on the port pins.
Q: My program halts while I am tracing, corrupting my trace data. What’s happening?
A: The Watchdog timer can cause this behavior. Ensure it is disabled by properly
setting the configuration bits
Q: My PC went into power-down/hibernate mode, and now my emulator won’t work.
What happened?
A: When using the emulator for prolonged periods of time, and especially as a
debugger, be sure to disable the Hibernate mode in the Power Options Dialog
window of your PC’s operating system. Go to the Hibernate tab and clear or
uncheck the “Enable hibernation” check box. This will ensure that all
communication is maintained across all the USB subsystem components.
Q: I set my peripheral to NOT freeze on halt, but it is suddenly freezing. What's going
on?
A: For dsPIC30F/33F and PIC24F/H devices, a reserved bit in the peripheral
control register (usually either bit 14 or 5) is used as a Freeze bit by the debug-
ger. If you have performed a write to the entire register, you may have overwritten
this bit. (The bit is user accessible in Debug mode.)
To avoid this problem, write only to the bits you wish to change for your applica-
tion (BTS, BTC) instead of to the entire register (MOV).