• AVR Freaks

Hot!Programming Curiosity board v2 with MPLAB X

Author
djbennett163
New Member
  • Total Posts : 10
  • Reward points : 0
  • Joined: 2020/02/14 13:35:18
  • Location: 0
  • Status: offline
2020/02/24 17:55:03 (permalink)
0

Programming Curiosity board v2 with MPLAB X

I am using MPLAB X v5.30. My board shows correctly in the dashboard as PIC32MZ2048EFM144. When I try to load my board, I get this error:

Reception on endpoint 129 failed (err = -10121)

You have set the program speed to Normal. The circuit on your board may require you to slow the speed down. Please change the setting in the tool properties to low and try the operation again.

Failed to get Device ID. Please make sure the target device is attached and try the operation again.
Connection Failed.
Reception on endpoint 129 failed (err = -10121)

I can't find how to change the setting to slow in MPLAB X.
 
How do you solve this issue?
#1

17 Replies Related Threads

    Ken_Pergola
    Super Member
    • Total Posts : 2199
    • Reward points : 0
    • Joined: 2003/11/07 12:48:48
    • Status: offline
    Re: Programming Curiosity board v2 with MPLAB X 2020/02/24 21:53:41 (permalink)
    0
    Hi Doug,
     
    This may take a few minutes if you are willing to try the 'Hardware Tool Emergency Boot Firmware Recovery' (HTEBFR) option using MPLAB X IDE v5.35 recently discussed in this thread:
    https://www.microchip.com/forums/m1128487.aspx
     
    It should take a few minutes -- let us know if it helps your 'Connection Failed' issue.
    (Please report back in this thread instead of the thread in the link above.)
     
    Best regards,
     
    Ken
    #2
    djbennett163
    New Member
    • Total Posts : 10
    • Reward points : 0
    • Joined: 2020/02/14 13:35:18
    • Location: 0
    • Status: offline
    Re: Programming Curiosity board v2 with MPLAB X 2020/02/24 22:49:39 (permalink)
    0
    I followed the instructions for HTEBFR, shorted the jumpers and it seemed to work. I clicked the "make and program device" icon in MPLAB X. 
    the make window says
     
    Connecting to programmer...
     
    The PKoB4 window has
     
    *****************************************************

    Connecting to MPLAB PKoB4...
    Currently loaded versions:
    Boot version...................01.01.00
    Now Downloading new Firmware for target device: PIC32MZ2048EFM144
    Updating firmware application...
     
    [Editorial comment: several seconds delay here]

    Reception on endpoint 129 failed (err = -10121)
    Reception on endpoint 129 failed (err = -10121)
    Transmission on endpoint 2 failed
    Transmission on endpoint 2 failed
    A communication error with the debug tool has occurred. The tool will attempt to recover momentarily.
    Connection Failed.
    Transmission on endpoint 2 failed
     
    the build window ends up with message:
    The programmer could not be started: Could not connect to tool hardware: pkob4hybrid, com.micrcohip.mplab.mdbcore.pkob4.PKOB4ToolImpl
     
    subsequent tries  get error -107 fail to open access to device..
    #3
    Ken_Pergola
    Super Member
    • Total Posts : 2199
    • Reward points : 0
    • Joined: 2003/11/07 12:48:48
    • Status: offline
    Re: Programming Curiosity board v2 with MPLAB X 2020/02/25 00:48:00 (permalink)
    0
    Hello Doug,
     
    I'm so sorry you are experiencing these issues. Thank you though for trying the Emergency recovery procedure.
     
    1) What OS are you using?
     
    The customer in the thread I posted was having trouble with Windows 8.1 64-bit.
     
    2) If you shut down MPLAB X IDE v5.30, USB unplug/re-plug your Curiosity board and re-start
    MPLAB X IDE v5.30 and try to re-connect to you still experience this error?:
     
    error -107 fail to open access to device..
     
    This might have to come down to opening up a Microchip support ticket but I figured we could try some things and hence my original question and the follow-ups.
     
    Best regards,
     
    Ken
    #4
    WaltR
    Super Member
    • Total Posts : 3799
    • Reward points : 0
    • Joined: 2003/11/07 12:38:21
    • Status: offline
    Re: Programming Curiosity board v2 with MPLAB X 2020/02/25 06:37:39 (permalink)
    0
    I had the same problem and the Solution is in this thread:
    https://www.microchip.com/forums/m1128487-p2.aspx#1128717
     
    Basically the PKoB4 requires TWO WinUSB drivers installed. Check in Device Manager under Microchip Tools.
    If Two WinUSB driver are not there then look in DM from another microchip device and Manually update the driver.
    #5
    djbennett163
    New Member
    • Total Posts : 10
    • Reward points : 0
    • Joined: 2020/02/14 13:35:18
    • Location: 0
    • Status: offline
    Re: Programming Curiosity board v2 with MPLAB X 2020/02/25 09:25:11 (permalink)
    0
    I have both a Windows 7 and 10. Neither can can communicate with the curiosity 2. After doing the emergency reset, the Win 7 instance of MPLABX does try to update the firmware (Win 10 is now not even reaching this step). That version gives slightly different error:
    PKoB4 timeout during the firmware dowload process. Connection Failed. Transmission on endpoint 2 failed."
     
    The driver shown on with Win 7 is "PICkit 4 On Board Virtual COM Port" version 7.3.0.0 date 6/25/2019.
     
    For Win 10, it shows a Microchip WinUSB device. Version 1.0.2.0 date 9/10/2019. I try to update the driver pointing it to C:\Program Files (x86)\Microchip\MPLABX\v5.30\Switcher\64Bit\winusb\amd64, but it says the best device is already installed.
    #6
    WaltR
    Super Member
    • Total Posts : 3799
    • Reward points : 0
    • Joined: 2003/11/07 12:38:21
    • Status: offline
    Re: Programming Curiosity board v2 with MPLAB X 2020/02/26 13:42:27 (permalink)
    0
    As I STATED in my post above there MUST be TWO WinUSB drivers showing under Microchip Tools.
    If not then you must find the other instance of the PKoB4 in Device Manager and check its properties. Most likely it is a Microsoft driver install- then manually update drive to Microchip.
     
    djbennett163
     The driver shown on with Win 7 is "PICkit 4 On Board Virtual COM Port" version 7.3.0.0 date 6/25/2019.

    This would be the Third Drive associated with the PKoB4 and is NOT used for Programing/Debugging.
    The Curiosity "Getting Started" programming example uses this third Virtual Com driver.
     
    There is still another Hidden in Device Manager somewhere.
    #7
    djbennett163
    New Member
    • Total Posts : 10
    • Reward points : 0
    • Joined: 2020/02/14 13:35:18
    • Location: 0
    • Status: offline
    Re: Programming Curiosity board v2 with MPLAB X 2020/02/26 15:07:58 (permalink)
    0
    Upon closer inspection of Device Manager, I see there is something under Ports: PICkit 4 On Board Virtual COM Port. This driver also says it is up to date when I try to get it to update from the ../MPLABX..../amd64 directory.
    #8
    WaltR
    Super Member
    • Total Posts : 3799
    • Reward points : 0
    • Joined: 2003/11/07 12:38:21
    • Status: offline
    Re: Programming Curiosity board v2 with MPLAB X 2020/02/26 15:53:04 (permalink)
    0
    This board/PKoB4 is odd and tough to get working first time.
    Worse is it worked properly on two other PC with doffernet windows OS, but on two other the second driver needed to be manually installed (updated).
     
    I am with mine now so can check things.
    I do not see a Virtual Comm but do have 2 WinUSB driver.
     
    Have you tried doing the Emergency Boot Firmware recovery?
    If not do this. Then look for a non-microchip driver.
     
    Does the Curiosity 2.0 board blink LEDs when powered?
    Mine did with a pre-installed program.
     
    Once you finally get the drivers working then you will discover the other problems (errors) on this dev board.
     
    I have another idea. That is some program is in the PIC32 and using the Debug port as a virtual Comm (the 'getting started" EZ 2.0 example does this). I tried that example and it killed MPLAB X. I thought it bricked the dev board.
    To recover:
    Unplug the USB.
    Open MPLAB X IDE or IPE.
    Hold the Reset button and do not let go.
    Plug in the USB and check in Device Manager for which drivers got installed.
    IF correct then program into the
    PIC32 (with the reset button held down) a program does does not use the Virtual com.
    IF two WinUSB driver do not show under Microchip Tools then find and update as above.
     
    post edited by WaltR - 2020/02/27 07:13:45
    #9
    djbennett163
    New Member
    • Total Posts : 10
    • Reward points : 0
    • Joined: 2020/02/14 13:35:18
    • Location: 0
    • Status: offline
    Re: Programming Curiosity board v2 with MPLAB X 2020/02/27 08:54:25 (permalink)
    0
    Trying the msd_multiple_luns project (in sample code for curiosity 2 board) is no different. What about this message

    Reception on endpoint 129 failed (err = -10121)
    You have set the program speed to Normal. The circuit on your board may require you to slow the speed down. Please change the setting in the tool properties to low and try the operation again.
     
    Where in MPLAB x is "tool properties" so that I can set speed low?
    #10
    ric
    Super Member
    • Total Posts : 26159
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Programming Curiosity board v2 with MPLAB X 2020/02/27 14:46:36 (permalink)
    0
    djbennett163
    ...
    Where in MPLAB x is "tool properties" so that I can set speed low?

    Inside your project settings.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #11
    djbennett163
    New Member
    • Total Posts : 10
    • Reward points : 0
    • Joined: 2020/02/14 13:35:18
    • Location: 0
    • Status: offline
    Re: Programming Curiosity board v2 with MPLAB X 2020/02/27 16:47:24 (permalink)
    0
    Ok, I did find the path Project Properties > PKoB4 from tree > Option Categories > Program Speed > Low.
     
    Still fails after Emergency Boot Firmware Recovery, then Make and Program Device. This output to PKoB4 tab:

    *****************************************************

    Connecting to MPLAB PKoB4...
    Currently loaded versions:
    Boot version...................01.01.00
    Now Downloading new Firmware for target device: PIC32MZ2048EFM144
    Updating firmware application...
    Reception on endpoint 129 failed (err = -10121)
    Reception on endpoint 129 failed (err = -10121)
    Transmission on endpoint 2 failed
    Transmission on endpoint 2 failed
    A communication error with the debug tool has occurred. The tool will attempt to recover momentarily.
    Connection Failed.
    Transmission on endpoint 2 failed
    #12
    WaltR
    Super Member
    • Total Posts : 3799
    • Reward points : 0
    • Joined: 2003/11/07 12:38:21
    • Status: offline
    Re: Programming Curiosity board v2 with MPLAB X 2020/02/28 07:32:26 (permalink)
    0
    1- If all is working properly NORMAL Speed is correct.
     
    2- djbennett163
    What does the Microchip Tools drivers look like in Device Manager??? Still suspecting driver install issue.
    3- Did you try other USB cables (Pic kits are sensitive to cable quality)?
    4- Try a different USB port on the PC like on the back instead of the front.
    5- Sounds like the "Emergency Boot Firmware Recovery" did work correctly. It that so??
    It showed an ATxxx driver after sorting the pins????
    6- Did you try holding the PIC32 RESET BUTTON???
     
    Transmission on endpoint 2 failed
    Is not having BOTH WinUSB drivers installed.
    #13
    djbennett163
    New Member
    • Total Posts : 10
    • Reward points : 0
    • Joined: 2020/02/14 13:35:18
    • Location: 0
    • Status: offline
    Re: Programming Curiosity board v2 with MPLAB X 2020/02/28 10:20:41 (permalink)
    0
    Walt,
    It is good of you to help debug this issue. It appears my screen shot images of device manager are not getting pasted in. After an emergency reset,  I get a Microchip WinUSB device in Microchip Tools category, and in ports and coms I have a PICkit4 on board virtual COM Port.
     
    After the emgergency reset, but before attempting to program, that later is not shown.   After restarting MPLABX, the curiosity board is found. There is still no virtual COM port shown.  When I click "make and program device", I get a pop up saying the last tool used for the project is unavailable. A list of tools is shown that has both Microchip kits >> Curiosity starter/PKOB4..., and Hardware tools >> pickit4  serial number 45466 etc.  Neither of these work, so I  switched to my Windows 7 computer and did emergency reset again. The device shown there is a PICkit4 On Board Virtual COM port.  It times out here as well.  This to me is an indication that the issue is not related to the drivers on Window 10 or Window 7; it is neither or both.  I have tried various usb ports. 
     
     
    plugging it in while holding the reset has no effect. It is loaded with the blinking led program, and it blinks both before and after pressing reset.
     

    #14
    ric
    Super Member
    • Total Posts : 26159
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Programming Curiosity board v2 with MPLAB X 2020/02/28 13:50:39 (permalink)
    0
    The address you used is
    https://www.pastepic.xyz/image/devafter.QTr5g
    That is a web page, not an image link.
    They do that so people have to see their advertising while viewing the image.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #15
    WaltR
    Super Member
    • Total Posts : 3799
    • Reward points : 0
    • Joined: 2003/11/07 12:38:21
    • Status: offline
    Re: Programming Curiosity board v2 with MPLAB X 2020/03/02 10:11:43 (permalink)
    0
    Just saw:
    much improved in MPLAB 5.35 which you can download here: https://www.microchip.com/mplabx-ide-windows-installer
     
    Please give it a try and see if there is improvement.
    #16
    djbennett163
    New Member
    • Total Posts : 10
    • Reward points : 0
    • Joined: 2020/02/14 13:35:18
    • Location: 0
    • Status: offline
    Re: Programming Curiosity board v2 with MPLAB X 2020/03/26 19:36:48 (permalink)
    0
    I upgraded to 5.35. I had to install in in a new directory to get it to work.
    #17
    ric
    Super Member
    • Total Posts : 26159
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Programming Curiosity board v2 with MPLAB X 2020/03/26 19:51:06 (permalink)
    0
    djbennett163
    ...
    I had to install in in a new directory to get it to work.

    You should do that each time anyway.
    That gives you the chance to step back to the previous version if there's a problem with a new one.
    Up to you how many previous versions you keep.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #18
    Jump to:
    © 2020 APG vNext Commercial Version 4.5