Enabling a SYSIRQ-based Safe Remove event in the Cypress Windows Mass Storage Driver.

Question: How do I enable the Cypress Windows Mass Storage Driver to do an automatic Safe Remove?

 

Answer:

The procedure for enabling a Safe Remove when the SYSIRQ signal is asserted is as follows:
1. Enable SYSIRQ functionality in the bridge chip.
· ISD-300(A/A1): In the EEPROM, set bit 0 of address 0x09 to '1'.
· ISD-300LP: In the EEPROM, set bit 0 of address 0x09 to '1'.
· Other: see individual chip documentation.

2. Ensure that all applicable pins are set appropriately (if desired).
· ISD-300(A/A1): The ISD-300(A/A1) datasheet documents which pins are used to make up the SYSIRQ data.
· ISD-300LP: The ISD-300LP datasheet documents which pins are used to make up the SYSIRQ data. Note that the 300LP SYSIRQ data contains more than just external pins.
· Other: see individual chip documentation.

3. Modify the Cypress Windows Mass Storage Class driver INF file.
· Add the device VID/PID to the INF file. Depending on the device, an option to use the interrupt enabled features should be available. For example, to set up the ISD-300A1 the following line should be added under the [CY] heading:
%VID_05AB&PID_0061%=TPP300I, USB\VID_05AB&PID_0061
Note that TPP300I is used instead of just TPP300. This enables the interrupt support in the driver for this device. Future versions of the Cypress drivers may use a different identifier.
· Search for the line in the INF file that contains "RemovalEventMask". The HEX values that follow it are the bitmask that is used to determine which of the SYSIRQ data bits are required to be '1' for the safe remove to be triggered. For example, setting the value to 0x00000001 would mean that only the last bit of the SYSIRQ data needs to be a '1' for the safe remove to trigger. Bits that are not required to be a '1' can be considered don't-care.