Page 1 of 1

cantools with pacn for CAN FD

Posted: Sun 6. Oct 2024, 17:26
by Kevin1
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)

Re: cantools with pacn for CAN FD

Posted: Sun 6. Oct 2024, 17:35
by Kevin1
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)

Re: cantools with pacn for CAN FD

Posted: Mon 7. Oct 2024, 09:00
by PEAK-Support
What does not work? Sending CAN Frames with the Fast Bitrate ? Are you sure you have Set the BRS Bit?