Skip to main content
Javier1
Principal
Dec 22, 2021 2:44 PM UTC
Question

Did anyone managed to read CANBUS without canbus peripheral? (softcanbus)

Is there any way for chips without the Canbus peripheral to read canbus?

No external chips allowed

Maybe uart or bitbanging gpios?

0693W00000HpX5xQAF.png

This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
Dec 22, 2021 5:10 PM UTC

No, better things to do...

If you're willing to grind through the data, you can basically create a logic-analyzer via TIM+DMA+GPIO, sampling fast enough so you can synchronize to the edges, and then step the buffer to extract the HI/LO pairs at the center/sample points, etc. It doesn't look to be overwhelming complex, although perhaps limited in upper bandwidth.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Michal Dudka
Lead
Dec 22, 2021 5:16 PM UTC

Or you can use timer input capture + DMA to take timestaps for rising and falling edges. That should be able "read" speeds over 1Mb/s.

Uwe Bonnes
Chief
Dec 23, 2021 10:06 AM UTC

Canbus needs collision handling during the burst. So capture and evaluation afterwards is doomed for failure in the field. Bitbanging the protocoll with highest priority for a low bit rate should be doable, but will require a lot of work and understanding of the protocoll and its niches