• AVR Freaks

Hot!question about usage of ipecmd

Author
RalfR
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2020/03/02 03:09:36
  • Location: 0
  • Status: offline
2020/09/28 03:59:46 (permalink)
0

question about usage of ipecmd

Hello @all,
Is there an easier way to identify the target hardware behind the pickit than trying the following call with different parameters and parsing the responses?
ipecmd -P{typestring} -TS{serialnumber} -G

where the words in brackets are variable parameters
serialnumber is for example:BUR202272227
and typestrings are: 32MX575F512H / 32MX575F256H / 32MX550F256H
 
after parsing response of the shown call, program has to decide if retry with next typestring an parsing answer again and so on until it got a hit. this takes time and resources.
post edited by RalfR - 2020/09/28 04:07:06
#1

5 Replies Related Threads

    NorthGuy
    Super Member
    • Total Posts : 6350
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: online
    Re: question about usage of ipecmd 2020/09/28 12:01:27 (permalink)
    4 (1)
    There are almost 2000 different PICs therefore the programmer would have to try dozens of different algorithms. Moreover, the algorithms may be harmful. For example, if you try to get Id from some older PIC16 which requires 13V on MCLR, it will, most definitely, kill PIC32.
     
    However, if you only read the Id, all PIC32 should be the same. If you try to connect to a wrong one, you usually get "incorrect device id" error message which reveals the device id of the PIC.
    #2
    RalfR
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2020/03/02 03:09:36
    • Location: 0
    • Status: offline
    Re: question about usage of ipecmd 2020/09/28 12:35:18 (permalink)
    0
    Thank you NorthGuy for your reply.
     
    So i have always to know, which target is attached to the programmer or i have to use the way explained above to find out, if i understand correctly.
    #3
    NorthGuy
    Super Member
    • Total Posts : 6350
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: online
    Re: question about usage of ipecmd 2020/09/28 15:58:19 (permalink)
    4 (1)
    If you only use PIC32, and you get the output with the device id, then you can use the device id to lookup the PIC.
    #4
    RalfR
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2020/03/02 03:09:36
    • Location: 0
    • Status: offline
    Re: question about usage of ipecmd 2020/09/29 01:10:06 (permalink)
    0
    NorthGuy
    If you only use PIC32, and you get the output with the device id, then you can use the device id to lookup the PIC.
     

     

    Hello NorthGuy,
    thanks again.
    I currently have Pickit 3/4 and ICD 3/4 available. In the future a Pickit 4 based solution is planned.
    If I understand you correctly, my previous approach is almost correct. Only when I come across an Invalid Device Id, I should not try a list of possible devices, but use the given Target Device Id for a lookup to shorten the identification. Have I understood you correctly so far? If so, where can I find a database that tells me which ID belongs to which microcontroller?
    #5
    RalfR
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2020/03/02 03:09:36
    • Location: 0
    • Status: offline
    Re: question about usage of ipecmd 2020/09/29 01:41:52 (permalink)
    0
    i think i found it, inclusive an possible typing error in the Errata-file* **, where two different PIC32 have the same Device ID.
     
    PIC32MX775F512L 0x4307053
    PIC32MX795F512L 0x4307053

     
    *compiler found it and throws item exists exception while trying to add the values in reversed order to a dictionary 
    ** picture shows document properties of the file i downloaded, which seems to contains the typing error
    (only attached if someone else stumbles across the same problem)
     
    So now i run the request one time like this:
    ipecmd -P{typestring} -TS{serialnumber} -G

    then i parse the answer. if there is a string like "Target Device ID (0x4309053) is an Invalid Device ID."
     
    I start an lookup for this ID in my lookuptable and set the correct values in my application in preparation of Burning process, without a doing new request. (if the lookuptable contains the ID)
    post edited by RalfR - 2020/09/29 05:32:22

    Attached Image(s)

    #6
    Jump to:
    © 2020 APG vNext Commercial Version 4.5