Skip to main content
francescatodiego
Associate III
Nov 18, 2013 5:22 PM UTC
Question

SMTM32F4 ETH driver

Posted on November 18, 2013 at 18:22

I am a beginner with STM32F4 and I am study the ETH driver procedure but I don't understand some instructions

For example:

  /* Clear MBC bits in the selected MAC address  high register */

  (*(__IO uint32_t *) (ETH_MAC_ADDR_HBASE + MacAddr)) &=(~(uint32_t)ETH_MACA1HR_MBC);

 

  /* Wait until the write operation will be taken into account :

   at least four TX_CLK/RX_CLK clock cycles */

  tmpreg = (*(__IO uint32_t *) (ETH_MAC_ADDR_HBASE + MacAddr));

  _eth_delay_(ETH_REG_WRITE_DELAY);

  (*(__IO uint32_t *) (ETH_MAC_ADDR_HBASE + MacAddr)) = tmpreg;

I don't understand the read and write same register after delay 

Thanks in advance for help

#stm32f4-eth
This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
Nov 18, 2013 5:37 PM UTC
Posted on November 18, 2013 at 18:37

You'd need to find someone with a gate-level understanding of the design to talk to you, but the comments seem to suggest that there are consideration which fall under a different, slower, timing domain than the APB/AHB you are using to access the registers. ie pulling the bits off the wire, and checking the MAC address

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
eugene1
Visitor II
Feb 4, 2014 10:46 PM UTC
Posted on February 04, 2014 at 23:46

It's a silicone bug workaround. See latest errata sheet ''2.7.5 Successive write operations to the same register might not be fully taken into account''.

francescatodiego
Associate III
Feb 5, 2014 2:39 PM UTC
Posted on February 05, 2014 at 15:39

Thanks, thanks a lot trushkin now is clear