Hi, Support,

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

Hi, Support,

2,192 次查看
stoneshi
Contributor II

I am suffering a problem of USB DFU on MK20DN512VLL10,  when I connect cable to PC, the PC always show "unknown USB device" rather than recognize it. 

 1. my DFU firmware can do  USB_Reset_Service() function, but after it, it seems do nothing.

2.  I set a break point at get descriptor function, but it doesn't break, so I think my firmware didn't receive the get_descriptor command. 

  what can I do next to fix  the problem? please help. thank you!

Stone

0 项奖励
回复
8 回复数

1,982 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi Stone,

MK20DN512's evaluation hardware is TWR-K60D100M. It has SDK package. There are plenty of USB demo in the package. You can refer to these code and the hardware.

Please download the package from https://mcuxpresso.nxp.com/en/welcome

Regards,

Jing

0 项奖励
回复

1,982 次查看
stoneshi
Contributor II

Jing,

thank you for your information, I downloaded the sdk package and tested it on my board, but the PC also shows "unknown device". do you have any other advice? it really confused me.

Stone.

0 项奖励
回复

1,982 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi,

you should select device to K20 in you IDE.

Regards,

Jing

0 项奖励
回复

1,982 次查看
stoneshi
Contributor II

Jing,

I do, I selected the mcu MK20DN512XXX10 for debug. but PC still reported "unknown device", I am sure that my MCU received the reset command and did the initial. but didn't receive any further command form PC.

thank you very much for any further advice.

0 项奖励
回复

1,982 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi,

if you trace into demo code,  attach detect?

0 项奖励
回复

1,982 次查看
stoneshi
Contributor II

Jing,

I checked the state, from the very power up, the state sequence is POWERED > DEFAULT-->SUSPENDED -->DEFAULT -->SUSPENDED, the USB is suspended by getting the USB SLEEP interrupt and went into sleep, I am sure my hardware is ok. but why my MCU's USB detects there is no activity on the USB bus for more than 3 ms (per reference manual)?

thank you very much!

0 项奖励
回复

1,982 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi,

Since I don't know which USB stack and demo you use, I use dev_cdc_vcom_bm as the example.

1. When USB connect, an USBRST occur. USB stack then only init hardware and software.

2. Then PC will do may get descriptor and set descriptor job. This will cause TOKEN interrupt.

3. After that, s_cdcVcom.attach set to 1.

Which step can your code walk into?

Regards,

Jing

0 项奖励
回复

1,982 次查看
stoneshi
Contributor II

Jing,

1. the USB stack that I am using is source code based on our old product, not a demo.

2. my code seems slept between your step 1 and 2. received the USBRST and did the hardware and firmware init, but there was no any TOKEN interrupt.

thank you very much.

Stone

0 项奖励
回复