Cannot program PIC32MX250F128B with Segger J-Link

Thread Starter

polelum

Joined Jun 2, 2018
1
Hi,

I'm trying to program custom board with PIC32MX250F128B using Segger J-Link edu and MPLAB X v4.15. I have installed the drivers and J-Link plugin and I'm using 4-wire JTAG. When I try to program the device, I get the following error:

Connection Failed
Comm library returned an error code of -261, No CPU found.

I've also tried connecting to the device using J-Link Commander and here is what I got:

Connecting to target via JTAG
TotalIRLen = 5, IRPrint = 0x01
JTAG chain detection found 1 devices:
#0 Id: 0x14D00053, IRLen: 05, Microchip MTAP
TotalIRLen = 5, IRPrint = 0x01
JTAG chain detection found 1 devices:
#0 Id: 0x14D00053, IRLen: 05, Microchip MTAP

****** Error: PIC32 JTAG (connect): Timeout while halting CPU. CPU never enters debug mode.
TotalIRLen = 5, IRPrint = 0x01
JTAG chain detection found 1 devices:
#0 Id: 0x14D00053, IRLen: 05, Microchip MTAP
TotalIRLen = 5, IRPrint = 0x01
JTAG chain detection found 1 devices:
#0 Id: 0x14D00053, IRLen: 05, Microchip MTAP
Cannot connect to target.

It seems that JTAG sees the device, but cannot connect to it. As far as I know, the MCU was not programmed before. I'm pretty sure everything is properly connected, but the thing that bothers me is that Vref for J-Link is from Arduino, since there is no pin for Vref on the board. I've read that adding pull-up and pull-down resistors is sometimes recommended, but I don't know if this is the kind of problem that can be solved with additional resistors.

Since I have virtually no experience with PIC, I don't really know where to look for solution, so any help will be appreciated.
 
Top