Bug in Cypress' fw.c ?



I am having terrible trouble explaining (what I think is) a bug in Cypress'
software to their technical support. I fear others may have struggled too.
Perhaps there are other bugs and we are all wasting time finding them. At
least, I've not found anywhere where they are discussed and newly downloaded
code is old.

Anyway, for what it is worth, I believe:



if(GotSUD) // Wait for SUDAV

{

SetupCommand(); // Implement setup command

GotSUD = FALSE; // Clear SUDAV flag

}



is wrong as if there is an interrupt after the "EP0CS |= bmHSNAK;" at the
end of SetupCommand() and the PC is quick, it can send the next USB command
resulting in GotSUD being set (true), which is promptly lost. The fix is
trivial:

if(GotSUD) // Wait for SUDAV

{

GotSUD = FALSE; // Clear SUDAV flag

SetupCommand(); // Implement setup command

}



I grant you it is not a big problem, but why is it so hard for them to
recognise it, and why is there no process for publishing such things?

I have found other possible errors in the sample code.

Rgds,

Bill


.



Relevant Pages

  • Re: MS EVC Compiler Error
    ... Your code exposed that bug. ... > error C1001: INTERNAL COMPILER ERROR ... > Please choose the Technical Support command on the Visual C++ ... or open the Technical Support help file for more information ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: IMetaDataEmit DefineUserString
    ... Sorry for letting you wait. ... I have contacted "Jan Kotas" for this article. ... there is a little bug in the sample code snippet. ...
    (microsoft.public.dotnet.framework.clr)
  • Re: "figure properties" Java exception on Linux
    ... this bug in the core functionality?.. ... The exact steps you need to follow to generate the Java exception from ... The exact version of MATLAB you're using ... Technical Support that you'll speak to may not have read this thread, ...
    (comp.soft-sys.matlab)
  • Re: simpleDateFormat and April month
    ... i had a bug to report. ... Here is sample code to test: ... > public Date StrToDatethrows Exception { ...
    (comp.lang.java.programmer)
  • Re: Check group member ship or a user
    ... > Just out of curiosity, what version of .NET are you using? ... > of 1.0 had a bug where IsInRole was case sensitive. ... > quick Google search should turn up some sample code that shows you how to ... > Joe K. ...
    (microsoft.public.dotnet.languages.vb)