2015-09-23 12:04 PM
Hi there forum,
I would like to connect a USB pen to my STM32F4-Discovery kit.I am using libraries from stsw-stm32068.zip, and the GPIO, USB initialization code and the usb_conf.h and usbh_conf.h files are from Audio_playback_and_record example.After connecting a USB disk to the system the host state machine idles in HOST_CTRL_XFER, polling the USB state, which is always URB_IDLE.Looking at the corresponding host channel interrupt register, I see, that TXERR flag has been set, which according the documentation can mean:2015-11-22 11:22 AM
Anyone?
2015-11-23 09:37 AM
OK, I have a clue.
I have found two different versions of system_stm32f4xx.c.One version of the file never works with USB, the other one works mostly (depending on used USB disk), but eventually also dies on TXERR.Diffing them I see different values for PLL, however I am a SSE (Simple Software Engineer) and I really don't understand the impact of the settings.Can those values be fine tuned so the USB will work always?Update:The forum seems to be broken and I can't upload the mentioned files, so here are at least the values:Works:HSE Frequency (HZ) = 8000000PLL_M = 8High Performance Mode = EnabledBroken:HSE Freqency (HZ) = 25000000PLL_M = 25Main regulator output mode voltage = Scale 1 mode