arch/arm/samv7: Initial support of SocketLIN master interface
Summary
Initial support of SocketLIN interface for SAMv7
Impact
New feature
Testing
TBD
@pkarashchenko please include a Documentation/ for this subsystem. Maybe you can use https://nuttx.apache.org/docs/latest/components/net/socketcan.html as reference
@acassis I'm a bit in a time pressure right now. I plan to add SocketLIN slave as well as a part of this PR before Nov 27. I will include documentation as well.
@acassis I'm a bit in a time pressure right now. I plan to add SocketLIN slave as well as a part of this PR before Nov 27. I will include documentation as well.
HI, @pkarashchenko do you have any update about SocketLIN slave ?
I have some code for the lin slave added, but I'm having some troubles with verifying it. I will need logic analyser to figure out what is going on, but unfortunately my LA will come in 2 weeks. Till that time I can clean-up all the debug code I added and push changes for the LIN slave to this PR as well on the upcoming week.
👍 looking forward to your good news
@pkarashchenko HI, do you have any update about SocketLIN slave ?
Hi. Thank you for the reminder. I finally managed to inspect my setup with LA. I have a board that has two LIN interfaces and I simply connected those two (kind of external loopback) together and configured one as master and second one as slave. Based on the multiple tests I suspect that my board has some issues with the USART TX line for one of the LIN interfaces so I can't fully pass the happy path test cases. Unfortunately I have only one such board :( Let me push to this branch whatever I have (with some test code) so you can have a better idea of what I'm testing and maybe we can continue conversation right after
@xucheng5 please take a look
maybe we can use lin_frame_t instead of struct can_frame to make a difference between can and lin which means use typedef struct can_frame lin_frame_t to redefine struct can_frame.
Seems like I finally found an issue with my board. Seems to be SW related. I have a change and will try to test it this week.
maybe we can use
lin_frame_tinstead ofstruct can_frameto make a difference between can and lin which means usetypedef struct can_frame lin_frame_tto redefinestruct can_frame.
Hi. I tried to stick to https://github.com/lin-bus/linux-lin/blob/master/sllin/sllin.c as close as possible. That typedef can be done, but I do not see a real benefit from it. I'm testing this change with standard CAN utilities like cansend, so only the underlying interface name is linX. I think this is a right path to go
maybe we can use
lin_frame_tinstead ofstruct can_frameto make a difference between can and lin which means usetypedef struct can_frame lin_frame_tto redefinestruct can_frame.Hi. I tried to stick to https://github.com/lin-bus/linux-lin/blob/master/sllin/sllin.c as close as possible. That typedef can be done, but I do not see a real benefit from it. I'm testing this change with standard CAN utilities like
cansend, so only the underlying interface name islinX. I think this is a right path to go
agree with it ! looking foward to it