nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

arch/arm/samv7: Initial support of SocketLIN master interface

Open pkarashchenko opened this issue 2 years ago • 12 comments

Summary

Initial support of SocketLIN interface for SAMv7

Impact

New feature

Testing

TBD

pkarashchenko avatar Oct 23 '23 14:10 pkarashchenko

@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 avatar Oct 30 '23 18:10 acassis

@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.

pkarashchenko avatar Oct 31 '23 09:10 pkarashchenko

@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 ?

xucheng5 avatar Nov 24 '23 06:11 xucheng5

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.

pkarashchenko avatar Dec 03 '23 21:12 pkarashchenko

👍 looking forward to your good news

xucheng5 avatar Dec 05 '23 01:12 xucheng5

@pkarashchenko HI, do you have any update about SocketLIN slave ?

xucheng5 avatar Jan 09 '24 11:01 xucheng5

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

pkarashchenko avatar Jan 18 '24 00:01 pkarashchenko

@xucheng5 please take a look

pkarashchenko avatar Jan 26 '24 11:01 pkarashchenko

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.

xucheng5 avatar Feb 18 '24 09:02 xucheng5

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.

pkarashchenko avatar Feb 19 '24 00:02 pkarashchenko

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.

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

pkarashchenko avatar Feb 19 '24 00:02 pkarashchenko

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.

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

agree with it ! looking foward to it

xucheng5 avatar Feb 28 '24 01:02 xucheng5