Hi Dat,
Improvements with 2.2.1.1000
I spent most of yesterday testing 2.2.1.1000 on various PCs, with mostly good results.
On one PC it took a long time (sometimes over a minute) for the drive to show up in Explorer, although it appeared immediately in Device Manager and USBDeview. I counted that as working.
Another one giving problems is a newish Dell PC, the problem with it is strange. If the device has been running in MassStorage since power-on, it will work immediately on the PC. however if it has ever been in WinUSB mode since power-on, it won’t ever appear in Explorer. The MassStorage (not WinUSB) device appears in Device Manager under “USB Devices” instead of “Disk Drives”, and stays there.
In USBDeview all the settings look correct for a MassStorage device. At this stage I’m treating this one as an outlier and keeping my “Reboot to MS mode” workaround as a configuration option.
Faster Response
This morning I installed 2.2.1.2000 and ran through the tests again. The PC that was taking over a minute to bring up the drive in Explorer now shows it almost immediately, big improvement, thanks!
Loss of “Eject”
One difference between the two versions, under 2.2.1.1000 if you tried to “Eject” a drive from Explorer it would change the device to “Suspended” state, and Windows would lock the drive to allow it to be removed. You could use the “Suspend” to change modes on the device.
Under 2.2.1.2000 you don’t get the “Suspend” state on Eject (although you still do if you unplug it), and Windows puts up a dialog saying it was unable to eject the device.
ADC Interaction
One other thing I’ve noticed while testing, there seems to be a side-effect between starting MassStorage mode and the ADC reading. Could this be caused by an incorrect register setting somewhere?
We have a task running every 100mS that does a couple of analog reads, one for battery voltage and one for a 2.5V external reference. Quite often (but not always) when changing to Mass Storage mode we get:
MassStorage Started
#### Exception System.InvalidOperationException - CLR_E_INVALID_OPERATION (13) ####
#### Message:
#### GHIElectronics.TinyCLR.Devices.Adc.Provider.AdcControllerApiWrapper::Read [IP: 0000] ####
#### GHIElectronics.TinyCLR.Devices.Adc.AdcChannel::ReadValue [IP: 0012] ####
#### AnodeMeter.Hardware.PhysicalBatteryCharge::PowerMonitor [IP: 006a] ####
Exception thrown: 'System.InvalidOperationException' in GHIElectronics.TinyCLR.Devices.Adc.dll
This probably happened with older firmware too, it has just become more obvious with current testing.
ADC channels being read are AdcController1.PC0 and AdcController3.PF9
Overall I’m very happy with the improved firmware, and I’m pushing these out ASAP.
Thanks for all your help!
David