AnsweredAssumed Answered

STM32F207 and STULPI01B Registers

Question asked by kern.chris on Aug 21, 2013
Latest reply on Mar 13, 2015 by Joshua
Hello. I have been searching the forums and cannot find an answer, hence I am starting a discussion here. I have been using the STM3220G-EVAL board and the HS USB onboard PHY (obsolete NXP device). I have since created our own board with the suggested STULPI01B PHY. Unfortunately, we neglected to connect a over-current detection device and subsequently connected the FAULT pin to ground. Since the STUL part is BGA, I am limited to a firmware fix at this point.

When the system is connected to a Windows computer, the system throws a general device 43 error which means that either the device is having troubles, or a driver needs to be installed. I have a feeling that since the FAULT pin is driven to ground, the system thinks there is an over-current condition and will therefore not start up our device. 

I think I can fix this by writing to some registers in the STUL device (to ignore the FAULT pin), but I cannot seem to find a way to do this. I have gone back to the STM3220G-EVAL board so I can monitor the ULPI data lines, NXT, and DIR signals. 

Upon initialization of the USB device (without the USB connected to the computer), I see the DIR and NXT signals toggle. I have read up on the ULPI specification as well as the datasheet for the STUL device. They explain the methodology to write to the registers. First, you must put a TXCMD on the ULPI data pins (0x10XXXXXX for read and 0x11XXXXXX for write). Then there is a NXT and DIR sequence that is followed in order to get data in and out of the registers. My problem is that whenever I try writing to the ULPI data pins, I never see them toggle, nor do I see the NXT or DIR pins have any activity. 

From the STM32 manual, the memory mapping states the HS USB base address is 0x40040000. I have been through the usb_regs.h file and am a bit confused as to the typedef structures. They do not seem to match up with the ULPI PHY register structure. When I read/write to register 0x4004000 or anything close to that address, I do not see any activity on the bus. 

I can only assume that writing and reading from these registers signals something else for the STM32 uP to do behind the scenes. So after all this rambling, my question is: how do I read and write to the STULPI01B registers??

Thanks in advance.

Outcomes