Author Topic: CAN Bus and USB on the same pins  (Read 726 times)

0 Members and 1 Guest are viewing this topic.

Offline NW27Topic starter

  • Regular Contributor
  • *
  • Posts: 53
  • Country: au
CAN Bus and USB on the same pins
« on: July 31, 2019, 01:56:37 am »
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.
 

Offline eliocor

  • Supporter
  • ****
  • Posts: 531
  • Country: it
    • rhodiatoce
Re: CAN Bus and USB on the same pins
« Reply #1 on: July 31, 2019, 02:33:34 am »
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)
 

Offline NW27Topic starter

  • Regular Contributor
  • *
  • Posts: 53
  • Country: au
Re: CAN Bus and USB on the same pins
« Reply #2 on: August 04, 2019, 11:24:11 pm »
Great info,
Thanks.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf