ESP32-S2 USB bus detection
Posted: Mon Apr 12, 2021 1:39 pm
Hi All,
I'm currently using the ESP-IDF USB console feature on ESP-IDF v4.4-dev-744-g1cb31e509-dirty
And I have been unable to find any means to detect if the USB CDC has actually enumerated, is there anyway to detect when the data connection has been made?
In my firmware I would like to go to sleep if the connection appears to be power only, but stay awake for CDC comms if a PC is attached.
I looked through the USB docs on the wiki and the page in the reference manual, is there a register perhaps I can use to determine if the device has been enumerated? Or perhaps a sneeky function hidden away.
Thanks In Advance
Matt
I'm currently using the ESP-IDF USB console feature on ESP-IDF v4.4-dev-744-g1cb31e509-dirty
And I have been unable to find any means to detect if the USB CDC has actually enumerated, is there anyway to detect when the data connection has been made?
In my firmware I would like to go to sleep if the connection appears to be power only, but stay awake for CDC comms if a PC is attached.
I looked through the USB docs on the wiki and the page in the reference manual, is there a register perhaps I can use to determine if the device has been enumerated? Or perhaps a sneeky function hidden away.
Thanks In Advance
Matt