Hello,
I'm developing a widget that uses the CC2511 and is based very heavily on the rs232_to_usb example. My application software uses the USB framework pretty much as-is, but I've stripped out most of the radio configuration and communications code for that example as it was very hard for me to follow and overkill for the application.
I have a few questions that I'm hoping someone from TI can step in and answer.
I've run into some failure modes with the USB device that I'm not sure how to detect and remedy, my attempts thus far have not really panned out.
I believe some of the problems could be with the interaction with the windows usb-serial driver (searching the internet yields a number of very negative references to usbser.sys).
Main Problem:
After some fault condition, perhaps the windows driver not emptying the buffer quickly enough (IN packets through usbser.sys), the device communication goes "mute". Data makes it to the CC2511/CC1111, but there is no data seen by the PC even though I know the device is trying to respond. As with the RS232 example, i wait for (USBCSIL & USBCSIL_INPKT_RDY) to return false before trying to send. I'm debugging this particular problem and I notice that in the failed state, the actual write usbfwWriteFifo(&USBF4,c) call takes much less time, and thus far I have not been able to recover from this condition.
I can also force this condition to happen by having the device continuously send data to the host while the host is reading the data out through a terminal program and then the port is closed.
So here are the questions:
1) Anyone else seen this?
2) I experimented with trying to flush the fifo but that did not work at the time. Is there any way to reset the endpoint fifo, or the controller, or to signal to windows to flush its buffer?
3) I realize that the application probably needs to revert to an inactive state when it has not been communicated with in a while -- what is the best way to do this? Right now the device will not be recognized by windows on a soft reboot or when connected to a powered USB hub. On some machines I've seen the device prevent the machine from booting.
Thanks for any help you can provide!
Lance