On 16.07.2022 14:04:09, Matej Vasilevski wrote: > This patch adds support for hardware RX timestamps from Xilinx Zynq CAN > controllers. The timestamp is calculated against a timepoint reference > stored when the first CAN message is received. > > When CAN bus traffic does not contain long idle pauses (so that > the clocks would drift by a multiple of the counter rollover time), > then the hardware timestamps provide precise relative time between > received messages. This can be used e.g. for latency testing. Please make use of the existing cyclecounter/timecounter framework. Is there a way to read the current time from a register? If so, please setup a worker that does that regularly. Have a look at the mcp251xfd driver as an example: https://elixir.bootlin.com/linux/latest/source/drivers/net/can/spi/mcp251xfd/mcp251xfd-timestamp.c Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Attachment:
signature.asc
Description: PGP signature