Ethernet Gateway FD + CAN 2.0: Error on Initialize_2013/InitializeFD_2013
Posted: 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?
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?