Search found 10 matches

by martin.wagner
Tue 23. Oct 2018, 14:26
Forum: Linux
Topic: socketCAN invalid rx timestamps
Replies: 8
Views: 8343

Re: socketCAN invalid rx timestamps

Hi,

thanks for your reply.

I'm using the 8.6.0 source driver in netdev mode and with socketCAN interface. Hope that is correct now :-)

Adding "deftsmode=0" to pcan.conf file fixed the software timestamps for me. I've stopped reading docs at "install package" :oops: .

regards
by martin.wagner
Tue 23. Oct 2018, 08:03
Forum: Linux
Topic: socketCAN invalid rx timestamps
Replies: 8
Views: 8343

Re: socketCAN invalid rx timestamps

Hi,

I'm using the USB adapters to debug an embedded application on my desktop PC, as this simplifies development quite a bit. The SOC CAN module uses socketCAN, so I can't switch driver.

The SOC can driver (flexcan) produces valid software timestamps, however it doesn't implement hardware ...
by martin.wagner
Mon 22. Oct 2018, 14:27
Forum: Linux
Topic: socketCAN invalid rx timestamps
Replies: 8
Views: 8343

Re: socketCAN invalid rx timestamps

Thanks, the canutils repo moved home again...

I've played with TIMESTAMPING mode a bit, but I still can't get it to work properly. When I use this like in candump.c, I expect to get software timstamp in stamp[0] and hardware timestamp in stamp[2]. However, there is no difference between those two ...
by martin.wagner
Wed 17. Oct 2018, 16:58
Forum: Linux
Topic: socketCAN invalid rx timestamps
Replies: 8
Views: 8343

Re: socketCAN invalid rx timestamps

Thanks for your reply!

Can you please give some more details? I've replaced SO_TIMESTAMP option with SO_TIMESTAMPING in candump.c, however now timestamping stopped working completely. I also don't have a variable stamp[0], neither in cmsg struct nor anywhere in candump.c.

Is this problem specific ...
by martin.wagner
Tue 16. Oct 2018, 14:07
Forum: Linux
Topic: socketCAN invalid rx timestamps
Replies: 8
Views: 8343

socketCAN invalid rx timestamps

Hi@all,

I'm having a problem with getting kernel/driver generated timestamps on PCAN USB Interface / socketCAN driver. After some time, the kernel timestamps of received messages are in the future compared to locally generated timestamps:

clock_gettime: (2018-10-16 13:28:50.365177) kernel ...
by martin.wagner
Mon 19. Dec 2016, 15:39
Forum: Linux
Topic: Socket Driver repeating messages after bus disconnected
Replies: 9
Views: 10553

Re: Socket Driver repeating messages after bus disconnected

Please Unplug and PlugIn the CAN-USB and check if this Problem is still there.
this fixes the problem.

How could you be sure that these CAN Frames are not on the BUS? '
I've connected a third device in listen only mode to the bus (freescale I-MX28 device running embedded linux).

Same setup as ...
by martin.wagner
Mon 19. Dec 2016, 14:18
Forum: Linux
Topic: Socket Driver repeating messages after bus disconnected
Replies: 9
Views: 10553

Re: Socket Driver repeating messages after bus disconnected

no problem. It's getting really strange now :shock:

In this log are two messages per second on the bus (that is correct). The ID 704 message is transmitted by a socket application and the 705 by a bus device.

output of candump -t A can0

-- everything is fine here --
(2016-12-19 14:08:07.531693 ...
by martin.wagner
Thu 15. Dec 2016, 15:39
Forum: Linux
Topic: Socket Driver repeating messages after bus disconnected
Replies: 9
Views: 10553

Re: Socket Driver repeating messages after bus disconnected

Hi,

I don't have status/error messages enabled for the socket. The messages I'm getting are regular messages that have passed the driver at some point. However, they are not on the physical bus at that moment of time.

Maybe a few comments inside the screenshots will clarify my problem

canopen3 ...
by martin.wagner
Tue 13. Dec 2016, 17:03
Forum: Linux
Topic: Socket Driver repeating messages after bus disconnected
Replies: 9
Views: 10553

Re: Socket Driver repeating messages after bus disconnected

This also happens when my slave device disables the CAN hardware.
In my case, this is the case when the master requests the slave to enter bootloader mode.
by martin.wagner
Mon 12. Dec 2016, 11:02
Forum: Linux
Topic: Socket Driver repeating messages after bus disconnected
Replies: 9
Views: 10553

Socket Driver repeating messages after bus disconnected

Hi @all,

I'm having some problems using the socketcan interface that comes with the pcan driver.
My set up is the following:
- Linux PC with pcan interface, master software working on one socket, Wireshark/candump sniffing on another socket.
- Microcontroller with integrated can interface, working ...