On 11/12/19 10:53 AM, Joakim Zhang wrote: >>>> Yes, these timestamps are all over the place. It's due to the "big" >>>> gap of 100ms between the CAN frames. What's the configured bitrate of >> your bus? >>> >>> ip link set can0 up type can bitrate 1000000 >> >> With 1Mbit/s you have overruns every 65ms (worst case). > > Yes. What's the bitrate you want me have a test? Don't know, all :) > I have a question, mailbox read has taken counter overflow into > consideration, why does overflow quite often will cause the frame > disorder? If you send packet with 100ms delay and have 6 packets in the mailboxes, this means you have more than 10 counter overflows. This means it's impossible to sort the CAN frames by timestamp. Why does the wakeup from first packet to IRQ handler take so long? I suggest to set a flag in the suspend handler and evaluate the flag in the interrupt handler. If the flag is set, we have to ignore the timestamp. 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: OpenPGP digital signature