You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "fjpanag (via GitHub)" <gi...@apache.org> on 2023/02/16 19:40:31 UTC

[GitHub] [nuttx] fjpanag opened a new pull request, #8548: stm32_eth: Busy bit is cleared before accessing the MACMIIAR register.

fjpanag opened a new pull request, #8548:
URL: https://github.com/apache/nuttx/pull/8548

   ## Summary
   
   According to the [reference manual](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwiUy5K15Jr9AhVrS_EDHRyVBBYQFnoECAkQAQ&url=https%3A%2F%2Fwww.st.com%2Fresource%2Fen%2Freference_manual%2FDM00031020-.pdf&usg=AOvVaw0nlYG0-E_-S5C6634BQCvf) page 1197, the "busy" bit in the `MACMIIAR` register **must** be cleared before accessing the `MACMIIAR` and the `MACMIIDR` registers.
   
   Typically, this bit should already be cleared by the MAC during the last operation.  
   However I cannot see any way that this is guaranteed. The previous operation may have timed-out, and the bit may be still set. I am not sure whether any errors in the MAC may leave this bit set indefinitely.
   
   Now, the bit is always cleared, as it ought to be, before any access to the aforementioned registers.
   
   ## Impact
   
   More "correct" operation of the STM32 Ethernet driver.  
   It is possible that it also solves a very rare bug that I encounter, where the MAC data are corrupted.
   
   ## Testing
   
   Tested on a custom target, based on the STM32F427 MCU.  
   This firmware makes a lot of `SIOCGMIIREG` `ioctl()`'s and so far everything works great.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 merged pull request #8548: stm32_eth: Busy bit is cleared before accessing the MACMIIAR register.

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #8548:
URL: https://github.com/apache/nuttx/pull/8548


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org