Sep 25, 2013
11:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 25, 2013
11:51 AM
Hi, I'm trying to find a way to retrieve a unique Serial Number from every chip. That Serial Number must be write protected so it can't be overwritten when we re-program the device. What's the best way to do it? So far, I tried to program the BMI (boot-mode index) in the UCB2 page 1, but it doesn't seem to work. The Mac Address in BMI block copied in DSRAM1 at bootup is not constant and doesn't correspond to the value I want. However, the BMI Word (4 bytes in BMI string) is written successfully (I set the Mac Address valid flag). Any idea what I'm doing wrong?
Thanks,
Cedric
Thanks,
Cedric
- Tags:
- IFX
19 Replies
Sep 26, 2013
12:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 26, 2013
12:33 AM
"That Serial Number must be write protected so it can't be overwritten when we re-program the device."
Yes, the above mention can be write protect using UCB0 or UCB1 (Selected memory sector write protection). However to protect a few words will be quite a waste to be done on a memory sector of 16KB in size (This is the smallest sector).
"So far, I tried to program the BMI (boot-mode index) in the UCB2 page 1, but it doesn't seem to work."
Can you check on the command sequence?
Yes, the above mention can be write protect using UCB0 or UCB1 (Selected memory sector write protection). However to protect a few words will be quite a waste to be done on a memory sector of 16KB in size (This is the smallest sector).
"So far, I tried to program the BMI (boot-mode index) in the UCB2 page 1, but it doesn't seem to work."
Can you check on the command sequence?
Sep 26, 2013
06:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 26, 2013
06:58 AM
I took the code from FLASH002 app.
Here what I do to call the function to write the BMI :
status_t st;
const FLASHBMIString_Type MyBMITestString =
{
//boot mode
FLASH_BMI_BOOT_NORMAL,
//BMI Flags
FLASH_BMI_MAC_ADDR_VALID,
//MAC ADDR extension
{0x07,0xDD,0x09,0x20,0x22,0x90},
//IP ADDR extension
{0xFF, 0xEE, 0xDD, 0xCC, 0xBB, 0xAA, 0x99, 0x88, 0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00},
//USB serial number
{0x12, 0x34, 0x56, 0x78}
};
st = FLASH002_EraseUCB(2);
st = FLASH002_ConfigureBMI (&MyBMITestString);
- functions always return SUCCESS
- When I look at the BMI string copied in DSRAM1 after boot-up, the BMI Word (4 bytes) seems correct (the MAC P flag is set), but the MAC Address (6 bytes) is not set.
- The MAC Address is not constant and is sometime modified upon reset. I need the MAC address to keep its value forever...
- Do I need to erase the UCB before I call the FLASH002_ConfigureBMI? I tried with or without erasing and got the same result.
Thanks,
Cedric
Here what I do to call the function to write the BMI :
status_t st;
const FLASHBMIString_Type MyBMITestString =
{
//boot mode
FLASH_BMI_BOOT_NORMAL,
//BMI Flags
FLASH_BMI_MAC_ADDR_VALID,
//MAC ADDR extension
{0x07,0xDD,0x09,0x20,0x22,0x90},
//IP ADDR extension
{0xFF, 0xEE, 0xDD, 0xCC, 0xBB, 0xAA, 0x99, 0x88, 0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00},
//USB serial number
{0x12, 0x34, 0x56, 0x78}
};
st = FLASH002_EraseUCB(2);
st = FLASH002_ConfigureBMI (&MyBMITestString);
- functions always return SUCCESS
- When I look at the BMI string copied in DSRAM1 after boot-up, the BMI Word (4 bytes) seems correct (the MAC P flag is set), but the MAC Address (6 bytes) is not set.
- The MAC Address is not constant and is sometime modified upon reset. I need the MAC address to keep its value forever...
- Do I need to erase the UCB before I call the FLASH002_ConfigureBMI? I tried with or without erasing and got the same result.
Thanks,
Cedric
Oct 02, 2013
07:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 02, 2013
07:37 AM
I'm still waiting for a solution to write-protect a 6 byte MAC ADDRESS in flash. Anyone can help?
Oct 04, 2013
02:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 04, 2013
02:49 AM
Hi furterRMDS,
"I'm still waiting for a solution to write-protect a 6 byte MAC ADDRESS in flash. Anyone can help?"
Do you mean that you want to write protect the MAC Address which is written into the UCB to prevent unnecessary overwritting during flash programming? If Yes, then this might be unnecessary as the UCB has no chance of overwritting during flash programming.
"- The MAC Address is not constant and is sometime modified upon reset. I need the MAC address to keep its value forever..."
I have to check on this.
Best Regards
Travis
"I'm still waiting for a solution to write-protect a 6 byte MAC ADDRESS in flash. Anyone can help?"
Do you mean that you want to write protect the MAC Address which is written into the UCB to prevent unnecessary overwritting during flash programming? If Yes, then this might be unnecessary as the UCB has no chance of overwritting during flash programming.
"- The MAC Address is not constant and is sometime modified upon reset. I need the MAC address to keep its value forever..."
I have to check on this.
Best Regards
Travis
Oct 04, 2013
05:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 04, 2013
05:56 AM
"Do you mean that you want to write protect the MAC Address which is written into the UCB to prevent unnecessary overwritting during flash programming? If Yes, then this might be unnecessary as the UCB has no chance of overwritting during flash programming."
No, the real problem is that the UCB MAC Address is not written with the code above. I was just asking if there was another solution. I think I will reserve a 16 KB Sector just for the MAC Address.
Thanks,
Cedric
No, the real problem is that the UCB MAC Address is not written with the code above. I was just asking if there was another solution. I think I will reserve a 16 KB Sector just for the MAC Address.
Thanks,
Cedric
Oct 04, 2013
11:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 04, 2013
11:53 AM
Hi Travis,
when I read through the reference manual (xmc4500_rm_v1.3_2013_08.pdf), I came across the SCU fields ID, IDCHIP and IDMANUF (section 11.10, pages 527ff) and wondered if IDCHIP would be as unique as the manual states "Register containing unique ID of the chip."
However, after reading this register from a hand-full of devices, I just got two different values.
Now, is there already a real unique ID somewhere on the chip, or do we have to rely on external components/tasks (manually flashing or e.g. the DS28CM00 silicon serial number chip) to get a unique, but constant, number?
-Benjamin
when I read through the reference manual (xmc4500_rm_v1.3_2013_08.pdf), I came across the SCU fields ID, IDCHIP and IDMANUF (section 11.10, pages 527ff) and wondered if IDCHIP would be as unique as the manual states "Register containing unique ID of the chip."
However, after reading this register from a hand-full of devices, I just got two different values.
Now, is there already a real unique ID somewhere on the chip, or do we have to rely on external components/tasks (manually flashing or e.g. the DS28CM00 silicon serial number chip) to get a unique, but constant, number?
-Benjamin
Oct 04, 2013
12:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 04, 2013
12:00 PM
OK, at least for part 1 of my question I've found the answer myself:
The SCU_IDCHIP register is not unique among devices of the same stepping, but rather and indicator of which stepping the chip is from: http://www.infineonforums.com/threads/1014-Atep-aa-ab-ac-differences#post2959
-Benjamin
The SCU_IDCHIP register is not unique among devices of the same stepping, but rather and indicator of which stepping the chip is from: http://www.infineonforums.com/threads/1014-Atep-aa-ab-ac-differences#post2959
-Benjamin
Oct 09, 2013
03:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 09, 2013
03:23 AM
Hi benjamin.st,
"I'm trying to find a way to retrieve a unique Serial Number from every chip. That Serial Number must be write protected so it can't be overwritten when we re-program the device."
You can have a look at the "IDCHIP" register. This is preprogrammed in the factory and there is no way that this can be erased. Am I right to say that you are trying to do some kind of authentication using this ID? Please note that the Chip ID will be the same from the same batch of MCU.
The BMI UCB2 page 1 however does allow user to program the MAC address and IP address which is unique to every chip. But in your case the MAC address seems to be unstable when it is stored into the DSRAM1. Please let me check on this application and get back to you.
"I'm trying to find a way to retrieve a unique Serial Number from every chip. That Serial Number must be write protected so it can't be overwritten when we re-program the device."
You can have a look at the "IDCHIP" register. This is preprogrammed in the factory and there is no way that this can be erased. Am I right to say that you are trying to do some kind of authentication using this ID? Please note that the Chip ID will be the same from the same batch of MCU.
The BMI UCB2 page 1 however does allow user to program the MAC address and IP address which is unique to every chip. But in your case the MAC address seems to be unstable when it is stored into the DSRAM1. Please let me check on this application and get back to you.
Oct 09, 2013
06:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 09, 2013
06:05 AM
Hi furterRMDS, Travis,
@furterRMDS: sorry for hijacking your thread, but I think we are looking for the same thing:
I also want to read a unique serial number from every XMC chip - possibly programmed already during the fabrication of the chip - I don't need to (I especially don't want to) program a self-chosen ID for each device.
Thus, my search for such already existing unique ID on the XMC registers continues ... (so far, we hav always used the DS28CM00 silicon serial number chip by Maxim - http://www.maximintegrated.com/datasheet/index.mvp/id/5248 - works fine, but requires additional components on the PCB and some IOs on the microcontroller )
@Travis:
yes, I'm trying to do some kind of authentication using this ID -> I'm building a microcontroller node that will be connected to numerous of the same on an Ethernet network. Therefore I want to have some kind of unique ID to set a MAC address and then the nodes may automatically obtain the IP address for communication via DHCP. I do not want to configure the MAC address (or IP address) for each node individually, there will be too much nodes ...
You mentioned to program the BMI string that contains a user-configurable MAC address. While reading the sections in the reference manual, I found another memory location that is labeled "Unique Chip ID" - it's located at the start of DSRAM1 and written by SSW upon every reset - please refer to Reference Manual V1.2 page 2595 (section 26-4, chapter 26.2.2 "Initial boot sequence)
Will this "Unique Chip ID" - located at the 16 bytes from 0x20000000 to 0x2000000F be completely unique among all XMC devices?
Thanks, Benjamin
@furterRMDS: sorry for hijacking your thread, but I think we are looking for the same thing:
furterRMDS wrote:
Hi, I'm trying to find a way to retrieve a unique Serial Number from every chip.
I also want to read a unique serial number from every XMC chip - possibly programmed already during the fabrication of the chip - I don't need to (I especially don't want to) program a self-chosen ID for each device.
Thus, my search for such already existing unique ID on the XMC registers continues ... (so far, we hav always used the DS28CM00 silicon serial number chip by Maxim - http://www.maximintegrated.com/datasheet/index.mvp/id/5248 - works fine, but requires additional components on the PCB and some IOs on the microcontroller )
@Travis:
yes, I'm trying to do some kind of authentication using this ID -> I'm building a microcontroller node that will be connected to numerous of the same on an Ethernet network. Therefore I want to have some kind of unique ID to set a MAC address and then the nodes may automatically obtain the IP address for communication via DHCP. I do not want to configure the MAC address (or IP address) for each node individually, there will be too much nodes ...
You mentioned to program the BMI string that contains a user-configurable MAC address. While reading the sections in the reference manual, I found another memory location that is labeled "Unique Chip ID" - it's located at the start of DSRAM1 and written by SSW upon every reset - please refer to Reference Manual V1.2 page 2595 (section 26-4, chapter 26.2.2 "Initial boot sequence)
Will this "Unique Chip ID" - located at the 16 bytes from 0x20000000 to 0x2000000F be completely unique among all XMC devices?
Thanks, Benjamin
Oct 09, 2013
06:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 09, 2013
06:20 AM
@benjamin : We are indeed, looking for the same thing. I also had some hope with this "Unique Chip ID", but from what I saw, the 16 bytes copied in DSRAM1 at bootup are always 0, so it doesn't seem to work.
Oct 09, 2013
08:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 09, 2013
08:45 AM
OK great.
I have not used the BMI string so far. I've read the memory locations from 4 devices I have at my desk:
Index 0 is 0x20000000, Index 1 is 0x20000004, then 8 and then C ... so these values are u32.
E144-1 (hexagon DRAM 1)
[0] 0x0a038201
[1] 0x44002006
[2] 0x10000682
[3] 0x0000000a
E144-2 (hexagon DRAM 2)
[0] 0x08898201
[1] 0x44002005
[2] 0x10000682
[3] 0x0000000a
F144-1 (hexagon GP 1)
[0] 0x0c860101
[1] 0x47038005
[2] 0x10000682
[3] 0x0000000a
F100-1 (relax 1)
[0] 0x098780c1
[1] 0x4902200f
[2] 0x10000682
[3] 0x0000000a
from these values I can see that all 4 chips have different IDs and the ID is most likely build up the following way:
[3] & [2] & [1] & [0] -> 0000 000a 1000 0682 ... and then changing - so it looks like these are real unique IDs
-Benjamin
I have not used the BMI string so far. I've read the memory locations from 4 devices I have at my desk:
Index 0 is 0x20000000, Index 1 is 0x20000004, then 8 and then C ... so these values are u32.
E144-1 (hexagon DRAM 1)
[0] 0x0a038201
[1] 0x44002006
[2] 0x10000682
[3] 0x0000000a
E144-2 (hexagon DRAM 2)
[0] 0x08898201
[1] 0x44002005
[2] 0x10000682
[3] 0x0000000a
F144-1 (hexagon GP 1)
[0] 0x0c860101
[1] 0x47038005
[2] 0x10000682
[3] 0x0000000a
F100-1 (relax 1)
[0] 0x098780c1
[1] 0x4902200f
[2] 0x10000682
[3] 0x0000000a
from these values I can see that all 4 chips have different IDs and the ID is most likely build up the following way:
[3] & [2] & [1] & [0] -> 0000 000a 1000 0682 ... and then changing - so it looks like these are real unique IDs
-Benjamin
Oct 09, 2013
11:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 09, 2013
11:16 PM
I also want to read a unique serial number from every XMC chip - possibly programmed already during the fabrication of the chip - I don't need to (I especially don't want to) program a self-chosen ID for each device.
Thus, my search for such already existing unique ID on the XMC registers continues ...
Travis:
The "IDCHIP" register contains the unique ID of the chip, however the ID value maybe the same for the same batch of production so this may not serve your intended purposes.
Will this "Unique Chip ID" - located at the 16 bytes from 0x20000000 to 0x2000000F be completely unique among all XMC devices?
Travis:
No, it basically a copy of the IDCHIP.
For your need I think the best way is to program a MAC ID into the UCB.
Thus, my search for such already existing unique ID on the XMC registers continues ...
Travis:
The "IDCHIP" register contains the unique ID of the chip, however the ID value maybe the same for the same batch of production so this may not serve your intended purposes.
Will this "Unique Chip ID" - located at the 16 bytes from 0x20000000 to 0x2000000F be completely unique among all XMC devices?
Travis:
No, it basically a copy of the IDCHIP.
For your need I think the best way is to program a MAC ID into the UCB.
Oct 09, 2013
11:54 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 09, 2013
11:54 PM
furterRMDS wrote:
I took the code from FLASH002 app.
Here what I do to call the function to write the BMI :
status_t st;
const FLASHBMIString_Type MyBMITestString =
{
//boot mode
FLASH_BMI_BOOT_NORMAL,
//BMI Flags
FLASH_BMI_MAC_ADDR_VALID,
//MAC ADDR extension
{0x07,0xDD,0x09,0x20,0x22,0x90},
//IP ADDR extension
{0xFF, 0xEE, 0xDD, 0xCC, 0xBB, 0xAA, 0x99, 0x88, 0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00},
//USB serial number
{0x12, 0x34, 0x56, 0x78}
};
st = FLASH002_EraseUCB(2);
st = FLASH002_ConfigureBMI (&MyBMITestString);
- functions always return SUCCESS
- When I look at the BMI string copied in DSRAM1 after boot-up, the BMI Word (4 bytes) seems correct (the MAC P flag is set), but the MAC Address (6 bytes) is not set.
- The MAC Address is not constant and is sometime modified upon reset. I need the MAC address to keep its value forever...
- Do I need to erase the UCB before I call the FLASH002_ConfigureBMI? I tried with or without erasing and got the same result.
Thanks,
Cedric
Hi Cedric,
Can I check if you had configure the Boot mode pin to BMI mode?
Oct 10, 2013
01:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 10, 2013
01:18 AM
Travis wrote:
Will this "Unique Chip ID" - located at the 16 bytes from 0x20000000 to 0x2000000F be completely unique among all XMC devices?
Travis:
No, it basically a copy of the IDCHIP.
how can it be a copy of the IDCHIP register, if you clearly can see that the address locations 0x20000000 to 0x20000007 vary in my 4 readings ??
Oct 10, 2013
05:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 10, 2013
05:58 AM
Travis wrote:
Hi Cedric,
Can I check if you had configure the Boot mode pin to BMI mode?
No, I was in Normal Boot Mode.
Oct 10, 2013
11:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 10, 2013
11:31 AM
I tried to configure the MAC Address in the BMI string using boot mode BMI and it works. Case closed for me.
Thanks a lot,
Cedric
Thanks a lot,
Cedric
Oct 10, 2013
08:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 10, 2013
08:24 PM
furterRMDS wrote:
I tried to configure the MAC Address in the BMI string using boot mode BMI and it works. Case closed for me.
Thanks a lot,
Cedric
Good to hear that.
Not applicable
Jun 16, 2017
01:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 16, 2017
01:53 AM
Hi Cedric,
I don't suppose, you might have your final code, for obtaining a unique ID, and setting the ETH_LWIP MAC address ?
I read through all of the post and links, but couldn't quite ascertain the final answer, that closed the case..
Best regards,
David King
I don't suppose, you might have your final code, for obtaining a unique ID, and setting the ETH_LWIP MAC address ?
I read through all of the post and links, but couldn't quite ascertain the final answer, that closed the case..
Best regards,
David King
Jun 19, 2017
04:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 19, 2017
04:34 AM
David King wrote:
I read through all of the post and links, but couldn't quite ascertain the final answer, that closed the case..
As I understand - the only reliable way: to generate a unique number yourself at the production stage or when the device is turned on for the first time.
The uniqueness of "chip ID" (at addr 0x2000000) is not guaranteed for all instances of this IC.