using CAN_InitializeFD api in linux
Posted: Thu 7. May 2020, 17:52
Hi,
I'm using peak_basic api (in c language on linux).
Till today I used the CAN_Initialize function api since I worked only with the classical can messages.
Now I would like to work with can FD messages as well.
I have some questions regarding it:
1. Is the FD api backward compatible? I mean can I use CAN_InitializeFD to work with can FD messages as well as classical can messages?
2. If the answer for 1 is yes, then should I change the parameters for CAN_InitializeFD each time to work for both FD and classical can messages?
The second parameter for the CAN_InitializeFD function is a string that contains parameters:
f_clock=80000000,nom_brp=2000,nom_tseg1=5,nom_tseg2=2,nom_sjw=1,data_brp=4,data_tseg1=7,data_tseg2=2,data_sjw=1
What are tseg, sjw stand for and how would I know what values to fill them in order to work with both classical and FD can messages.
I saw some examples online, but I didn't find an explanation how would I know what values to use in order it to work and if someone try to use the CAN_InitializeFD to work also with classical can messages (not the fd can messages).
I would appreciate your help.
Thanks,
Shai
I'm using peak_basic api (in c language on linux).
Till today I used the CAN_Initialize function api since I worked only with the classical can messages.
Now I would like to work with can FD messages as well.
I have some questions regarding it:
1. Is the FD api backward compatible? I mean can I use CAN_InitializeFD to work with can FD messages as well as classical can messages?
2. If the answer for 1 is yes, then should I change the parameters for CAN_InitializeFD each time to work for both FD and classical can messages?
The second parameter for the CAN_InitializeFD function is a string that contains parameters:
f_clock=80000000,nom_brp=2000,nom_tseg1=5,nom_tseg2=2,nom_sjw=1,data_brp=4,data_tseg1=7,data_tseg2=2,data_sjw=1
What are tseg, sjw stand for and how would I know what values to fill them in order to work with both classical and FD can messages.
I saw some examples online, but I didn't find an explanation how would I know what values to use in order it to work and if someone try to use the CAN_InitializeFD to work also with classical can messages (not the fd can messages).
I would appreciate your help.
Thanks,
Shai