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

USB superspeed peripherals Forum Discussions

jayesh_joshi
Level 4
Level 4
50 replies posted 10 questions asked 25 sign-ins

Hi,

I am looking into the possibility of each CX3 device having some unique ID stored at some fixed addresses. I followed the below thread but on two devices I got the same values. I read data from  0xe0055010 and 0xe0055014 but two devices returned 00 00 00 0F 00 00 0F 13. 

Are the addresses are correct? I am using the CYUSB3065 chip. 

https://community.infineon.com/t5/USB-superspeed-peripherals/Unique-Id-Registers-in-CYUSB3014/td-p/2...

 

Below is a code snippet of how I am reading ID in firmware.

int *ptrLSB = (int*)0xE0055010;
int *ptrMSB = (int*)0xE0055014;
abI2CReadRsp[1] = *(ptrMSB + 3);
abI2CReadRsp[2] = *(ptrMSB + 2);
abI2CReadRsp[3] = *(ptrMSB + 1);
abI2CReadRsp[4] = *(ptrMSB);
abI2CReadRsp[5] = *(ptrLSB + 3);
abI2CReadRsp[6] = *(ptrLSB + 2);
abI2CReadRsp[7] = *(ptrLSB + 1);
abI2CReadRsp[8] = *(ptrLSB);
0 Likes
1 Solution

Hi,

Could you try the implementation as below and check if the IDs are different?

volatile uint32_t *ptrLSB = (uint32_t*)0xE0055010;
volatile uint32_t *ptrMSB = (uint32_t*)0xE0055014;
uint32_t abI2CReadRsp[2];

abI2CReadRsp[0] = *(ptrMSB);
abI2CReadRsp[1] = *(ptrLSB);

for (int i = 0;i<2; i++){
    CyU3PDebugPrint(4, "%x ", abI2CReadRsp[i]);
}

 

Best Regards,
AliAsgar

View solution in original post

8 Replies
AliAsgar
Moderator
Moderator
Moderator
250 solutions authored 750 replies posted 50 likes received

Hi,

Could you try changing data type from "int" to "uint8_t" or "unsigned char".

This is because when ptrLSB + 1 is done, we need the ptrLSB to jump 1 byte and not 4 bytes.

Best Regards,
AliAsgar

0 Likes
jayesh_joshi
Level 4
Level 4
50 replies posted 10 questions asked 25 sign-ins

Thank you for your response.

 I have modified the code as per below. Still, two devices return the same value 00 00 00 0F 00 00 00 13

							uint8_t *ptrLSB = (uint8_t*)0xE0055010;
							uint8_t *ptrMSB = (uint8_t*)0xE0055014;
							abI2CReadRsp[1] = *(ptrMSB + 3);
							abI2CReadRsp[2] = *(ptrMSB + 2);
							abI2CReadRsp[3] = *(ptrMSB + 1);
							abI2CReadRsp[4] = *(ptrMSB);
							abI2CReadRsp[5] = *(ptrLSB + 3);
							abI2CReadRsp[6] = *(ptrLSB + 2);
							abI2CReadRsp[7] = *(ptrLSB + 1);
							abI2CReadRsp[8] = *(ptrLSB);

 

0 Likes

Hi,

Could you let us know the use case for the Chip Unique IDs?

Best Regards,
AliAsgar

0 Likes
jayesh_joshi
Level 4
Level 4
50 replies posted 10 questions asked 25 sign-ins

Hi,

 

Our use case is that in production we want to test each instrument and track if any issue resulting in the field can be traced to batch manufactured and test reports. The simple sticker may not be temper proof so we want to ID which can not be modified. 

0 Likes

Hi,

Could you try the implementation as below and check if the IDs are different?

volatile uint32_t *ptrLSB = (uint32_t*)0xE0055010;
volatile uint32_t *ptrMSB = (uint32_t*)0xE0055014;
uint32_t abI2CReadRsp[2];

abI2CReadRsp[0] = *(ptrMSB);
abI2CReadRsp[1] = *(ptrLSB);

for (int i = 0;i<2; i++){
    CyU3PDebugPrint(4, "%x ", abI2CReadRsp[i]);
}

 

Best Regards,
AliAsgar

jayesh_joshi
Level 4
Level 4
50 replies posted 10 questions asked 25 sign-ins

@AliAsgar 

I have checked with multiple units and I am getting different values each time. 

0 Likes

Hi,

Just to be clear, you mean its working as expected, right?

Best Regards,
AliAsgar

0 Likes
jayesh_joshi
Level 4
Level 4
50 replies posted 10 questions asked 25 sign-ins

@AliAsgar 

Yes.

0 Likes