- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you let us know the use case for the Chip Unique IDs?
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Just to be clear, you mean its working as expected, right?
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content