Re: Protocol recommendation for CAN(FD)-USB adapter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue. 20 Feb. 2024 at 17:10, Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> wrote:
>
> On 20.02.2024 08:49:26, Dr. Michael 'Mickey' Lauer wrote:
> > Hi Marc,
> >
> > >>
> > >> Sounds pretty cool. Our design is based on an ESP32-S3 though, so I
> > >> have to duplicate that effort. Is there some kind of USB protocol
> > >> definition for what gs-usb expects or do I need to learn that from the
> > >> implementation?
> > >
> > > I've put together a very rough summary of the driver's side of view:
> > >
> > > https://gist.github.com/marckleinebudde/99f72d9db67accf08cc6efa367cfe54b
> > >
> > > Feel free to update.
> >
> > Wow, that’s very kind of you!
>
> :)
>
> > Later this year I’ll take this blueprint to implement the necessary
> > changes in our firmware. I’ll enhance / update your summary
> > as I’ll go.
>
> If you discover any odd points or areas for improvement in the USB
> protocol, please let us know.
>
> Currently, TX-complete sends the _entire_ structure back to the host,
> which is quite an overhead, especially for CAN FD frames. We're working
> on a "short-tx-complete" feature.

The es581.4 may be doing what you are looking for:

  - When sending a frame, the driver attaches a 32 bit index:
https://elixir.bootlin.com/linux/v6.7/source/drivers/net/can/usb/etas_es58x/es581_4.h#L78
  - When receiving the TX completion message, the device just send
back that index and a timestamp:
https://elixir.bootlin.com/linux/v6.7/source/drivers/net/can/usb/etas_es58x/es581_4.h#L97

The device is agnostic of what this index represents. The driver uses
the index from the can_put_echo_skb() / can_get_echo_skb().

(in addition the driver can handle bulk send and receive but that's
another story).


Yours sincerely,
Vincent Mailhol





[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux