Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 4 and PSoC™ 6 MCUs: How to get the Silicon ID from the application? – KBA235796

PSoC™ 4 and PSoC™ 6 MCUs: How to get the Silicon ID from the application? – KBA235796

BinduPriya_G
Community Manager
Community Manager 250 replies posted First like received 50 sign-ins
Community Manager

PSoC™ 4 and PSoC™ 6 MCUs: How to get the Silicon ID from the application? – KBA235796

Version: **

The Silicon ID contains silicon ID, revision ID, and family ID.
The IDEs and PSoC™ Programmer use the Silicon ID to identify each device. Use the following registers to get the Silicon ID for PSoC™ 4 and PSoC™ 6 MCUs.

PSoC™ 4 MCU:

  • SFLASH_SILICON_ID register: Contains the silicon ID
  • MSB nibble of the ROMTABLE_PID2 register: Contains the major revision ID
  • MSB nibble of the ROMTABLE_PID3 register: Contains the minor revision ID
  • ROMTABLE_PID0 register: Contains the family ID

See the following sample code segment.

Code Listing 1     Sample code to get silicon ID for PSoC™ 4 MCU

    uint32_t siliconID      = CY_GET_REG32(CYREG_SFLASH_SILICON_ID);

    uint8_t majorRevisionID = (CY_GET_REG8(CYREG_ROMTABLE_PID2) >> 4);   

    uint8_t minorRevisionID = (CY_GET_REG8(CYREG_ROMTABLE_PID3) >> 4);   

    uint16_t familyID       = (CY_GET_REG16(CYREG_ROMTABLE_PID0) & 0x0FFF);   

    printf("\r\n Silicon ID: 0x%X Major Revision: 0x%X Minor Revision: 0x%X Family ID: 0x%X \r\n", siliconID, majorRevisionID, minorRevisionID, familyID );

 

PSoC™ 6 MCU:

  • SFLASH_SILICON_ID register: Contains the 16-bit silicon ID
  • SFLASH_SI_REVISION_ID register: Contains the revision ID
  • SFLASH_FAMILY_ID register: Contains the family ID

See the following sample code segment.

Code Listing 2     Sample code to get silicon ID for PSoC™ 6 MCU

   uint8_t revisionID = CY_GET_REG8(SFLASH_BASE + 0x01); 

   uint16_t siliconID = CY_GET_REG16(SFLASH_BASE + 0x02); 

   uint16_t familyID  = (CY_GET_REG16(SFLASH_BASE + 0x0c) & 0x0FFF); 

   printf("\r\n Silicon ID: 0x%X Revision: 0x%X Family ID: 0x%X \r\n", siliconID, revisionID, familyID);

 

0 Likes
Contributors