This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch releases/13.1
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 2e0b5164426cb4537ec018eaa160c2a2527cd7a4
Author: Daniel P. Carvalho <[email protected]>
AuthorDate: Sun Sep 20 13:58:13 2026 -0300

    arch/arm/stm32: fix the comment of the RX timestamp conversion.
    
    The comment of stm32_eth_ptp_convert_rxtime() said that it converts to
    CLOCK_REALTIME. Since the timestamp is delivered as the value of the
    PTP counter of the MAC, which is the time base of /dev/ptp0, say
    that.
    
    Signed-off-by: Daniel P. Carvalho <[email protected]>
    Assisted-by: Claude:claude-sonnet-5
---
 arch/arm/src/common/stm32/stm32_eth_m3m4_v1.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm/src/common/stm32/stm32_eth_m3m4_v1.c 
b/arch/arm/src/common/stm32/stm32_eth_m3m4_v1.c
index a33b15a6bc7..50b0cedad79 100644
--- a/arch/arm/src/common/stm32/stm32_eth_m3m4_v1.c
+++ b/arch/arm/src/common/stm32/stm32_eth_m3m4_v1.c
@@ -3749,7 +3749,10 @@ static inline void ptp_to_timespec(uint64_t timestamp, 
struct timespec *ts)
   ts->tv_nsec = ((uint32_t)timestamp * (uint64_t)NSEC_PER_SEC) >> 32;
 }
 
-/* Convert RX timestamp to CLOCK_REALTIME */
+/* Convert the RX timestamp of the MAC to a timespec. It is the value of the
+ * PTP counter of the MAC, which is the time base of /dev/ptp0, and not a
+ * value of CLOCK_REALTIME.
+ */
 #ifdef CONFIG_STM32_ETH_TIMESTAMP_RX
 static void stm32_eth_ptp_convert_rxtime(struct stm32_ethmac_s *priv)
 {

Reply via email to