[En-Nut-Discussion] RFC: CAN Bus driver buffer handling
Henrik Maier
hmnews at proconx.com
Thu Aug 6 00:57:47 CEST 2009
Hi Ole,
> Subject: Re: [En-Nut-Discussion] RFC: CAN Bus driver buffer handling
> Great! Currently I don't have any hardware with SJA1000 available. Do
> you have any possebility to test this driver too? (I'll modify it, but
> it then needs a test).
Yes I do have a AVR CPU module with SJA1000 so I can run tests.
> > - unified API for setting masks and filters so this works across all
> > supported CAN controllers
>
> Second step :-) Unfortunately the controllers differ quite much...
I know, this may be a challenge but is possible. I was involved in the
CAN4Linux project and it was done there too.
> I just included setting buffer sizes in steps of power of two (so you
> can use a simple & instead of the very expensive modulo operation for
> the ringbuffer).
Sounds fine with me. The power-of-2 approach is also found in Nut/OS message
queues, so it's nothing new to the user.
> > - Buffer size configurable differently for RX and TX
>
> Ok, so far I'll add two settings for both buffers. Currently the ATCAN
> driver does not support buffering for tx at all, right? It is limited by
> the MOB objects of the controller, right?
Yes but again this was done purely because of the limiting silicon bug of
the early AT90CAN128 chips. We could remove that limitation now.
Henrik
More information about the En-Nut-Discussion
mailing list