Unable to debug PIC16LF18323 with PICkit3 using MPLABX
I'm attempting to debug a PIC16LF18323 in MPLABX without success, repeatedly getting the following messages:
In the PICkit 3 dialogue tab:
"Programming/Verify completeThe target device is not ready for debugging. Please check your configuration bit settings and program the device before proceeding. The most common causes for this failure are oscillator and/or PGC/PGD settings.
and in the Debugger Console dialog tab:
"LaunchingProgramming targetFailed to program the target deviceThe debugger could not be started. Terminating debug session.User program finished
I've done a lot of forum trawling and re-read both the device datasheet and the document "PICkit™ 3 In-Circuit Debugger/Programmer User’s Guide For MPLAB® X IDE" looking for clues. I'm running out of things to try an now I'm a bit stumped. Other aspects of this which are/may be significant are as follows:
1. Target operating voltage is 2.0V, power is supplied externally and the PICkit3 is configured accordingly.
2. PICkit3 is connected to the PC with the standard short USB cable without any intervening hub.
3. PICkit3 is connected to target with a short (~100mm) ribbon cable and short (~10mm) PCB tracks.
4. MCLR, ICSPDAT and ICSPCLK pins on the PIC are not connected to anything other than the PICkit3.
5. MPLAB is able to program code into the PIC and the PIC is able to execute the code correctly when not attempting to use debug mode.
6. The PICkit is a late build standard and so the engineering technical note ETN-32 (PICkit 3 Operation at Low Voltage - Modification) does not apply. Just to be sure I've checked the internal components in the PICkit3.
7. The following are disabled in configuration bits: watchdog, program memory protection, data memory protection, low voltage programming, background debugger (also tried debugger setting enabled - no joy).
8. Configuration bits have been programmed using __CONFIG directives using the text strings generated by MPLAB. The .lst file generated by MPLAB shows the correct config word values at the correct addresses.
9. System clock is HFINTOSC. Problem exists at all frequencies tried (4MHz, 8MHz, 16MHz).
10. Same problem occurs with multiple new PICs.
11. All connections are robust (ie no intermittent connections).
Any assistance would be gratefully received.
post edited by Oooh_nice_shed - 2019/04/14 12:01:16