Ethernet Gateway FD + CAN 2.0: Error on Initialize_2013/InitializeFD_2013

A free API for the communication with control devices according to UDS (ISO 14229-1)
Post Reply
T.Thomas
Posts: 3
Joined: Fri 29. Apr 2022, 09:01

Ethernet Gateway FD + CAN 2.0: Error on Initialize_2013/InitializeFD_2013

Post by T.Thomas » Wed 19. Jul 2023, 15:28

Hi all,

I am currently trying to set up the UDS-API + Ethernet Gateway FD for -non- FD CAN communication, CAN 2.0. From what I have read, I saw two options to go about it, but both fail:

1. Default Bitrates and Initialize_2013

- Gateway Configuration on the Website
Bit Rate Definition: "Selected from standard list"
CAN FD: Unchecked
Clock Frequency: 24MHz
Nominal Bit Rate: 500kbit/s

- Code
UDSApi.Initialize_2013(cantp_handle.PCANTP_HANDLE_LANBUS1, cantp_baudrate.PCANTP_BAUDRATE_500K)

-> this fails with error code: 0x88000000 -> PCAN_ERROR_ILLOPERATION (?)

2. Bitrate Register String and InitializeFD_2013

- Gateway Configuration on the Website
CAN FD: Unchecked
Bit Rate Definition: "Set with register string"
Bit Rate Register String: "f_clock=24000000,nom_brp=3,nom_tseg1=13,nom_tseg2=2,nom_sjw=1"

- Code
UDSApi.InitializeFD_2013(cantp_handle.PCANTP_HANDLE_LANBUS1, "f_clock=24000000,nom_brp=3,nom_tseg1=13,nom_tseg2=2,nom_sjw=1")

-> this fails with error code: 0x80080000 -> PCAN_ERROR_ILLMODE (?)


Could you help me find the right approach? I suspect the first variant doesn't work, as the "standard" 500kbit/s of the gateway might use a different timing than what ever cantp_baudrate.PCANTP_BAUDRATE_500K resolves to. And the second approach probably doesn't work, as it is only ment for proper CAN FD communication. Am I missing an overload for Initialize_2013, that takes a bit rate register string?

F.Vergnaud
Software Development
Software Development
Posts: 305
Joined: Mon 9. Sep 2013, 12:21

Re: Ethernet Gateway FD + CAN 2.0: Error on Initialize_2013/InitializeFD_2013

Post by F.Vergnaud » Wed 19. Jul 2023, 16:26

Hello,

This is indeed a known issue that will be fixed in a future release.

For now the workaround is to:
1. configure the PCAN-Ethernet Gateway with a bitrate string that matches "CAN (SJA1000)" mode (as defined in PCAN-View).

Code: Select all

f_clock=24000000,nom_brp=3,nom_tseg1=13,nom_tseg2=2,nom_sjw=1
2. use function Initialize_2013 to connect to the PCAN_LANBUS1.

Code: Select all

UDSApi.Initialize_2013(cantp_handle.PCANTP_HANDLE_LANBUS1, cantp_baudrate.PCANTP_BAUDRATE_500K)
Best regards,
Fabrice

T.Thomas
Posts: 3
Joined: Fri 29. Apr 2022, 09:01

Re: Ethernet Gateway FD + CAN 2.0: Error on Initialize_2013/InitializeFD_2013

Post by T.Thomas » Thu 20. Jul 2023, 10:31

... the one combination I didn't try, great :D It works like this and the default timings should be fine for now. Many thanks!

Post Reply