AN12037 – Why can’t detect my LpcDevice?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AN12037 – Why can’t detect my LpcDevice?

AN12037 – Why can’t detect my LpcDevice?

AN12037 is a commonly adopted solution among LPC users when USB DFU Secondary Bootloader. However when customers run the demo code, they would find their PCs has problem of recognizing LpcDevice.

Scenario 1: “ LpcDevice flashes in Device Manager in a very short time then disappear for ever… “

Scenario 2: “ Device Manager can’t recognize LpcDevice…”

 pastedImage_2.png

 

This is because the default demo code set DFU device only exist in 5 seconds. User must type dfu command ( dfu-util.exe -l ) very fast before de-initialize USB

pastedImage_3.png 

 

So we suggest modify the code to increase the DFU device existence time.

Change

if ( dwSysTicks > 5 )

to

if ( dwSysTicks > 30 )

 

Theoretically, the DFU existance time increases to 30 seconds. Thus we can have enough time slot to type DFU command.

%3CLINGO-SUB%20id%3D%22lingo-sub-1124157%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EAN12037%20%E2%80%93%20Why%20can%E2%80%99t%20detect%20my%20LpcDevice%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1124157%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EAN12037%20is%20a%20commonly%20adopted%20solution%20among%20LPC%20users%20when%20USB%20DFU%20Secondary%20Bootloader.%20However%20when%20customers%20run%20the%20demo%20code%2C%20they%20would%20find%20their%20PCs%20has%20problem%20of%20recognizing%20LpcDevice.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EScenario%201%3A%20%E2%80%9C%20LpcDevice%20flashes%20in%20Device%20Manager%20in%20a%20very%20short%20time%20then%20disappear%20for%20ever%E2%80%A6%20%E2%80%9C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EScenario%202%3A%20%E2%80%9C%20Device%20Manager%20can%E2%80%99t%20recognize%20LpcDevice%E2%80%A6%E2%80%9D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_2.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_2.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F88251iB0FAAD4F3C7B30B3%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_2.png%22%20alt%3D%22pastedImage_2.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThis%20is%20because%20the%20default%20demo%20code%20set%20DFU%20device%20only%20exist%20in%205%20seconds.%20User%20must%20type%20dfu%20command%20(%3C%2FSPAN%3E%20%3CEM%20style%3D%22font-size%3A%2010.0pt%3B%20%22%3Edfu-util.exe%20-l%3C%2FEM%3E%20%3CSPAN%3E)%20very%20fast%20before%20de-initialize%20USB%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_3.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_3.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F88596iD7252232271C3146%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_3.png%22%20alt%3D%22pastedImage_3.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CEM%20style%3D%22font-size%3A%2010.0pt%3B%20%22%3E%26nbsp%3B%3C%2FEM%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3ESo%20we%20suggest%20modify%20the%20code%20to%20increase%20the%20DFU%20device%20existence%20time.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EChange%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22keyword%20token%22%3Eif%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%20dwSysTicks%20%3CSPAN%20class%3D%22operator%20token%22%3E%26gt%3B%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E5%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3CEM%20style%3D%22font-size%3A%2010.0pt%3B%20%22%3Eto%3C%2FEM%3E%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22keyword%20token%22%3Eif%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%20dwSysTicks%20%3CSPAN%20class%3D%22operator%20token%22%3E%26gt%3B%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E30%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3CEM%20style%3D%22font-size%3A%2010.0pt%3B%20%22%3E%26nbsp%3B%3C%2FEM%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3ETheoretically%2C%20the%20DFU%20existance%20time%20increases%20to%2030%20seconds.%20Thus%20we%20can%20have%20enough%20time%20slot%20to%20type%20DFU%20command.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎09-10-2020 03:00 AM
Updated by: