Hello experts, I have been testing the Mass Storage example for the MCB2140 and found some strange behaviour. Example, the storage shows 14kB of space but if I try and copy a 3kB txt file the board crashes. File transfers appear to be limited to 1kB at a time? In addition I attempted to modify the example so that the storage was based on SPI FLASH. I copied the Disk Image to the Flash and redirected the MSC_MemoryRead/Write command to FLASH. Reading works fine and the test file appears in windows explorer. But writing fails due to some timing constraint. This timing problem can be recreated by just putting a small delay inside the MSC_MemoryWrite function of the example code. {int counter = 200; while(counter--);} My thoughts are that the Mode Sense(6) command as not been implemented so no Flexible disk page data is offered giving transfer rate caperbility. Would appreciate your experiences on this. Many thanks, Malcom
Hi Neil, I've had quite allot of experience using various USB chips. I developed a Mass Storage Device on the Infineon C164 before this and there is more to USB than software. The manufacturer chooses the level of access to the bus protocal and passes a subset of the transfers to software which might or might not give access to the bit you're trying to affect. USB code is very much chip specific. An example of this is the SPI and SSP buses on the LPC214x, SPI code running on SPI0 cannot be used without modification on the SSP used in SPI mode (effectley SPI1) as the SSP is buffered which corrupts the normal SPI bit bashing methods. Thanks, Malcom