Skip to content

Commit 2cadb0b

Browse files
authored
Read mac address using FreeRTOS_GetMACAddress() rather than using the defines
1 parent 8526fb3 commit 2cadb0b

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

source/portable/NetworkInterface/RX/NetworkInterface.c

+6-9
Original file line numberDiff line numberDiff line change
@@ -422,15 +422,12 @@ static int InitializeNetwork( void )
422422
ether_return_t eth_ret;
423423
BaseType_t return_code = pdFALSE;
424424
ether_param_t param;
425-
uint8_t myethaddr[ 6 ] =
426-
{
427-
configMAC_ADDR0,
428-
configMAC_ADDR1,
429-
configMAC_ADDR2,
430-
configMAC_ADDR3,
431-
configMAC_ADDR4,
432-
configMAC_ADDR5
433-
}; /*XXX Fix me */
425+
426+
/* Read the mac address after it has been initilized by the FreeRTOS IP Stack, rather than from defines
427+
* as the mac address is usually read from the EEPROM, and it might be different to the mac address in
428+
* the defines, especially in production environments
429+
*/
430+
const uint8_t *myethaddr = FreeRTOS_GetMACAddress();
434431

435432
R_ETHER_PinSet_CHANNEL_0();
436433
R_ETHER_Initial();

0 commit comments

Comments
 (0)