cancel
Showing results for 
Search instead for 
Did you mean: 

DFU and EHCI

nlovallo
Associate II
Posted on August 12, 2011 at 15:52

Has anyone else had problems getting DFU to work over an EHCI (USB 2.0) host controller? When I perform an upgrade over an EHCI controller, the last packet of every transfer is corrupted.  If, on the same computer, I perform the same upgrade over an OHCI/UHCI (USB 1.0) host controller, the upgrade works fine.  If I trace the transfer at the kernel level using a tool like USBTrace or USBlyzer, all the packets look fine.

#dfu
3 REPLIES 3
nlovallo
Associate II
Posted on August 17, 2011 at 22:47

I have narrowed this down further and found that using the IAR Embedded Workbench compiler, if I disable optimizations, I experience problems when I download firmware.  The last 64 byte packet of every USB transfer seems to be corrupted.  If I set optimizations to 'High', everything works as expected.  Any experience or advice related to this problem would be appreciated.

Pantuca.Erwin
Associate II
Posted on August 22, 2011 at 06:52

we can only conclude in general that without optimizations the code is too bloated/slow that may cause such problems.

nlovallo
Associate II
Posted on August 23, 2011 at 17:53

I should have mentioned I am using ST's DFU example code, on an ST Eval Board, with ST's DFU Demo application. I guess I wouldn't expect such a simple example to have these kind of performance issues.  And it also seems to be a pretty specific ''performance problem'' that the last packet of every transfer is being corrupted.  Perhaps at the lower optimization level something is being initialized incorrectly...