U3V CyFxU3VUpdateSerialNum updated wrong address data

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

cross mob
yiwa_4244806
Level 1
Level 1
First like given

Hi there,

When I was reviewing source code for FX3 U3V device, I found a question as below:

the function source code is:

===

uint32_t *uniqueIDreg = (uint32_t *)0xE0055010;

void CyFxU3VUpdateSerialNum(void)

{

uint8_t j=0;

uniqueIDL = *(uniqueIDreg);

uniqueIDH = *(uniqueIDreg+32);

for(j=0; j<4; j++)

{

CyU3VABRM[260+j] = ((uniqueIDL>>(j*8))&0x000000FF);

CyU3VABRM[264+j] = ((uniqueIDH>>(j*8))&0x000000FF);

}

}

===

It is to update the unique ID serial number from register whose address is 0xE0055010.

But!

uint8_t CyU3VABRM[528] =

{

0x00, 0x00, 0x01, 0x00, // GenCP Version: Minor version (16bits) = 0x0000 , Major version (16bits) = 0x0001

U3V_MANUFACTURER_NAME, // Manufacturer Name String in ASCII, 64 bytes

U3V_MODEL_NAME, // Model Name String in ASCII, 64 bytes

U3V_FAMILY_NAME, // Family Name string in ASCII, 64 bytes

U3V_DEVICE_VERSION, // Device Version String in ASCII, 64 bytes

NULL_64, // Manufacturer info string, 64 bytes, NULL            <-----------------Wrong! CyU3VABRM[260+0] begins here!!!

NULL_64, // Serial Number string, 64 bytes, to be filled during runtime by CyFxU3VUpdateSerialNum()

How this happens?

BTW, could anyone tell me a fake 8-byte unique ID serial number to test? The host seems stall after the 8-byte data received.

Or could help provide the dump data of these sequence?

Tks so much!!!

0 Likes
1 Solution

Hello,

You could modify the code of function CyFxU3VUpdateSerialNum on your side.

View solution in original post

0 Likes
6 Replies
yiwa_4244806
Level 1
Level 1
First like given

YangyangC_06

Hi, Yang,

Can we return the an exist serial number string directly?

0 Likes

How did you get the U3V project?

0 Likes

Hi,

I got from

FX3 application note for USB3 Vision | Cypress Developer Community  https://community.cypress.com/message/127077#127077

But this example seems with bug:(

0 Likes

Hello,

You could modify the code of function CyFxU3VUpdateSerialNum on your side.

0 Likes

Tks for your reply!

PS.

uint8_t CyU3VManifest[] =
{
0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,   // No. of Manifest entries = 1

 

0x00, 0x00, 0x00, 0x01,   // GenICam file version 1.0.0
0x00, 0x00, 0x01, 0x01,   // Schema/Filetype Uncompressed xml ver. 1.1.0
U3V_XML_ADDR,     // Address for XML file
0xFF, 0xFF, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,   // Size of xml file (8 bytes width)
NULL_20,      // SHA-1 for xml - not available
NULL_20       // Reserved
};

This xml file size also seems incorret:(

Could you help please tell us how to get the one correct demo or example without bugs?

Tks so much!

0 Likes

Hi

The source code for U3V was built for demo purpose, not for release. Cypress doesn't have update from last version.

Thus you may refer it to build your customized application.