Electronics > Projects, Designs, and Technical Stuff
CAN Bus and USB on the same pins
(1/1)
NW27:
Hi,
I'm developing a device that will probably use a STM32 and will primarily use the CAN bus as it's normal communication method. It could be connected to a CAN network with 20 other devices?

If the firmware requires updating, I would like it if the device could be disconnected from the CAN network and connect as a USB Comm  device to a computer for firmware updating.
The reason for this is that I'm very limited on the number of external pins (six) available out of the device.
1- Pos Supply
2- Neg Supply
3- Reset
4- Comms-1  (CAN_H / USB D+)
5- Comms-2  (CAN_L / USB D-)
6- PWM Input for Wakeup and Comms Type (CAN/USB)


Ie CAN_H physically connected to USB D+ and CAN_L physically connected to USB D-.

A third pin would be used to advise the STM32 what mode of communication it should be using ie Normal communication (CAN Bus) or Boot loader mode (USB).

Has anyone tried this style of thing before?

Thanks,
Neil.
eliocor:
If you need to do some firmware upgrade, just take a look at the following document:
https://www.st.com/content/ccc/resource/technical/document/application_note/56/94/0c/7d/63/f6/4d/96/CD00264321.pdf/files/CD00264321.pdf/jcr:content/translations/en.CD00264321.pdf 
(without using the USB bus, but just the CAN bus)
NW27:
Great info,
Thanks.
Navigation
Message Index
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod