This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
until now we had assigned MAC Addresses on our prototypes manually via HALCOGEN. But now we are ready to start pre-series production of a controller board which uses the TMS570LC4357 Controller. We have an Ethernet interface on the board and we have a MAC address block assigned to our company.
During the production there will be an boot loader installed on the processor via JTAG. This boot loader shall be the same on any produced board. But the download file does not contain a MAC address as it shall be individual on every board.
How can the individual MAC Address assigned in an automated process to any controller board? Is there a tool available? Where is the MAC address stored (which memory)? And is it writeable only once?
Thanks for your help!
Regards, Andreas
The MAC address generated by HALCoGen gets put in the file sys_main.c:
uint8 emacAddress[6U] = {0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU};
Since it is defined outside of function scope and not defined as "const", it is stored in RAM and initialized by the auto_init function before running to main. You can overwrite the value in main before calling EMACHWInit().
Now, the hard question, how to make unique EMAC addresses. If they need to be sequential numbers, you will have to create some tool to do that. If you have enough space (MAC address range), and the addresses do not need to be sequential, you might be able to use the information in the DIE ID register to create a unique address. You may not need all 56 bits. If you want to use this let me know and I will try to identify the minimum bits necessary to insure a unique address.
Bob, thanks for the input. We are still not sure which way we will go. Sure is that we will use an external EEPROM. Then there are two options:
In both cases the MAC Addresses will be taken from some kind of database (e.g. CSV-File), which links the MAC-Address to the board serial number. This is then for the further production documentation.
Regards, Andreas