Hi, I'm using the Cypress CY7c67300 (a.k.a EZ-Host) chip in a dual-role (eg. both USB host and device) application. My code runs in the internal RAM of the chip, and another uC is sending and reading data to and from the EZ-Host chip via HSS commands. Sometimes these HSS commands fail. When I monitor the serial line with an oscilloscope I can see the following:
- I send a proper COMM_WRITE_MEM command
- the EZ-Host sends back ACK
- I send 2 bytes of 0 (as part of the previous COMM_WRITE_MEM command)
- I send a proper COMM_READ_MEM command (I want to read back those 2 bytes)
- the EZ-Host sends back NACK (why?)
- I retry the COMM_READ_MEM command
- the EZ-Host sends back ACK
- then it sends back the data - but instead sending back 2 bytes of 0 it sends 0x08 0xce, which is the code of the COMM_READ_MEM command
This happens very rarely. I don't see any disturbing noise on the oscilloscope. It happens at 1Mbaud and at 2Mbaud with roughly the same frequency (about 1 time during 20000 transfers), and it only happens when the EZ-Host chip is transfering data on both the USB host and device interface. When the chip communicates only as a device I cant observe this bug.
Anybody saw the same thing happening? What can I do to prevent the COMM_WRITE_MEM commands to corrupt memory? Shall I double-check every byte? Thanks for any help in advance, Botond