silicon id, silicon revision not populated in cyadc2 file

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

cross mob
lock attach
Attachments are accessible only for community members.
John_K
Level 4
Level 4
25 replies posted 10 questions asked First like received

The cyacd2 file format shows the silicon id field (4 bytes) and the silicon version (one byte) on the header. See attached screen from the infineon spec (app note).

When we run the cymcuelf tool to create the cyacd2 file, these values are zero populated.

Is there something we need to add to the linker scripts/symbols to get these populated with the actual values from the target psoc6 device?

 

 

0 Likes
1 Solution
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi @John_K ,

In modus toolbox, the Si ID and revision are zeroed out for cyacd file but for PSoC creator since this data is present in the cyfitter or device_headers.h, the same is extracted out and used., since modustoolbox does not have cyfitter.h, this is reasonable.

There is a workaround to find the Si id and revision id.

You can use the function calls in MTB to get the revision id and siI ID and use that for the define in that snippet you have attached above.

You can also refer to this thread for more information

https://community.infineon.com/t5/PSoC-6/PSoC-6-MCU-s-and-ID-s-list/td-p/92071

rev_id = CY_GET_REG8(SFLASH_BASE + 1);
silicon_id = CY_GET_REG16(SFLASH_BASE + 2);
You can replace these in that define so that modus toolbox also populates the id's.
 
Regards,

 

Alakananda

View solution in original post

0 Likes
8 Replies
lock attach
Attachments are accessible only for community members.
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi @John_K ,

Can you refer to the below cymcuelf tool User Guide page number 7 and let us know if that helps.

Regards,

Alakananda
0 Likes

@Alakananda_BG ,

I already read ythis guide, so this did not help. There is no specific mention of silicon id and rev. symbols, only that they are included 'alway's in the .cymeta section, which is included in the elf.

 

The silicon id and silicon rev. are not being populated in the cyacd2 file by cymcuelf.exe. A small snippet of the cyadc2 file shows the result.  the product id (04 03 02 01) has been populated. silicon id and silicon rev. are zero.

010000000000000004030201
@APPINFO:0x10000000,0x7ffc
:00000010008400082B1600100D0000008D16 ....

 

0 Likes
John_K
Level 4
Level 4
25 replies posted 10 questions asked First like received

@ToInfineon 

Any comments here? This should be easily reproducible.

Please inform on how to get the silicon id and silicon rev. to populate in the caycd2 file created from cymcuelf, and/or confirm there is an issue.

 

 

0 Likes
John_K
Level 4
Level 4
25 replies posted 10 questions asked First like received

Tracing through the Cypress DFU library, and the cy_dfu.h header file, I found this snippet:

 

/***************************************
* Internal declarations
****************************************/
/** \cond INTERNAL */

#if !defined(CY_PSOC_CREATOR_USED)

/* Should be 0 in a non-Creator flow */
#define CY_DFU_SILICON_ID (0U)
#define CY_DFU_SILICON_REV (0U)
#else
#include "cy_device_headers.h" /* For CY_SILICON_ID */
#include <cyfitter.h> /* For CYDEV_CHIP_REVISION_USED */

#define CY_DFU_SILICON_ID CY_SILICON_ID
#define CY_DFU_SILICON_REV CYDEV_CHIP_REVISION_USED
#endif /* defined CY_DOXYGEN */

 

Infineon,

 

Why are these fields being zeroed out in the modus toolbox (non-creator) flow?

The cyadt2 file documentation and file format indicates that these are populated.

 

0 Likes
John_K
Level 4
Level 4
25 replies posted 10 questions asked First like received

Infineon,

Can you please comment here?

Is the official Infineon position that .cymeta section is only legacy data  for psoc creator workflow?

If so, there should be some documentation for modus toolbox users, and the CYACD2 file format documentation should reflect that the silicon version and silicon rev. fields in the CYACD2 file header are not populated in modus workflow.

The proprietary .cymeta section in an unmapped area of dummy flash just causes problems for GDB when trying to program flash.

See other related discussion threads:

https://community.infineon.com/t5/ModusToolbox-General/gdb-can-t-load-cymcuelftool-CRC-signed-hex-fi... 

 

https://community.infineon.com/t5/PSoC-Creator-Designer/What-checksum-is-stored-in-cymeta/m-p/95149 

 

 

 

 

 

 

0 Likes
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi @John_K ,

In modus toolbox, the Si ID and revision are zeroed out for cyacd file but for PSoC creator since this data is present in the cyfitter or device_headers.h, the same is extracted out and used., since modustoolbox does not have cyfitter.h, this is reasonable.

There is a workaround to find the Si id and revision id.

You can use the function calls in MTB to get the revision id and siI ID and use that for the define in that snippet you have attached above.

You can also refer to this thread for more information

https://community.infineon.com/t5/PSoC-6/PSoC-6-MCU-s-and-ID-s-list/td-p/92071

rev_id = CY_GET_REG8(SFLASH_BASE + 1);
silicon_id = CY_GET_REG16(SFLASH_BASE + 2);
You can replace these in that define so that modus toolbox also populates the id's.
 
Regards,

 

Alakananda
0 Likes

@Alakananda_BG ,

 

I think this behavior should be explained in the Infineon documentation for the CYADC2 specification and maybe the modus documentation as well.

 

I could make the changes as you describe, but they  affect the Infineon standard DFU library release.

It might be better if these values were defined by Infineon in the dfu_user.h  file and well documented/commented  since it is now a requirement of the implementer to pre lookup and hardcode these values , otherwise cymcuelf tool will just zero-stuff them. This is not mentioned anywhere but in that source code snippet.

 

 

 

 

0 Likes
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi @John_K ,

Sure, we will file an internal ticket regarding this missing information.

Regards,

Alakananda
0 Likes