|
Hi all,
I have seen quite a few post on this problem but I need some clarification. My application is a bit different too in the way it works and behaves.
Here is what happend: - the program boot, initialize the USB and run in Flash the main code then wait for command on the USB port (serial over USB) - a custom program running on a PC(XP SP2) send a command to start a transfer update - this transfer is actually a RAM program to update the target (Flash) - when transfer finished and OK we disable interrupts, remap and jump to start of RAM - so far the USB works fine then when I receive the next command I try to answer back but the I wait forever for the TXCOMP to get cleared!
To add to the confusion this works most of the time! The program running in flash transfers the new FW via USB, write it in Flash and then reboot. It fail 20% of the time randomly.
My questions are: - Do I need to manage endpoint 0 when running in RAM as at the moment it just deals with EP1 (Bulk OUT) and EP2 (Bulk IN)? - I have quite a delay (500ms) between the end of the RAM transfert and the answer to the command from flash, does it matters to the USB PC driver? - I have read some post about issue when polling CSR register, is this a real problem as I send and receive data in polling mode? Errata by Atmel?
Sorry in advance if I do something daft but this is my first USB project.
Thanks for any help.
|