Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
I am using interrupts in FreeRTOS to read data from USB and pass to UART (Using as software USB/UART bridge in one configuration). I need to be able to control a DTR pin based on USB_GetLineControl(), but I am not sure how to detect a change in its status via an interrupt. What interrupt will fire when this status changes?
Could you please confirm if you are asking where can the USB_GetLineControl() function be called to know if there is a change in status? According to my understanding you want to detect if a DTR signal is present using the function USB_GetLineControl() and based on the status control a DTR pin.
You can try calling this USB_GetLineControl() function in the USBUART_EP_0_ISR_ExitCallback() ISR.
You can refer to the Macro Callback section of the USBFS datasheet to find more details regarding how to use this ExitCallback function.
Kindly let me know if this is what you were looking for.
Specifically, I want to know which interrupt(s) will fire when there is a change in DTR status. Are you saying that the EP_0_ISR_ExitCallback() will fire whenever the line control register is changed? If so, then I think you have answered my question.