Interruption when USB is connected

Hi.

Could you please tell me how to trigger an interrupt when changing the USBREGSTATUS register?

I can monitor the state of this register in polling mode, but I don't know how to trigger an interrupt when it changes. Could you please provide a code example how to do it rationally with minimal memory usage of the microcontroller?

Thanks.

Related