• AVR Freaks

Hot!Reception on endpoint 129 failed (err = -10121)

Author
Victor_Gorn
New Member
  • Total Posts : 5
  • Reward points : 0
  • Joined: 2020/02/16 00:09:33
  • Location: Israel
  • Status: offline
2020/02/19 02:50:15 (permalink)
0

Reception on endpoint 129 failed (err = -10121)

Hello my Friends,
 
i am trying to debug my program in the PIC24FJ128GA010 on MPLAB X IDE v5.30 thru ICD4 but everytime get some errors.
The program is very short and simple to work with SPI2 EXTERNAL FLASH.
The harware has the power from ICD4, the hardware is pullups 3k to PGC1 and PGD1 and 47k to MCLR.
I can some times read and write/verify from/to IC, but usually i have problem with this also.
 
*****************************************************
// PIC24FJ64GA006 Configuration Bit Settings
**********************************************************************************
 
// CONFIG2
#pragma config POSCMOD = NONE          // Primary Oscillator Select (Primary oscillator disabled)
#pragma config OSCIOFNC = ON                // Primary Oscillator Output Function (OSC2/CLKO/RC15 functions as port I/O (RC15))
#pragma config FCKSM = CSDCMD            // Clock Switching and Monitor (Clock switching and Fail-Safe Clock Monitor are disabled)
#pragma config FNOSC = FRCPLL                // Oscillator Select (Fast RC Oscillator with PLL module (FRCPLL))
#pragma config IESO = OFF                          // Internal External Switch Over Mode (IESO mode (Two-Speed Start-up) disabled)
 
// CONFIG1
#pragma config WDTPS = PS1024              // Watchdog Timer Postscaler (1:1,024)
#pragma config FWPSA = PR32                   // WDT Prescaler (Prescaler ratio of 1:32)
#pragma config WINDIS = OFF                    // Watchdog Timer Window (Windowed Watchdog Timer enabled; FWDTEN must be 1)
#pragma config FWDTEN = OFF                  // Watchdog Timer Enable (Watchdog Timer is disabled)
#pragma config ICS = PGx1                           // Comm Channel Select (Emulator/debugger uses EMUC1/EMUD1)
#pragma config GWRP = OFF                       // General Code Segment Write Protect (Writes to program memory are allowed)
#pragma config GCP = OFF                           // General Code Segment Code Protect (Code protection is disabled)
#pragma config JTAGEN = OFF                    // JTAG Port Enable (JTAG port is disabled)
 
// #pragma config statements should precede project file includes.
// Use project enums instead of #define for ON and OFF.
 
#include <xc.h>
 
 The output from ICD4 is:
 
**************  Programming is good sometimes  ********************
Connecting to MPLAB ICD 4...
 
Currently loaded versions:
Application version............01.06.28
Boot version...................01.00.00
FPGA version...................01.00.00
Script version.................00.03.33
Script build number............0540a22e50
ICD4 is supplying power to the target (3.25 volts).
Target device PIC24FJ64GA006 found.
Device Revision Id  = 0x3044
 
Calculating memory ranges for operation...
 
Erasing...
 
The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x3ff
configuration memory
 
Programming/Verify complete
 
****************  Reading is good sometimes  ************************
The following memory area(s) will be read:
program memory: start address = 0x0, end address = 0xabfb
configuration memory
 
Read complete
 
****************  Debugging is always not good  ************************
Connecting to MPLAB ICD 4...
 
Currently loaded versions:
Application version............01.06.28
Boot version...................01.00.00
FPGA version...................01.00.00
Script version.................00.03.33
Script build number............0540a22e50
ICD4 is supplying power to the target (3.25 volts).
Target device PIC24FJ64GA006 found.
Device Revision Id  = 0x3044
 
Calculating memory ranges for operation...
 
Erasing...
 
The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x3ff
configuration memory
 
A communication error with the debug tool has occurred. The tool will attempt to recover momentarily.
_____________________  Debugger Console _________________________
Launching
Programming target
Failed to program the target device
The debugger could not be started.  Terminating debug session.
User program finished
 
************ Program Device for Debugging is always not good   ********************
 
Connecting to MPLAB ICD 4...
 
Currently loaded versions:
Application version............01.06.28
Boot version...................01.00.00
FPGA version...................01.00.00
Script version.................00.03.33
Script build number............0540a22e50
ICD4 is supplying power to the target (3.25 volts).
Target device PIC24FJ64GA006 found.
Device Revision Id  = 0x3044
 
Calculating memory ranges for operation...
 
Erasing...
 
The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x3ff
configuration memory
 
Reception on endpoint 129 failed (err = -10121)
A communication error with the debug tool has occurred. The tool will attempt to recover momentarily.
 
__________________________    SPI_EEPROM Program ________________________
Connecting to programmer...
Programming target...
The programmer could not be started: Failed to program the target device.
 
 
 
 
Please tell me what i am doing wrong, it should be so simple.
If You need some other info or tests, please tell me.
 
Thank You.
Regards
Victor
 
#1

0 Replies Related Threads

    Jump to:
    © 2020 APG vNext Commercial Version 4.5