CoreID Extraction
Antwort
20.09.18 04:43

Hello,

I have question about the CoreID.

I want to Extract the CoreID Value.

At the source cord, Is it have the CoreID Value.

If it has, could you share the source directory?

0 (0 Stimmen)
RE: CoreID Extraction
Antwort
20.09.18 12:18 als Antwort auf Choi Goeun.
Hello Choi,

yes, it is possible to extract the Core ID from the XDKs MCU.

To accomplish that, you simply need to add the following code snippet to your implementation.

 
void printSerialNumber(void){
unsigned int * serialStackAddress0 = 0xFE081F0;
unsigned int * serialStackAddress1 = 0xFE081F4;

unsigned int serialUnique0 = *serialStackAddress0;
unsigned int serialUnique1 = *serialStackAddress1;

printf("xdk serial number: 0x%08x%08x\n",serialUnique1,serialUnique0);
}

The code snippet initializes two pointers to the two memory addresses, where the Core ID is stored. Afterwards, the content on this memory addresses gets read and printed to the XDK-Workbench console.

Please let me know if this was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo
0 (0 Stimmen)
RE: CoreID Extraction
Antwort
21.09.18 00:53 als Antwort auf Franjo Stjepandic.

Hello,

Thanks so much :)

I tried the code, but I could extract only the USB serial number.

As my understanding, serialStackAddress0 & serialStackAddress1 varial is stored CoreID.

And then it could print the only the USB serial number? Is it right?

0 (0 Stimmen)
RE: CoreID Extraction
Antwort
21.09.18 12:48 als Antwort auf Choi Goeun.
Hello Choi,

the CoreID and the USB serial number are equal and therfore the exact same ID.
Furthermore, the CoreID is a 64bit integer which is stored in two 32bit memory cells. The addresses of these two memory cells are set to the pointers serialStackAddress0 and serialStackAddress1 .

Afterwards, the values of these memory cells are stored in the the new declared variables serialUnique0 and serialUnique1 and then printed to the console.

Please let me know if this was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo
0 (0 Stimmen)
RE: CoreID Extraction
Antwort
27.09.18 08:14 als Antwort auf Franjo Stjepandic.
Thanks you :) I could understand.
0 (0 Stimmen)
RE: CoreID Extraction
Antwort
27.09.18 14:16 als Antwort auf Choi Goeun.
Hello Choi,

I am always glad to help.

Please feel free to ask if you have any kind of further concerns or questions.

Kind regards,
Franjo
0 (0 Stimmen)