Skip to main content
Visitor II
July 27, 2021
Question

How can I light a LED to indicate USB DFU data activity?

  • July 27, 2021
  • 1 reply
  • 854 views

Using STM32CubeMX to make a DFU bootloader, I want to light a LED whenever USB packets are exchanged, to indicate that a DFU binary is being transferred.

...but I can't find the right callback to place my HAL_GPIO_WritePin (which makes the LED light up.) What is the callback to use?

    This topic has been closed for replies.

    1 reply

    Visitor II
    July 28, 2021

    I'm thinking that maybe the NOE pin (labeled USB_NOE and activated in Connectivity/USB-Device) may play a role to indicate USB data activity.

    The problem is that this NOE functionality is very poorly documented, there are no code samples anywhere.