Skip to content

Commit e756048

Browse files
authored
Merge pull request #2808 from ARMmbed/revert-2743-PR_STM32_MAC
Revert "[STM32 NUCLEO] Init MAC address"
2 parents 78a2d28 + 2013368 commit e756048

File tree

1 file changed

+0
-28
lines changed
  • features/net/FEATURE_IPV4/lwip-interface/lwip-eth/arch/TARGET_STM

1 file changed

+0
-28
lines changed

features/net/FEATURE_IPV4/lwip-interface/lwip-eth/arch/TARGET_STM/stm32xx_emac.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -431,31 +431,3 @@ void eth_arch_disable_interrupts(void)
431431
{
432432
NVIC_DisableIRQ(ETH_IRQn);
433433
}
434-
435-
/** This returns a unique 6-byte MAC address, based on the device UID
436-
* This function overrides hal/common/mbed_interface.c function
437-
* @param mac A 6-byte array to write the MAC address
438-
*/
439-
void mbed_mac_address(char *mac) {
440-
unsigned char ST_mac_addr[3] = {0x00, 0x80, 0xe1}; // default STMicro mac address
441-
442-
// Read unic id
443-
#if defined (TARGET_STM32F2)
444-
uint32_t word0 = *(uint32_t *)0x1FFF7A10;
445-
#elif defined (TARGET_STM32F4)
446-
uint32_t word0 = *(uint32_t *)0x1FFF7A10;
447-
#elif defined (TARGET_STM32F7)
448-
uint32_t word0 = *(uint32_t *)0x1FF0F420;
449-
#else
450-
#error MAC address can not be derived from target unique Id
451-
#endif
452-
453-
mac[0] = ST_mac_addr[0];
454-
mac[1] = ST_mac_addr[1];
455-
mac[2] = ST_mac_addr[2];
456-
mac[3] = (word0 & 0x00ff0000) >> 16;
457-
mac[4] = (word0 & 0x0000ff00) >> 8;
458-
mac[5] = (word0 & 0x000000ff);
459-
460-
return;
461-
}

0 commit comments

Comments
 (0)