diff --git a/epicardium/usb/cdcacm.c b/epicardium/usb/cdcacm.c
index ea046721a99b672c114831b5c6da752a6579a5b6..a3e9f33db00d53c1029aee8eaf98a26dd5307363 100644
--- a/epicardium/usb/cdcacm.c
+++ b/epicardium/usb/cdcacm.c
@@ -22,6 +22,8 @@
 #include "FreeRTOS.h"
 #include "task.h"
 
+static volatile int lockup_disable = 0;
+
 static inline struct config_descriptor_cdcacm *
 descriptors(struct esb_config *self)
 {
@@ -36,15 +38,24 @@ static int cb_acm_read_ready(void)
 	return 0;
 }
 
+static int cb_acm_connected(void)
+{
+	lockup_disable = 0;
+	return 0;
+}
+
 int esb_cdc_init(struct esb_config *self)
 {
 	LOG_DEBUG("cdcacm", "init");
 	struct config_descriptor_cdcacm *dsc = descriptors(self);
 	usb_read_complete                    = 0;
+
+	int ret = acm_init(&dsc->comm_interface);
 	acm_register_callback(
 		ACM_CB_READ_READY,
 		cb_acm_read_ready); //SWYM: actually not needed
-	return acm_init(&dsc->comm_interface);
+	acm_register_callback(ACM_CB_CONNECTED, cb_acm_connected);
+	return ret;
 }
 
 int esb_cdc_configure(struct esb_config *self)
@@ -96,7 +107,6 @@ uint8_t cdcacm_read(void)
 
 void cdcacm_write(uint8_t *data, int len)
 {
-	static int lockup_disable = 0;
 	if (acm_present() && !lockup_disable) {
 		int ret = acm_write(data, len);
 		if (ret < 0) {