WARNING: Example PSoC code under "memory stick psoc" file ezhost.c has bug causing file create to always fail. Instruction "if (Length = 255)" should be "if (Length == 255)". This is why my style is to always code "if (255 == Length)" with the constant on the left hand side, so if you accidentally type a single "=", the compiler will complain about trying to assign to a constant! Interesting, this means they never tested file create????
Hey, that bug's in the open and access file subroutines, too. Maybe the programmer was one of those folks who like to incorporate bugs into example code in order to force you to find and fix them!??
We are also following AN15484 appln note for our design. But with a small difference: We are using the CY7C67300 USB controller in co-processor mode with fujitsu as master microcontroller. SPI interface is used. We need to write 8 MB of data onto a USB pen drive using the file handling operations.
But we are not successful so far. Data write operations are randomly get hanged up in between. Whenever the system gets hanged up, we read the Main parameter table registers. the Data count register value becomes 0x00, Command flag register = 0xFFFF, Call back flag register value = 0x1A. All other registers remain unchanged.
Note: Since the SPI hardware supports 1024 bytes per data transaction (as per AN15484), we are writing only 1024 bytes in cycles.
Have you got any success with CY7C67300 & AN15484?
Can you please share your knowledge with us?
with thanks & regards,