2012-02-25 10:23 AM
I need to use a F105 as I need CAN and USB at the same time. I need to connect it up with a B type connector as a device only. The manual talks about device and peripheral, but I always thought they were the same thing.
I currently have an F103 setup as a device (virtual com port) and I quite simple want the same with the F105. The manual shows a connection in Manual Doc ID 13902 Rev 9 Figure 262 of a USB peripheral-only connection, but just above it descibes a B-Device and Peripheral only connections. I am not clear whether I need a B-Device or a Peripheral setup. If I need the B-Device, it talks about connecting the ID line to the B-Side of the USB cable. However, it doesn't say which of the four cores. Would someone be able to clarify: a. What's the deifference between a B Device and a Peripheral? b. What do I need for a bog-standard VCP c. How should I wire between STM32 and B connector for the VCP? Many thanks!2012-03-04 09:31 AM
Can someone help me with this please? Surely someone's used the OTG part as a device?
2012-03-21 01:42 PM
You can connect DP & DM directly to STM32F105. The VBUS should be connected to PA09, no need for ID pin. This should be sufficient for VCP.
I am using STM32F105R8 (64pin) and tried the VCP in STM32_USB-FS-Device_Lib_V3.3.0 . I was able to detect attachment & removal of the USB so far but no success in having the PC detect the ST Virtual Comport. It could be because I am using 8MHz crystal. My dev kit is with STM32F103 and works perfectly. There are some issues with the 105/107, for these you need to check AN2606 app notes - production dates lower than ''937'' has some issues. Anybody who has succeeded in making USB On The Go? -please share2012-03-21 03:11 PM
I was able to make it work with OTG. The problem I had was related to the use of 8MHz crystal whereas the library provided by ST is based on 25MHz for 105/107 series and thus the 72MHz clock is not really achieved.
2012-03-23 08:17 PM
Pls use USB library example for VCOM. You will not need to modify anything.
The F105 and F103 have different clocking scheme. You can refer to Reference Manual. nside the Fimrware, pls select the correct XTAL clock and clock divisions. ...it's in SystemInit() See that with the selected XTAL, are you able to generate 48MHz for USB with right combination of the Clock divisors etc ? For using USB and CAN at the same time, i guess it's not possible... They use the same Interrupt. pls refer to Datasheet to be double sure...(i dont use CAN...!!)2012-03-25 09:55 AM
I believe both CAN and USB are possible with the F105/107. They don't seem to share the same interrupt to me.
Thanks for the advice on connecting. So does anyone know what the difference is between a device and a peripheral? Is it just ST being sloppy with interchangable terms in their manual?