2016-06-03 03:28 PM
Dear all,
I am trying to get UART (USART?) working over USB for a STM32F072C8 part. The idea is to get basic getc/putc working via the USB for a custom board that we have designed. I intend to make the device look like CDC class to the Windows Host PC so that I can use a Putty or Hyper-term to just get the output (UART Tx from STM32) on a console terminal.I looked at the sample code in STM32CubeF0 for USB_Device/CDC_Standalone for the STM32F072B_Eval project. Obviously this is for the Discovery or similar boards while our board is custom and different set of peripherals are used.In any case, I had hoped to pull out the essential components but the USB device is not recognized by the host PC. The Win Device Manager has an error/warning triangle mark.Question - what are the things that I should look at and how do I proceed with the debug? The example seems to use 48MHz clock called USE_USB_CLKSOURCE_CRSHSI48 in the main.h file. However, we have a 12 MHz crystal on our board.Can somebody tell me where all and what all do I have to change from the STM32CubeF0 Project for _Eval to get it going with 12MHz?Many thanks!2016-06-03 03:51 PM
The HSI is an internal clock, your external 12 MHz will only come into play if you enable it, and the PLL to generate an alternate 48 MHz clock.
2016-06-03 04:12 PM
Thanks Clive. That makes sense then. I should expect to get the COM port working with the HSI (high speed internal) oscillator of 48MHz itself.
Any further ideas why I might be getting ''error code 10 - this device cannot start?'' message in the Device Manager?2016-06-06 01:26 AM
Hi,
About''error code 10 - this device cannot start?'', it can be related to theHS max packet size. You can refer to this tomore understand about this issue. Regards