I have issues using PCANbasic API for CAN_FD for Python (I don't have any issues for normal CAN).
First of all, I don't have any issues through PCAN View, I can read and write CAN_FD frames.
But through my python script, I can send frames but when I try to read frames it doesn't work. I just receive three time a frame with these information :
ID = 1, DLC = 4, DATA = 0 (which looks like a status message)
After that, I receive a 0x20 status (empty queue).
Whereas, I should receive many frames every 100ms with different ID, not empty datas and DLC = 16.
Here's the configuration that work with PCAN view :
Code: Select all
Clock = 80MHz
Nominal :
BR = 1M/s
Sample point = 87.5%
Prescaler = 1
TSEG1 = 69
TSEG2 = 10
SJW = 10
tqs = 12.5ns
Nq = 80
DATA:
BR = 5M/s
Sample point = 87.5%
Prescaler = 1
TSEG1 = 13
TSEG2 = 2
SJW = 2
tqs = 12.5ns
Nq = 16
Code: Select all
b"f_clock_mhz=80, nom_brp=1, nom_tseg1=69, nom_tseg2=10, nom_sjw=10, nom_sam=87.5, data_brp=5, data_tseg1=13, data_tseg2=2, data_sjw=2, data_ssp_offset=87.5"
When I read my configuration all the parameters are good except nom_sam which is =1 and data_ssp_offset which is = 0.
Could you help me please.
Have a great day !