Skip to main content
Maddi.Mike
Associate III
June 12, 2013
Question

USB CAN conflict with STM32F103

  • June 12, 2013
  • 4 replies
  • 1110 views
Posted on June 12, 2013 at 16:34

I am brand new to USB development. I am using the STM32F103 in a new prototype board and keil tools to develop with. During my search all over the internet for information and examples, I came across the following quote found here

http://www.keil.com/forum/18295/

''As far as i remember there are some hardware issues with the stm32f1xx where some buffers/ram area are common for usb and can, so practically it is impossible to use usb and can at the same time...''

First of all, is this true because my application needs both CAN and USB?

Secondly, if not true, can someone please show me some actual code on how to initialize the USB device so I can connect my prototype board to a PC and send and receive data via the USB?

Thanks.

#usb-can-stm32f
This topic has been closed for replies.

4 replies

Tesla DeLorean
Guru
June 12, 2013
Posted on June 12, 2013 at 17:09

It is true, they share a common 512 byte buffer, and pins. Review the functional diagram if you doubt.

The F105/107 ''Connectivity'' parts are different, and have provision for both.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
dthedens23
Associate
June 12, 2013
Posted on June 12, 2013 at 17:21

you will have to use an F3 or F4.

 

RM0008   page 629

In low, medium-, high- and XL-density devices the USB and CAN share a dedicated 512-byte SRAM memory for data transmission and reception, and so they cannot be usedconcurrently (the shared SRAM is accessed through CAN and USB exclusively). The USBand CAN can be used in the same application but not at the same time. 

Maddi.Mike
Associate III
June 12, 2013
Posted on June 12, 2013 at 17:35

Why didn't I see that! Sorry for my oversight everyone. Thanks for your answers. Now what do I do?

Tesla DeLorean
Guru
June 12, 2013
Posted on June 12, 2013 at 18:05

Now what do I do?

There's always eBay, half a dozen STM32F107 boards there.

Also some nice F207 ones, with

http://www.ebay.com/itm/New-ARM-Cortex-M3-STM32F207VGT6-development-Board-Ethernet-USB-CAN-/150879911756?pt=LH_DefaultDomain_0&hash=item232124bf4c

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..