cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H745 USB not suspended when a Mac computer goes to sleep

O'li
Associate II

Hello,

I'm working on a USB MIDI device and I'm facing an issue with Mac computers: when the host goes to sleep, it keeps sending SOF (start of frame) messages. Thus, there's still activity on the bus preventing the STM32 to turn to Suspend mode.

Then, my application will still push data over the USB, but it doesn't know that the host stopped polling for new data. After the Mac wakes up, my USB stack is somehow crashed and I have to unplug/replug the USB cable.

So far I've tried:

  • enabling all interruptions one by one: none is responsive when the Mac goes to sleep
  • comparing USB registers before and after sleep mode: all are identical (except for the SOF counter...)
  • enabling the NAK IN interruption (to manually count the NAK events and trigger a timeout), but it spams my application

I'm a bit confused because I didn't find other people having this kind of issue with Mac computers.

Does anyone have suggestions to detect USB inactivity beside Suspend mode and SOF counting?

0 REPLIES 0