ppisa commented on issue #15567:
URL: https://github.com/apache/nuttx/issues/15567#issuecomment-2621160125

   For your information (@raiden00pl, @acassis, @radek-pesina, @tmedicci ), the 
CAN FD stack developed for RTEMS by @michallenc has undergone 
[review](https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/49) 
(hundreds minor style, naming etc. details solved during review) and has been 
mainlined.
   
   I propose use bittiming from that driver for NuttX. See 
[dev/can/can-bittiming.h](https://gitlab.rtems.org/rtems/rtos/rtems/-/blob/main/cpukit/include/dev/can/can-bittiming.h)
 and 
[dev/can/can-bittiming.c](https://gitlab.rtems.org/rtems/rtos/rtems/-/blob/main/cpukit/dev/can/can-bittiming.c).
 It is same model which I have proposed for SocketCAN 20 years ago and which is 
used by Linux kernel till today - 
[include/uapi/linux/can/netlink.h](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/can/netlink.h?h=v6.13)
 and 
[drivers/net/can/dev/calc_bittiming.c](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/can/dev/calc_bittiming.c?h=v6.13).
 The code originates from [LinCAN](https://ortcan.sourceforge.net/lincan/) and 
that basic part used for RTEMS has been maintained whole time outside Linux 
source tree and that is why we have had full right to use following license
   ```
   BSD-2-Clause OR Apache-2.0 OR GPL-2.0-or-later
   ```
   So the code should be properly licensed for NuttX.
   
   I am not sure when I or somebody from people from the groups connected to me 
get to that but this is the plan, goal for future incremental step.
   
   Then we can test the approach on CTU CAN FD, I have tested @raiden00pl CTU 
CAN FD NuttX driver against x86 QEMU. I have tested our complete RTEMS stack on 
our LPC40xx LX_CPU board with hacked CTU CAN FD instance in FPGA in addition to 
our standard Zynq setup and I have NuttX running on LX_CPU as well, so adapting 
the driver to run on real hardware after adding required bittiming support 
should not take much effort.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to