Hi, does anybody know where to get information about the chip id to recognize the production step. There should be some registers for that issue, but nothing is mentioned in the manuals. Thanks Erik
Hello Erik, yes I have some ID's for the devices. You can read them out from the ID-registers. Newer devices should also use the IDRT-register for the silicon revision. Unfortunately there were some inconsistency and so I gave it up to collect these ID's and track the latest.
void Calculate_IDCHIP (void) { unsigned int shadowreg; shadowreg=(IDCHIP & 0xFF00); printf(" Chip Identfication : "); switch(shadowreg) { case 0x2000: printf("XC161 or XC167 "); break; case 0x2300: printf("XC164 "); break; default : printf("Could not read identification "); break; } shadowreg=(IDCHIP & 0x00FF); printf(" ===> Revision Step: "); switch(shadowreg) { case 0x0001: printf("'AA'"); break; case 0x0002: printf("'AB'"); break; case 0x0003: printf("'AC'"); break; case 0x0004: printf("'AD'"); break; // newer steps could implemented here default : printf("a step newer than 'AD'"); break; } printf("\r\n\n"); } //----------------------------------------------------------------------------------------------------------- void Calculate_IDMANUF(void) { unsigned int shadowreg; shadowreg=IDMANUF; printf(" Manufacturer Identfication : "); if(shadowreg==0x1800) { printf("Infineon"); // older device spec. } else { shadowreg=((IDMANUF & 0xFFE0)>>5); if(shadowreg==0x0C1) { printf("Infineon"); // newer device spec 0C1h = JEDEC code for Infineon } else { printf("Could not identify manufacturer"); } } printf("\r\n\n"); } //----------------------------------------------------------------------------------------------------------- void Calculate_IDPROG (void) { float prog_vpp,prog_vdd; prog_vpp=(((IDPROG & 0xFF00)>>8)*20)/256; prog_vdd=((IDPROG & 0x00FF)*20)/256; printf(" Programming Voltage Identification : "); printf("Vpp = %4.2f V Vdd = %4.2f V \n\n",prog_vpp,prog_vdd); } //----------------------------------------------------------------------------------------------------------- void Calculate_IDMEM (void) { unsigned int memtype,memsize; memtype=((IDMEM & 0xF000) >> 12); memsize=((IDMEM & 0x0FFF) * 4 ); printf(" Program Memory Identfication : "); switch(memtype) { case 0: printf("No on-chip progr. memory"); break; case 1: printf("Mask programmable ROM "); break; case 2: printf("EEPROM memory "); break; case 3: printf("Flash memory "); break; case 4: printf("OTP memory "); break; default:printf("Memory type unknown "); break; } if(memtype !=0) { printf("Size: %i kB\n\n",memsize); } } //----------------------------------------------------------------------------------------------------------- void Calculate_IDMEM2 (void) { printf(" Program Memory Identfication 2 : "); printf("Not used at this time - 0x%04X\n\n",IDMEM2); } //----------------------------------------------------------------------------------------------------------- void Calculate_IDRT (void) { printf(" Identifier Silicon Correction : "); printf("Not used at this time - 0x%04X\n\n",IDRT); }
Hello Stefan, that is exactly what I am looking for. I need to know, because Flash programming algorithm is different for step AB and AC and lateron I cannot know which hardware is at the customer to provide the correct firmware update. Thanks a lot Erik
Hello Erik, yes with the AC-step the state machine for programming the FLASH has been changed. The short code I gave you here, should work to identify a step AC and over. Good luck Stefan