• AVR Freaks

Hot!PICkit4 not recognized in Matlab environment

Author
abruyere
New Member
  • Total Posts : 3
  • Reward points : 0
  • Joined: 2019/11/05 09:35:05
  • Location: 0
  • Status: offline
2019/11/06 01:01:18 (permalink)
0

PICkit4 not recognized in Matlab environment

Hi all,
 
During last months, I was working with the following configuration without any problem:
- MPLab-X IDE v5.05
- Matlab R2019a
- MPLAB device block v3.44 + picpatch_v3_44_03.p
- PICkit3
- DSPIC33EP256MC502
- Compiler xc16-v1.36B
 
Last week, I tried on the same setup to replace my PICkit3 by a PICkit4. New PICkit has been recognized without any problem by MPLab-X but not by Matlab, so Yesterday, I tried to update to the following software versions:
- MPLab-X IDE v5.30
- MPLAB device block v3.45
 
It still works without issue with my PICkit3, but the PICkit4 is still not recognized in Matlab environment whereas it works perfectly in MPLAB-X environment.
 
Is there any configuration I forgot?
Thank you in advance for your feedback, best regards.
#1

15 Replies Related Threads

    Lubin
    Moderator
    • Total Posts : 383
    • Reward points : 5
    • Joined: 2007/03/31 07:38:15
    • Location: Bayonne, France
    • Status: offline
    Re: PICkit4 not recognized in Matlab environment 2019/11/06 03:13:11 (permalink)
    0
    Hi,
     
    Please try the following:
    Simulink top menu bar => Microchip => Select Programmer => IPE interface (instead of default MDB interface)
    In the wiorkspace you should get:
    Refreshing list of programmer attached.

    Check programmer connected with IPE ...
    1 programmer found.
    - PICkit 4 S.No : BURXXXXXXXXX
    (tested with blockset v3.45.05 and MPLAB X 5.25)
     
    With default seeting pickit4 is not recognized. Thanks for reporting the issue.
     
    Lubin
     
     
     
     
    #2
    abruyere
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2019/11/05 09:35:05
    • Location: 0
    • Status: offline
    Re: PICkit4 not recognized in Matlab environment 2019/11/06 05:55:01 (permalink)
    0
    Hi, thank you for your answer. Unfortunatly, my PICkit4 is still not recognized in Matlab environment even using IPE interface in MICROCHIP menu.
     
    To solve my issue, I programmed with success the .hex file generated by Matlab using MPLAB-X-IPE v5.30. It works perfectly. Even if I can work like this, if you find a solution to use Matlab environment for the whole process, I am still interested.
     
    Best regards, thanks again.
     
     
     
    #3
    Lubin
    Moderator
    • Total Posts : 383
    • Reward points : 5
    • Joined: 2007/03/31 07:38:15
    • Location: Bayonne, France
    • Status: offline
    Re: PICkit4 not recognized in Matlab environment 2019/11/06 07:51:34 (permalink)
    0
    Hi, 
     
    I was not able to reproduce the issue with IPE interface and MPLAB X 5.30.
    Do you get any error message at the Matlab prompt when refreshing the programmer list ?
     
    Which windows version are you using ? Anything specific with your setup (MPLAB X not installed to its default folder or similar things ?)
     
    Lubin
    #4
    abruyere
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2019/11/05 09:35:05
    • Location: 0
    • Status: offline
    Re: PICkit4 not recognized in Matlab environment 2019/11/06 09:43:47 (permalink)
    0
    Hi, thank you again for your answer.
     
    I tried to create a new blank model and the only message I have in Matlab prompt about programmer is the following:
     
    "Refreshing list of programmer attached.
    Check programmer connected with IPE ...
    0 programmer found."
     
    If now I switch to PICkit3 using MDB, I have the following message:
     
    "Refreshing list of programmer attached.
    Check programmer connected with MDB ...
    3 programmer found.
    - 4:54:51 PM com.microchip.packslib.packutilities.HttpConnectionFactory openHttpUrlConnection
    - 4:54:51 PM com.microchip.packslib.packutilities.HttpConnectionFactory openHttpUrlConnection
    - PICkit 3(BUR134964505)"
     
     
    All my programs are installed in default path. I work in Windows 10 environment.
     
    The only specific element of configuration I guess is the following: My windows session is configured without administrator rights. I tried to install the mplab device block toolbox using two methods: Launching Matlab with or without admin rights. The best solution was finally to install the toolbox launching Matlab without admin rights because when I launch Matlab with admin rights and then I install the toolbox, the files are installed in a folder belonging to the administrator, and it looks like the toolbox requires to have writing access to this folder. So the problem comes when I use Matlab normally, without admin rights, I have an error message when I try to update the list of available programmers with MDB interface (to use my PICkit3): "The path 'C:\Users\adminlocal\appdat\roaming\mathworks\MATLAB Add-Ons\Toolboxes\MMPLAB Device Blocks for Simulink\blocks\picflash_mdb_hwtool.txt' does not exist." In case of IPE interface configuration, I have no error but PICkit4 is still not recognized. 
     
     
    Hope this explaination about non-admin rights session is a begining of a solution...
     
    Best regards, Antoine.
    #5
    Lubin
    Moderator
    • Total Posts : 383
    • Reward points : 5
    • Joined: 2007/03/31 07:38:15
    • Location: Bayonne, France
    • Status: offline
    Re: PICkit4 not recognized in Matlab environment 2019/11/06 14:04:18 (permalink)
    0
    Hi Antoine,
     
    Phantom programmers appearing with MPLAB X 5.30 and MPLAB blockset prior to 3.45.05 are fixed in later blockset release (to be published).
     
    I do not know yet the cause with your setup of PicKit 4 not find with IPE interface. To dig further.
    I do use Windows 7 however I do not think this might change anything as all required script seems running without errors.
     
    Lubin
     
     
    #6
    sassi14
    New Member
    • Total Posts : 9
    • Reward points : 0
    • Joined: 2019/11/07 04:07:30
    • Location: 0
    • Status: offline
    Re: PICkit4 not recognized in Matlab environment 2019/11/07 09:46:12 (permalink)
    0
    Bonsoir Lubin,
     
    Pareil pour moi j'ai le PIC kit4 et le Atmel-ICE qui fonctionne très bien avec le MPLABX IPE v5.30 mais pas avec simulink, du coup je genre le hex avec simulink et je flash avec MPLABX IPE
     
    Cordialement
    Zoheir
    #7
    Lubin
    Moderator
    • Total Posts : 383
    • Reward points : 5
    • Joined: 2007/03/31 07:38:15
    • Location: Bayonne, France
    • Status: offline
    Re: PICkit4 not recognized in Matlab environment 2019/11/07 15:17:33 (permalink)
    0
    Hi Zoheir,
     
    Thus you encountered the same issue.
     
    Did you tested with the Simulink IPE interface as well as with the MDB interface ?
    With windows 10 ?
    Was it working with previous MPLAB X versions ?
     
    Merci pour l'information. 
    Lubin
    #8
    sassi14
    New Member
    • Total Posts : 9
    • Reward points : 0
    • Joined: 2019/11/07 04:07:30
    • Location: 0
    • Status: offline
    Re: PICkit4 not recognized in Matlab environment 2019/11/07 16:07:52 (permalink)
    0
    Hi Ludin,
     
    Yes I have tested with IPE was not working.
    Windows 2016 server.
     
    Yes the same issue, it looks relation to the installation method do we need to install version 3.44 or not https://www.microchip.com/mplab/mplab-device-blocks-for-simulink
    when we install both 3.44 and 3.45.05 looks working it can detect the MLAB PICKIT4, if we install just yours  3.45.05 we do not have /microchip/matlabtools folder, looks like yours is like a patch ?
    So it is a is mandatory to install 3.44 before or not, if yes do we keep it when we install 3.45.05?
    That’s the problem I think.
     
    Best regards
    Zoheir
    #9
    Lubin
    Moderator
    • Total Posts : 383
    • Reward points : 5
    • Joined: 2007/03/31 07:38:15
    • Location: Bayonne, France
    • Status: offline
    Re: PICkit4 not recognized in Matlab environment 2019/11/08 09:20:41 (permalink)
    0
    Hi Zoheir,
     
    Each installer is the complete toolbox. 
    The behaviour you observed is not expected. 


    make sure to type picclean before installing a new version to clean-up the matlab path from existing installation.
    Later installer script add the toolbox at the bottom of the path while former installer script added the toolbox at first place in the matlab path. This might cause unexpected result.
     
    Please could you try the latest version just published: v3.46.00 ? This version add support for dual core dsPIC CH.
    I am not expecting change related to the programming. However, the script picInfo('check') provides further information related to the programmers. could you provide me with the output of that instruction ?


    FYI, below is the output I get:
     
    picInfo('check')
    --------------------------------------------
    Microchip Blockset 3.46 Installed:
    --------------------------------------------
    Refreshing cache...
    - Blockset in C:\Users\M91449\Documents\MATLAB\Add-Ons\Toolboxes\MPLAB Device Blocks for Simulink(5)

    4 Compiler(s) found for 16 bits chip:
    - C:/Program Files (x86)/Microchip/xc16/v1.35
    - C:/Program Files (x86)/Microchip/xc16/v1.36
    - C:/Program Files (x86)/Microchip/xc16/v1.40
    - C:/Program Files (x86)/Microchip/xc16/v1.41

    2 Compiler(s) found for 32 bits chip:
    - C:/Program Files (x86)/Microchip/xc32/v2.30
    - C:/Program Files (x86)/Microchip/xc32/v2.20

    Inteface to program chip found:
    - MDB interface in C:\Program Files (x86)\Microchip\MPLABX\v5.30\mplab_platform\bin\mdb.bat
    - IPE interface in C:\Program Files (x86)\Microchip\MPLABX\v5.30\mplab_platform\mplab_ipe\ipecmd.jar

    Testing programmer interface takes few seconds...
    Check programmer connected with IPE ...
    2 programmer found.
    - PICkit 4 S.No : BUR183118886
    - Starter Kits (PKOB) S.No : BUR184714403
    Check programmer connected with MDB ...
    1 programmer found.
    - dsPIC33CH Curiosity Development Board(BUR184714403)
    <--return
     
    #10
    sassi14
    New Member
    • Total Posts : 9
    • Reward points : 0
    • Joined: 2019/11/07 04:07:30
    • Location: 0
    • Status: offline
    Re: PICkit4 not recognized in Matlab environment 2019/11/08 10:24:12 (permalink)
    0
    Hello
     
    picInfo('check')
    --------------------------------------------
       Microchip Blockset 3.46 Installed:
    --------------------------------------------

    Refreshing cache...
       - Blockset in C:\Users\analogware\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\MPLAB Device Blocks for Simulink
     
       - No Compiler found for 16 bits chips
     
      1 Compiler(s) found for 32 bits chip:
       - C:/Program Files (x86)/Microchip/xc32/v2.30
     
       Inteface to program chip found:
         - MDB interface in C:\Program Files (x86)\Microchip\MPLABX\v5.25\mplab_platform\bin\mdb.bat
         - IPE interface in C:\Program Files (x86)\Microchip\MPLABX\v5.25\mplab_platform\mplab_ipe\ipecmd.jar
     
      Testing programmer interface takes few seconds...
    Check programmer connected with IPE ...
         0 programmer found.
    Check programmer connected with MDB ...
         1 programmer found.
           - MPLAB PICkit 4(BUR184884432)
    <--return
    >>
    #11
    Lubin
    Moderator
    • Total Posts : 383
    • Reward points : 5
    • Joined: 2007/03/31 07:38:15
    • Location: Bayonne, France
    • Status: offline
    Re: PICkit4 not recognized in Matlab environment 2019/11/08 11:28:46 (permalink)
    0
    Thanks for your input.
     
    Did you installed MPLAB X 5.30 ?
    If so, Matlab is picking the previous version for unknown reason. Could you try renaming your MPLAB X v5.25 folder with any other name temporaly and make the test again ? if 5.25 release is not found, matlab should pick the latest MPLAB X version installed on the system.
     
    IPE v5.30 should find PicKit 4 and programming should be ok then.
    #12
    sassi14
    New Member
    • Total Posts : 9
    • Reward points : 0
    • Joined: 2019/11/07 04:07:30
    • Location: 0
    • Status: offline
    Re: PICkit4 not recognized in Matlab environment 2019/11/09 02:42:27 (permalink)
    0
    Hi Lubin same problem ...
    intalled with admin rights..
    Do we need to update the firmware of PICKIT4 ??
     
    With PICKIT4 connected only
    picInfo('check')
    --------------------------------------------
       Microchip Blockset 3.46 Installed:
    --------------------------------------------

    Refreshing cache...
       - Blockset in C:\Users\analogware\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\MPLAB Device Blocks for Simulink
     
      1 Compiler(s) found for 16 bits chip:
       - C:/Program Files (x86)/Microchip/xc16/v1.41
     
      1 Compiler(s) found for 32 bits chip:
       - C:/Program Files (x86)/Microchip/xc32/v2.30
     
       Inteface to program chip found:
         - MDB interface in C:\Program Files (x86)\Microchip\MPLABX\v5.30\mplab_platform\bin\mdb.bat
         - IPE interface in C:\Program Files (x86)\Microchip\MPLABX\v5.30\mplab_platform\mplab_ipe\ipecmd.jar
     
      Testing programmer interface takes few seconds...
    Check programmer connected with IPE ...
         0 programmer found.
    Check programmer connected with MDB ...
         0 programmer found.
    <--return
    >>


    with Atmel-ICE connected only
    picInfo('check')
    --------------------------------------------
       Microchip Blockset 3.46 Installed:
    --------------------------------------------

    Refreshing cache...
       - Blockset in C:\Users\analogware\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\MPLAB Device Blocks for Simulink
     
      1 Compiler(s) found for 16 bits chip:
       - C:/Program Files (x86)/Microchip/xc16/v1.41
     
      1 Compiler(s) found for 32 bits chip:
       - C:/Program Files (x86)/Microchip/xc32/v2.30
     
       Inteface to program chip found:
         - MDB interface in C:\Program Files (x86)\Microchip\MPLABX\v5.30\mplab_platform\bin\mdb.bat
         - IPE interface in C:\Program Files (x86)\Microchip\MPLABX\v5.30\mplab_platform\mplab_ipe\ipecmd.jar
     
      Testing programmer interface takes few seconds...
    Check programmer connected with IPE ...
         0 programmer found.
    Check programmer connected with MDB ...
         1 programmer found.
           - Atmel-ICE CMSIS-DAP(J41800118666)
    <--return
    >>
     
    Thanks
    Zoheir
    #13
    sassi14
    New Member
    • Total Posts : 9
    • Reward points : 0
    • Joined: 2019/11/07 04:07:30
    • Location: 0
    • Status: offline
    Re: PICkit4 not recognized in Matlab environment 2019/11/09 03:28:41 (permalink)
    0
    Bingo I found the problem.
    Java was not installed gerrrr.
     
    Best regards
    Zoeir
     
    #14
    sassi14
    New Member
    • Total Posts : 9
    • Reward points : 0
    • Joined: 2019/11/07 04:07:30
    • Location: 0
    • Status: offline
    Re: PICkit4 not recognized in Matlab environment 2019/11/09 07:06:45 (permalink)
    0
    Hi Lubin,
     
    Thanks a lot for your help, I can program correctly as well.
    The next step maybe not the good plave in the forum, is to use SPI with SAMS70 series, but I cannot not, any idea, I have added a capture.
    [image]C:\Users\analogware\Documents\spi.JPG[/image]
    #15
    sassi14
    New Member
    • Total Posts : 9
    • Reward points : 0
    • Joined: 2019/11/07 04:07:30
    • Location: 0
    • Status: offline
    Re: PICkit4 not recognized in Matlab environment 2019/11/09 07:12:05 (permalink)
    0
    I cannot insert a photo butit is:
    Error evaluating 'Openfcn' callback of SPI driver clock (mask) 'SAMS70Q21B/BUS SPI: Callback is 'MCHP_BUS_SOI_callback(gcbh, open)
    #16
    Jump to:
    © 2019 APG vNext Commercial Version 4.5