• AVR Freaks

How to get PIC32MZ device ID with MTAP_IDCODE

Author
Wangxin
New Member
  • Total Posts : 18
  • Reward points : 0
  • Joined: 2018/03/16 05:03:15
  • Location: 0
  • Status: offline
2019/11/08 20:17:04 (permalink)
0

How to get PIC32MZ device ID with MTAP_IDCODE

in  PIC32 Flash Programming Specification(DS60001145W)
MTAP_IDCODE  =  Select Chip Identification Data register
 
only follow information about MTAP_IDCODE : no Examples.
20.1.4 MTAP_IDCODE INSTRUCTION  
MTAP_IDCODE returns the value stored in the DEVID
register.
 
Such as MCHP_STATUS,   read with statusVal = XferData (MCHP_STATUS).
Can anyone tell me how to read DEVID with MTAP_IDCODE  command.
 
//Select Chip Identification Data register
SendCommand(MTAP_IDCODE  );
// Receive ID
devid = XferData(0); 
 
 is right?
post edited by Wangxin - 2019/11/08 20:35:13
#1

1 Reply Related Threads

    NorthGuy
    Super Member
    • Total Posts : 5733
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: How to get PIC32MZ device ID with MTAP_IDCODE 2019/11/09 17:43:34 (permalink)
    0
    Wangxin
    //Select Chip Identification Data register
    SendCommand(MTAP_IDCODE  );
    // Receive ID
    devid = XferData(0); 
     
     is right?



    Yes.
     
    The command selects what kind of data are going to be accessed. When you select ETAP_IDCODE (1) instruction, the data transfer will read the device id.
     
    I suggest googling "JTAG State Machine".
    #2
    Jump to:
    © 2019 APG vNext Commercial Version 4.5