You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The build in mac address should used. Following function can used, based on mbed-os/stm32xx_emac.c
`
void stmMAC(uint8_t *mac) {
// Read unic id
#if defined (STM32F2)
uint32_t baseUID = *(uint32_t *)0x1FFF7A10;
#elif defined (STM32F4)
uint32_t baseUID = *(uint32_t *)0x1FFF7A10;
#elif defined (STM32F7)
uint32_t baseUID = *(uint32_t *)0x1FF0F420;
#else
#error MAC address can not be derived from target unique Id
#endif
The build in mac address should used. Following function can used, based on mbed-os/stm32xx_emac.c
`
void stmMAC(uint8_t *mac) {
// Read unic id
#if defined (STM32F2)
uint32_t baseUID = *(uint32_t *)0x1FFF7A10;
#elif defined (STM32F4)
uint32_t baseUID = *(uint32_t *)0x1FFF7A10;
#elif defined (STM32F7)
uint32_t baseUID = *(uint32_t *)0x1FF0F420;
#else
#error MAC address can not be derived from target unique Id
#endif
mac[0] = 0x00;
mac[1] = 0x80;
mac[2] = 0xE1;
mac[3] = (baseUID & 0x00FF0000) >> 16;
mac[4] = (baseUID & 0x0000FF00) >> 8;
mac[5] = (baseUID & 0x000000FF);
return;
}
`
The text was updated successfully, but these errors were encountered: