We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2fe3a2 commit 655f3dbCopy full SHA for 655f3db
usb/device/targets/TARGET_NORDIC/TARGET_MCU_NRF52840/USBPhy_Nordic.cpp
@@ -70,6 +70,14 @@ USBPhyHw::~USBPhyHw()
70
void USBPhyHw::init(USBPhyEvents *events)
71
{
72
73
+ // Disable the USBD interrupts
74
+ // Interrupts will be reenabled by the Nordic driver
75
+ NRFX_IRQ_DISABLE(USBD_IRQn);
76
+
77
+ if(this->events == NULL) {
78
+ sleep_manager_lock_deep_sleep();
79
+ }
80
81
this->events = events;
82
83
ret_code_t ret;
@@ -125,6 +133,10 @@ void USBPhyHw::deinit()
125
133
// Disable the power peripheral driver
126
134
nrfx_power_uninit();
127
135
136
+ if(this->events != NULL) {
137
+ sleep_manager_unlock_deep_sleep();
138
139
128
140
// Clear the instance pointer
129
141
instance = 0;
130
142
}
0 commit comments