Need help reading GMLAN (SW-CAN 33.3kbps)

zalexzperez
Posts: 1
Joined: Mon Jul 17, 2023 2:13 pm

Need help reading GMLAN (SW-CAN 33.3kbps)

Postby zalexzperez » Mon Jul 17, 2023 2:15 pm

Hello,

I've been able to read the MS-CAN (95kbps) in my GM car using the next hardware combinations powered from a laptop's USB port:

-ESP32 devkitc V4 module + SN65HVD230 transceiver

-Arduino Uno + CAN board with controller MCP2515 (+TJA1050 transceiver)

I was also successful reading the LS-CAN (33.3kbps) with the Arduino Uno, by connecting CAN_L to ground and CAN_H to the single-wire bus.

However, when using the ESP32, no data is received, and what's worse, when CAN_L is connected to ground, the speedometer and headunit display (GID screen) get turned off! Why? Edit: I found out disconnecting the TX connection between uC and transceiver stops the problem.

I'm using Sandeep Mistry's Arduino-CAN library, but since it's unmaintained, I have mister0wl's fork which has support for the newer ESP32 chips, that allow configuring lower baud rates (<50kbps)

I was thinking about using the MCP2515 + SN65HVD230, but I'm not sure there are libraries out there that accept this combo along with low baud rates.

Has anyone been lucky doing this with the ESP32?

EDIT: I would like to use the TWAI driver and no 3rd party libraries. Can somebody help me setup the driver for this custom baudrate?

Thanks

DrMickeyLauer
Posts: 168
Joined: Sun May 22, 2022 2:42 pm

Re: Need help reading GMLAN (SW-CAN 33.3kbps)

Postby DrMickeyLauer » Fri Sep 29, 2023 1:27 pm

Perhaps I'm oversimplifying, but isn't it "just" augmenting

Code: Select all

hal/include/hal/twai_types.h 
with another timing configuration? Valid values for brp, tseg_1, test_2, sjw, and triple_sampling for the bitrates you're after should be documented somewhere.

Transisted
Posts: 4
Joined: Mon Oct 02, 2023 10:41 pm

Re: Need help reading GMLAN (SW-CAN 33.3kbps)

Postby Transisted » Mon Oct 02, 2023 10:56 pm

I have also accessed the GM low speed bus.. .33.3kbps? I believe I did this with same library as you on ESP32, however my other main project uses the 500kbps CAN bus and I am having big problems finding ESP32 Devkit V1's that work... the older ones I have work fine but the newer ones.. only 1 out of 9 work on GM CAN.

They will work if I wire them together and send messages, but only 1 works on the GM CAN network. Wonder if your problem is related. All of my other ESP32 versions work fine *Devkit v4, NodeMCU, etc).

DrMickeyLauer
Posts: 168
Joined: Sun May 22, 2022 2:42 pm

Re: Need help reading GMLAN (SW-CAN 33.3kbps)

Postby DrMickeyLauer » Tue Nov 07, 2023 9:33 am

I wonder whether it's possible at all to use the standard CAN controller together with a single-wire CAN transceiver…

Transisted
Posts: 4
Joined: Mon Oct 02, 2023 10:41 pm

Re: Need help reading GMLAN (SW-CAN 33.3kbps)

Postby Transisted » Thu Feb 01, 2024 9:13 pm

DrMickeyLauer wrote:
Tue Nov 07, 2023 9:33 am
I wonder whether it's possible at all to use the standard CAN controller together with a single-wire CAN transceiver…
Not sure how to do that.. the ESP32 uses RX and TX to the external CAN transceiver.

DrMickeyLauer
Posts: 168
Joined: Sun May 22, 2022 2:42 pm

Re: Need help reading GMLAN (SW-CAN 33.3kbps)

Postby DrMickeyLauer » Fri Feb 02, 2024 2:35 pm

I guess this is no problem. I have checked data sheets of some single wire CAN transceivers and it looks like it's only the physical layer that's different. From the controller side, it's still RXD/TXD.

Who is online

Users browsing this forum: No registered users and 95 guests