2024-03-17 05:52 PM
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?
2024-03-17 07:57 PM
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.