How to read MC9S12XEP100's globally unique chip ID?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to read MC9S12XEP100's globally unique chip ID?

Jump to solution
989 Views
cornonly
Contributor II

Hey,

I want to read MC9S12XEP100's globally unique chip ID by writing code.How should I do and How many bits are there in the MC9S12XEP100 chip ID?

Labels (1)
1 Solution
798 Views
lama
NXP TechSupport
NXP TechSupport

Hi,

everything is explained int the data sheet..keywords Device ID, IFR, MMCCTL1, PGMIFRON 

However,....

Program IFR — Nonvolatile information register located in the P-Flash block that contains the Device ID, Version ID, and the Program Once field. The Program IFR is visible in the global memory map by setting the PGMIFRON bit in the MMCCTL1 register.

The device ID at 0x40_0000 - 0x40_0007 cannot be programmed and cannot be erased. I cannot tell you the meaning or coding of these bytes. The content in these 8-bytes is specific to NXP and is really of no use to the customer. However, I can confirm that each part has unique device ID.

For example:

//==============================================================================
unsigned int partID[4];
unsigned int versionID;
//==============================================================================
//==============================================================================
void main(void)
{
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // read ID
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 MMCCTL1_PGMIFRON = 1;                                                 // Program IFR Fields visible in the memory map

partID[0] = *((unsigned int * far) 0x400000);                          // Read program IFR Fields 
partID[1] = *((unsigned int * far) 0x400002);
partID[2] = *((unsigned int * far) 0x400003);
partID[3] = *((unsigned int * far) 0x400006);
versionID =  *((unsigned int * far) 0x4000E8);
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                   

 for(;;) {}
}
//==============================================================================

Best regards,

Ladislav

View solution in original post

1 Reply
799 Views
lama
NXP TechSupport
NXP TechSupport

Hi,

everything is explained int the data sheet..keywords Device ID, IFR, MMCCTL1, PGMIFRON 

However,....

Program IFR — Nonvolatile information register located in the P-Flash block that contains the Device ID, Version ID, and the Program Once field. The Program IFR is visible in the global memory map by setting the PGMIFRON bit in the MMCCTL1 register.

The device ID at 0x40_0000 - 0x40_0007 cannot be programmed and cannot be erased. I cannot tell you the meaning or coding of these bytes. The content in these 8-bytes is specific to NXP and is really of no use to the customer. However, I can confirm that each part has unique device ID.

For example:

//==============================================================================
unsigned int partID[4];
unsigned int versionID;
//==============================================================================
//==============================================================================
void main(void)
{
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // read ID
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 MMCCTL1_PGMIFRON = 1;                                                 // Program IFR Fields visible in the memory map

partID[0] = *((unsigned int * far) 0x400000);                          // Read program IFR Fields 
partID[1] = *((unsigned int * far) 0x400002);
partID[2] = *((unsigned int * far) 0x400003);
partID[3] = *((unsigned int * far) 0x400006);
versionID =  *((unsigned int * far) 0x4000E8);
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                   

 for(;;) {}
}
//==============================================================================

Best regards,

Ladislav