I am currently working with a low power device with USB support that I am having problems with. During normal operation, the system clock is set to a much slower speed (since this data logger is only active once every few minutes, this is not a problem). However, when the device is then connected to the computer’s USB port, it should recognize this, initialize the USB stack (what can I do) and reset the system clock to full speed (I can do this, since a).
My problem, as you may have noticed, is the "USB Connected" event. I look at the STM32 evaluation materials and they have “USB_FS_WKUP_IRQn” in the IRQn table, and the Evolution STM32 board also has USB-5V power directed to PE6 pin, which can also act as WKUP3.
Do I need to enable an external interrupt for this output, or is there a better way to detect such an event and set / reset the clock as needed?
Thanks in advance.
source share