AnsweredAssumed Answered

How USB Host should enable Suspend mode?

Question asked by otachkin.alexey on Feb 17, 2015
Latest reply on Jul 21, 2015 by otachkin.alexey
Hi all! I'm a bit confused by USB Host behaviour when trying to enable Suspend mode.
I use ST USB library v.2.1.0. and STM32F407. Use Host example for HID device, and it is working correct. Now I try to make some changes - suspend and resume connected device.

I just write suspend enable bit in Host Port control and status register:
  *pdev->regs.HPRT0 |= (1 << 7);

I see by the oscilloscope, that host really stops sending SOFs after that action, bus seems to be in idle state. At the same time I see at the value of HPRT0 register, that Suspend bit was not asserted to 1. Instead of it I see "Port enable" bit falls to 0, and according Port interrupt cames. 
In the result, write to Resume bit have no effect: no life on DP-DM accures after that. So, I can enable port just by Reset - that is, by restarting device. But I needed just Suspend-Resume.

It also seems strange, that in library there are no functions for Suspending-Resuming the device. Maybe, this functions are not really supported? Or I forget do some additional settings?

I would be extremely thankful, if someone shares working code examples for enabling and disabling Suspend mode by the USB Host Controller in STM32F4-devices. Or gives any advice on this topic.