Hi all,
I'm in the process of porting some existing USB code from the SAM7SE512 over to SAM7S64.
I've compared both datasheets and it would appear that the steps for using endpoints without ping-pong attributes are identical on both micros. (Ref: SAM7S Series Preliminary, section 35.5.2.3, and SAM7SE Series Preliminary, section 38.5.2.3)
To perform a Data IN transaction using a non ping-pong endpoint:
1. Check it's possible to write in FIFO (Wait for TXPKTRDY in UDP_CSRx to be cleared)
2. Write packet of data in UDP_FDRx
3. Notify finished by setting TXPKTRDY in UDP_CSRx
4. Check for FIFO release (Wait for TXCOMP in UDP_CSRx to be set)
5. Go to 2. (Until last packet is sent)
6. Clear TXCOMP in UDP_CSRx
Here's the problem:
My code that sends data to End-point 0 works correctly on the 7SE512 but not on the 7S64.
After sending a few packets, it hangs when waiting for TXPKTRDY in UDP_CSR[0] to be cleared.
I'm aware that EP0 has a size of 64 bytes on the 7SE512 and 8 bytes on the 7S64.
Perhaps I've overlooked some other detail.
If someone could provide sample code for the 7S64, or clarify the steps above, that would be much appreciated.
Thanks,
Jasco80