Skip to main content
nlovallo
Associate
Aug 12, 2011 1:52 PM UTC
Question

DFU and EHCI

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
This topic has been closed for replies.

3 replies

nlovallo
nlovalloAuthor
Associate
Aug 17, 2011 8:47 PM UTC
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
Visitor II
Aug 22, 2011 4:52 AM UTC
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
nlovalloAuthor
Associate
Aug 23, 2011 3:53 PM UTC
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...