Hi Arth Shah,
That's very good to hear you already make the USB MSD works on the KL26Z board.
I think you can try do a software reset after you press one key, when detect the key is press, then do the software reset, in the code start area, check the software reset, RCM_SRS1[SW], if it is 1, then do your another task, don't do the USB initialization.
The software reset code is:
#define Reset() (SCB_AIRCR = SCB_AIRCR_VECTKEY(0x5FA)|SCB_AIRCR_SYSRESETREQ_MASK)
You can try it.
If it is still not OK and you are convenient, you can share your USB MSD code with me, I will help you to check it.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------