0
\$\begingroup\$

Target Device ID (0x7bf0000) is an Invalid Device ID. Please check your connections to the Target Device. although all connections correct status of the dspic3F is working well

Using MPLABX the above message appears

target voltage detected


even when reading it reads but://///


Connecting to MPLAB ICD 3...

Currently loaded firmware on ICD 3 Firmware Suite Version.....01.51.08 Firmware type..............dsPIC33F/24F/24H

Target voltage detected Target Device ID (0x7bf0000) is an Invalid Device ID. Please check your connections to the Target Device.

Reading...

The following memory area(s) will be read: program memory: start address = 0x0, end address = 0x2abff configuration memory User Id Memory Read complete


Connecting to MPLAB ICD 3...

Currently loaded firmware on ICD 3 Firmware Suite Version.....01.51.08 Firmware type..............dsPIC33F/24F/24H

Target voltage detected Target device dsPIC33FJ256MC710A found. Device ID Revision = 3004

Reading...

The following memory area(s) will be read: program memory: start address = 0x0, end address = 0x2abff configuration memory User Id Memory Read complete

Also could you check the configuration bits

// DSPIC33FJ256MC710A Configuration Bit Settings
// 'C' source line config statements
// FBS
#pragma config BWRP = WRPROTECT_OFF      // Boot Segment Write Protect (Boot segment is write-protected)
#pragma config BSS = SMALL_FLASH_STD    // Boot Segment Program Flash Code Protection (Standard Security, Small-sized Boot Flash)
#pragma config RBS = NO_RAM             // Boot Segment RAM Protection (No Boot RAM)

// FSS
#pragma config SWRP = WRPROTECT_OFF     // Secure Segment Program Write Protect (Secure Segment may be written)
#pragma config SSS = NO_FLASH           // Secure Segment Program Flash Code Protection (No Secure Segment)
#pragma config RSS = NO_RAM             // Secure Segment Data RAM Protection (No Secure RAM)

// FGS
#pragma config GWRP = OFF               // General Code Segment Write Protect (User program memory is not write-protected)
#pragma config GSS = OFF                // General Segment Code Protection (User program memory is not code-protected)

// FOSCSEL
#pragma config FNOSC = LPRCDIVN         // Oscillator Mode (Internal Fast RC (FRC) with divide by N)
#pragma config IESO = ON                // Two-speed Oscillator Start-Up Enable (Start up with FRC, then switch)

// FOSC
#pragma config POSCMD = NONE            // Primary Oscillator Source (Primary Oscillator Disabled)
#pragma config OSCIOFNC = OFF           // OSC2 Pin Function (OSC2 pin has clock out function)
#pragma config FCKSM = CSDCMD           // Clock Switching and Monitor (Both Clock Switching and Fail-Safe Clock Monitor are disabled)

// FWDT
#pragma config WDTPOST = PS32768        // Watchdog Timer Postscaler (1:32,768)
#pragma config WDTPRE = PR128           // WDT Prescaler (1:128)
#pragma config PLLKEN = ON              // PLL Lock Enable bit (Clock switch to PLL source will wait until the PLL lock signal is valid.)
#pragma config WINDIS = OFF             // Watchdog Timer Window (Watchdog Timer in Non-Window mode)
#pragma config FWDTEN = ON              // Watchdog Timer Enable (Watchdog timer always enabled)

// FPOR
#pragma config FPWRT = PWR128           // POR Timer Value (128ms)
#pragma config LPOL = ON                // Low-side PWM Output Polarity (Active High)
#pragma config HPOL = ON                // Motor Control PWM High Side Polarity bit (PWM module high side output pins have active-high output polarity)
#pragma config PWMPIN = ON              // Motor Control PWM Module Pin Mode bit (PWM module pins controlled by PORT register at device Reset)

// FICD
#pragma config ICS = PGD1               // Comm Channel Select (Communicate on PGC1/EMUC1 and PGD1/EMUD1)
#pragma config JTAGEN = OFF             // JTAG Port Enable (JTAG is Disabled)

// #pragma config statements should precede project file includes.
// Use project enums instead of #define for ON and OFF.

#include <xc.h>

-- after trying on another PC with another MPLABVersion V8.92 no target device ID message but the following popup appears "code protection warning" You are trying to program over code protected areas of the device. To do this you must select segment programming on the Secure Segment property page and indicate which segments of the device you wish to program

code protection warning

message Failed to program device:

You are trying to change protected boot memory. In order to do this you must select the "Boot, Secure and General Segments" option on the debug tool Secure Segment properties page.

succeeded in old MPLAB /other PC but how this ▲ can be done in MPLAB X

\$\endgroup\$
  • \$\begingroup\$ are ICSPDAT and ICSPCLK connected to your circuit or only to programmer ? \$\endgroup\$ – johnger May 22 '18 at 10:26
  • \$\begingroup\$ Which OS? Has it ever worked correctly? \$\endgroup\$ – HandyHowie May 22 '18 at 10:27
  • \$\begingroup\$ Have you tried this already ? electronics.stackexchange.com/a/363780/139284 \$\endgroup\$ – Abel Tom May 22 '18 at 11:41
  • \$\begingroup\$ PGEC2, PGED2 are connected without any pullups or pulldowns or any capacitors \$\endgroup\$ – O3bydullah Omar May 23 '18 at 2:58
  • \$\begingroup\$ Which OS? OS windows 10 Has it ever worked correctly? – Yes \$\endgroup\$ – O3bydullah Omar May 23 '18 at 3:00
1
\$\begingroup\$

This message is typically caused by device mismatch in MPLAB. Check whether device set in the project matches one connected to the ICD and change if necessary.

\$\endgroup\$
  • \$\begingroup\$ what is meant by mismatch in mPLAB where is the Project matches can be found in MPLABX \$\endgroup\$ – O3bydullah Omar May 23 '18 at 3:04
  • \$\begingroup\$ please see updates on the main question when connecting to other MPLAB on other PC, \$\endgroup\$ – O3bydullah Omar May 23 '18 at 4:04
0
\$\begingroup\$

The reason is the system at all mainly including the connections, even the connection cable is ok with multimeter continuity tester "buzzer" but it should be fixed very well, voltages of your PC should be stable, windows system and MPLAB software configurations or settings check everything try same with different machine "PC"


Now it is Working well after returning back to MPLAB X I think the problem as Oleg mentioned, "Mismatch" Thank you Connecting to MPLAB ICD 3...

Currently loaded firmware on ICD 3 Firmware Suite Version.....01.51.08 Firmware type..............dsPIC33F/24F/24H

Target voltage detected Target device dsPIC33FJ256MC710A found. Device ID Revision = 3004

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.