Skip to main content
Macun
Associate II
Oct 24, 2022 1:25 PM UTC
Question

Can I send data via CAN bus by reading data from USB using STM32?

I have a GPS module and I use it by connecting it to my computer via USB.

I also want a CAN bus output. 

Can I use the STM32F730R8T6 processor?

How can I introduce the information from the USB to the STM32 processor? Which pins should I use?

After doing this I also need to get a CAN bus output.

Can you help me?

This topic has been closed for replies.

3 replies

gbm
Super User
Oct 24, 2022 5:01 PM UTC

First, get familiar with USB CDC or HID class - both are supported by CubeMX, choose the one which suits you best.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
Karl Yamashita
Super User
Oct 24, 2022 6:48 PM UTC

You can see if this video will get you started https://www.youtube.com/watch?v=oe5JmYYAZy0

It shows how to set the STM32 as a Custom HID device and also use CAN bus.

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
Javier1
Principal
Oct 25, 2022 10:27 AM UTC

STM32F730R8T6 is a bit overkill but yes,

MIND the extra transceiver needed : almost everyone forgets they need the canbus transceiver IC when starting with canbus

hit me up in https://www.linkedin.com/in/javiermuñoz/