I upgrading our hardware(XE216-512_TQ128) by USB CDC device, and when programming is done I made a soft reset by a func:
device_reboot_aux () (function is available in the end of message).
The problem is:
- After reboot I cant connect to cdc serial device(e.g. Hyper Terminal, or by other own made serial application). I m using Windows7.
- I can see the device in device managger, and by messages from here, it is working properly, but not works with real Hyper Terminal.
(I have a composite device, Usb Audio + CDC + WebUsb, and other devices working properly after soft reset.)
There are two solutions:
- Unplug/ Replug usb device
- Reinstall driver (USBSER.SYS) from Task managger. (This works without manual unplug/replug)
I think the problem is with driver. Maybe during soft reset, the device is not correctly unplugged/plugged. Can I somehow connect/reconnect the usb on xmos device by firmware?
Code: Select all
void device_reboot_aux(void)
{
unsigned int pllVal;
unsigned int localTileId = get_local_tile_id();
unsigned int tileId;
unsigned int tileArrayLength;
unsigned int i;
/* Find size of tile array - note in future tools versions this will be available from platform.h */
asm volatile ("ldc %0, tile.globound":"=r"(tileArrayLength));
/* Reset all remote tiles */
for(i = 0; i< tileArrayLength; i++)
{
/* Cannot cast tileref to unsigned! */
tileId = get_tile_id(tile[i]);
/* Do not reboot local tile yet! */
if(localTileId != tileId)
{
read_sswitch_reg(tileId, 6, pllVal);
pllVal &= PLL_MASK;
write_sswitch_reg_no_ack(tileId, 6, pllVal);
}
}
/* Finally reboot this tile! */
read_sswitch_reg(localTileId, 6, pllVal);
pllVal &= PLL_MASK;
write_sswitch_reg_no_ack(localTileId, 6, pllVal);
while(1);
}