Hello,
i have a usb dongle with mkw24d kinetis mcu and it work correctly as Usb Device.
I need to reset the state machine of firmware when a port reopening occurs. So i need to detect a port open/close event to reset the state machine.
I'm searching since a few days but i only found this post https://community.nxp.com/t5/LPCXpresso-IDE/detecting-usb-attachment/m-p/564984.
i verified several line coding events during open or close procedure but this method not appear rigorous for me. How can i do this task? there is other way?
firmware wasn't created by me the line code events are handled inside USB_DeviceCdcVcomCallback Function ->
/* USB device class information */
static usb_device_class_config_struct_t s_cdcAcmConfig[1] = {{
USB_DeviceCdcVcomCallback, 0, &g_UsbDeviceCdcVcomConfig,
}};
Thank you
Marco