cancel
Showing results for 
Search instead for 
Did you mean: 

F407VG And Its UOTGFS

Workalot
Associate III
Posted on December 13, 2015 at 01:59

Workalot is struggling with enumeration of an USB VCP application. While USBRST and ENUMDNE interrupts are being captured no other interupts are. Perhaps a kind observer may glance over the register settings and offer suggestions.

------------------------------------------- 
Environment
STM32F4DISCOVERY MB997B
Windows 8.1
------------------------------------------- 
Problem
Unable to capture EO0 OUT interrupts to kick off enumeration.
------------------------------------------- 
Initialization
GPIOA Register Dump
MODER: AA820000h
OTYPER: 00000000h
OSPEEDR: 0FC00000h
PUPDR: 64100000h
AFRH: 000AAA0Ah
Global Register Dump
GOTGCTL: 000D0000h
GAHBCFG: 00000081h
GUSBCFG: 40001846h
GRSTCTL: 80000000h
GINTSTS: 44000020h
GINTMSK: C03C381Ch
GRXSTSR: 168ECC1Eh
GRXFSIZ: 00000200h
GCCFG: 000DFFFFh
CID: 00001200h
Device Register Dump
DCFG: 00200003h
DCTL: 00000002h
DSTS: 00000006h
DAINTMSK: 00000000h
DVBUSDIS: 000017D7h
DVBUSPUL: 000005B8h
DIEPEMPMSK: 00000000h
DIEPMSK: 00000000h
DOEPMSK: 00000000h
------------------------------------------- 
1st Interrupt
GINTSTS: 40000000h
GINTMSK: C03C381Ch
Ints: 40000000h
SRQINT
------------------------------------------- 
2nd Interrupt
GINTSTS: 00008C00h (USBSUSP,GOUTNAKEFF,GINAKEFF)
GINTMSK: C03C381Ch
Ints: 00000800h (USBSUSP)
------------------------------------------- 
3rd Interrupt
GINTSTS: 00009400h (EOPF,USBRST,ESUSP)
GINTMSK: C03C381Ch
Ints: 00001000h (USBRST)
Device Register Dump
DCFG: 00200003h
DCTL: 00000004h
DSTS: 00000006h
DAINTMSK: 00010001h
DVBUSDIS: 000017D7h
DVBUSPUL: 000005B8h
DIEPEMPMSK: 00000000h
DIEPMSK: 0000000Bh
DOEPMSK: 0000000Bh
EP0 IN
DIEPTXF0: 00100080h
DIEPCTL0: 80008000h
DIEPTSIZ0:00000000h
DIEPINT0: 00000080h
EP0 OUT
DOEPCTL0: 80008000h
DOEPTSIZ0:60080018h
------------------------------------------- 
4th Interrupt
GINTSTS: 0000A440h (EOPF,ENUMDNE,ESUSP,GINAKEFF)
GINTMSK: C03C381Ch
Ints: 00002000h (ENUMDNE)
DSTS: 00000006h
------------------------------------------- 
Three more USBRST/ENUMDNE interrupt sessions occur before Win 8.1 calls 
it quits and announces ''USB device not recognised''.
The report in Device Manager is
''Uknown USB Device (Device Descriptor Request Failed)'' 

Thank you in advance.
1 REPLY 1
Workalot
Associate III
Posted on December 15, 2015 at 00:32

During the early AM hours of this morning Workalot wondered about the USB clock - it should be 48MHZ - but was it?

Well it wasn't. The RCC->PLLCFGR settings were based on the default HSE_VALUE of 25MHz and not the 8MHz of the STM32F4Discovery. This explains why USB data line interrupts were not being captured.

Might take this time and pose another question. Why is DAINT = 0xFFFFFFFF about? RM0090, rev 10, page 1297 tells us the register is read only. Yet the statement appears in ST's code and in other software.