Correct settings to timestamp only PTP packets Stm32h723
Hi,
I have a ported version of PTPD working on my Stm32h723. Right now, I have the ETH_MACTSCR_TSENALL bit set so that every packet gets timestamped. This is, however, wasteful since it means every single packet rx, be it ptp or not uses an extra eth dma descriptor for the timestamp.
I now want to configure the mac to only timestamp PTP packets, but no matter what settings I use in MACTSCR, I cannot get this to work. Unless TSENALL is set, regardless of the rest of the MACTSCR settings, I either get no PTP packets coming through or PTP packets without timestamps. I do not want any automatic generation of messages, I just want rx timestamps on PTP packets only.
I don't really understand or believe the Stm32h723 reference manual with regard to the MACTSCR bits. For example, table 560 shows that with TSEVNTENA set, only a subset of the event messages are included at best. This doesn't make any sense, given that this bit is supposed to include event packets specifically. In table 560, I want to select all of the event messages, so I'd want all four bits (SNAPTYPSEL0,1 TSMSTRENA TSEVNTENA) cleared. That doesn't make sense to me, that you'd only ever be able to timestamp all event messages if this bit is cleared.
My setup is: Ieee1588v2 sent over PTP frames (ie, not UDP). I want the mac to capture the timestamp of ONLY all event messages (SYNC, Follow_Up, Delay_Req, Delay_Resp). I do not want the mac to auto generate messages.
What are the correct bits to set for that goal?
Thanks,
