2016-05-05 10:13 AM
Folks,
I have code for using the F103's USB device port as a virtual com port. Does anyone know: 1. Could I use that ''as is'' on the F107's OTG port. I only ever want to use it as a device. 2. Do I really have to have OTG_FS_VBUS connected to the USB connector's 5V line? Sadly, the board's been laid out with PA9 - which is the VBUS connector - as the USART function. Thanks! Rob2016-05-06 06:39 AM
Hi,
I'd recommend you to have a look to the , paragraph ''13.3.4 PA9 excessive power consumption when USB cable is plugged in bootloader V2.0 :When connecting a USB cable after booting from System-Memory mode, PA9 pin (connected to VBUS=5 V) is also shared with USART TX pin which is configured as alternate push-pull and forced to 0 since the USART peripheral is not yet clocked. As a consequence, a current higher than 25 mA is drained by PA9 I/O and may affect the I/O pad reliability.This limitation is fixed in bootloader version 2.1 by configuring PA9 as alternate function push-pull when a correct 0x7F is received on RX pin and the USART is clocked. Otherwise, PA9 is configured as alternate input floating. ''Regards2016-05-09 02:10 AM
Hi,
I'm not worried about the bootloader as we're doing that over USB and Ethernet. I'm concerned over whether I can use the F103 device code as is with the OTG peripheral and whether it will work if I ignore PA9. Thanks!2016-05-12 10:43 AM
Bump!
Has no-one done this? Has no-one used the F107 as a CDC? Do you *have* to invoke the OTG_DEV_Init() for example? Can you just run it exactly as the F103? I've tried the latter, but absolutely no registers in the USB_OTG_DEVICE module are being set. If I try and compile for OTG support I get zillions of errors. I suspect partly because I'm using such old libraries with this very old version of FreeRTOS. I'm chasing my tail here and would *really* appreciate some advice from someone who has implemented this as a CDC or VCP device - which terminology you prefer. Most especially, if I don't implement OTG_FS_VBUS am I doomed to failure, even if I manage to compile for USB_OTG support? Many thanks.