Dear Jorge,
Thanks for your response.
Yes, I am using the example you mentioned. Yes, I need to access SD Card through my program without enabling the USB MSD device in the software. As you said, if I need to disconnect D+ and D- lines, how can I do it through software, Is there a FET switch in K64F through which I can disconnect?
Besides, Once I completed my task functions with SD Card. I'd like to enable the USB MSD functionality for the host to detect the device as MSD without disconnecting and reconnecting the device. (I think the answer is same, I need to connect the D+ and D- lines)
So, the question would be how can connect and disconnect the data lines through software?
Thanks for your kind help Jorge,
Best regards,
Mahendran
PS: I was thinking about using the composite device functionality with a primary interface as CDC and secondary interface as MSD. So, when my device is connected it will act as CDC, during that I can complete my tasks. Once the tasks are completed, I switch the interface to MSD, so I need not disconnect and reconnect the USB and I can access SD Card in my program whenever I want by switching the interface.
I would like to get suggestions from you about this thought process.