cantools with pacn for CAN FD

The free CAN Software API (Application Programming Interface) for Windows®
Post Reply
Kevin1
Posts: 14
Joined: Sun 2. Jun 2024, 10:40

cantools with pacn for CAN FD

Post by Kevin1 » Sun 6. Oct 2024, 17:26

I have trying to use cantools with pcan for CAN FD

however I got a error message below and can you advise me what else should I add or correct?

"A parameter contains an invalid value"




import cantools
import can
import time


bus = can.interface.Bus(channel='PCAN_USBBUS1', interface='pcan', bitrate=500000, data_bitrate=2000000, fd=True)
Attachments
pcan.jpg
pcan.jpg (62.22 KiB) Viewed 6402 times

Kevin1
Posts: 14
Joined: Sun 2. Jun 2024, 10:40

Re: cantools with pacn for CAN FD

Post by Kevin1 » Sun 6. Oct 2024, 17:35

If I set it as below, it works for only CAN 500K not CAN FD... even if fd is set True.....

bus = can.interface.Bus(channel='PCAN_USBBUS1', interface='pcan',bitrate=500000, data_bitrate=2000000,fd=True,f_clock=80000000,nom_brp=2,nom_tseg1=63,nom_tseg2=16,nom_sjw=16,data_brp=2,data_tseg1=15,data_tseg2=4,data_sjw=4)

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: cantools with pacn for CAN FD

Post by PEAK-Support » Mon 7. Oct 2024, 09:00

What does not work? Sending CAN Frames with the Fast Bitrate ? Are you sure you have Set the BRS Bit?
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

Post Reply