USB FS doesn't work as standby exit/wake source

We're using S5D5 device and SSP 1.60.

I'm trying to handle USB suspend. It needs standby mode as the maximal draw is 2.5 mA. I successfully implemented standby using Power Profiles V2 Low Power Profile and enabled USB Full-speed as standby exit source. The device successfully detects USB suspend and enters standby but never wakes up. If I understand correctly, USB resume should cause standby exit but it doesn't.

I tried it on both our device and S5D5-TB board, the same result. Then I configured P100 on board as IRQ2 input, enabled IRQ2 as standby exit source and it works. Device leaves standby mode once I touch P100 (which seems to be enough to generate interrupt). Then device operates as usual including USB communication.

In turn, power management seems to work correctly but USB isn't able to wake device up. What to do with it?

  • It seems I figured it out. It is necessary to enable USB resume interrupt in the INTENB0 register i.e. set RSME bit. It can be done in the  ux_dcd_synergy_initialize_common_complete() function where this register is set. Like this:

    Is there any reason why this bit isn't set? Interrupt handler handles this condition but it works probably only by accident when interrupt is invoked for different reason (the bit is set in any case regardless of INTENB0 setting according to hw manual).

    Well, seems as yet another SSP bug. I wonder if the standby wake by USB was ever tested, it can't work without this change. I also wonder how usable USB devices can be made without it because USB selective suspend support is a must at least 15 years.

  • In reply to Michal:

    This is fixed in SSP 1.7.5 :-

  • In reply to Jeremy:

    Fine. Is the fix the same as I did or is something else necessary? We can't switch to SSP 1.7.5 for this project.
  • In reply to Michal:

    No, that is all that is required to enable the USB wakeup interrupt.
  • In reply to Jeremy:

    Great. Thank you.