MK22FX512 and MSD library

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MK22FX512 and MSD library

1,247 次查看
ypkdani
Contributor III

Hello, 

my question is how to understand if the usb that i connect is a usb cable connected to a pc or only to a charger. I need this because i want to enable the msd library only if there is a pc with communicate. There are some function in the MSD library? I use the SDK 2.2 for mcuxpresso

Thanks

标记 (1)
0 项奖励
回复
1 回复

1,047 次查看
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Daniele Cortellazzi

MK22FX512 as device cannot determinate when it was connected in the USB port, there is not function for this, we normally recommend to use a GPIO to check VBUS signal (using hardware to detect attach).

In this case, as VBUS will also be connected, then the part where this two cases will differ is in the D+ D- signal; when you connected a charger, this signal should not change.

Hope this helps

Best Regards

Jorge Alcala

0 项奖励
回复