Skip to main content
Explorer
March 18, 2024
Question

Question regarding interrupt handling for CDC_Receive_FS

  • March 18, 2024
  • 1 reply
  • 633 views

I have a question regarding interrupt handling for CDC_Receive_FS.
After receiving CDC_Receive_FS we do any process we created, but we do not want to do CDC_Receive_FS during the process.
Is there an API to disable or enable CDC_Receive_FS interrupts?

    This topic has been closed for replies.

    1 reply

    Super User
    March 18, 2024

    If you want to disable interrupts temporarily, say for a few ms, you can use __disable_irq() and __enable_irq(). You can also selectively disable the USB interrupt with __NVIC_DisableIRQ(OTG_FS_IRQn) and __NVIC_EnableIRQ.

    You can't really disable CDC_Receive_FS entirely without negating the functionality of the USB.