我有一个问题与FX2LP USB设备不重新启动后,我的Linux基于LIB总线的应用程序已被杀死CTL C在数据传输。
似乎USB总线正在消失,而
电源仍然被应用(我的设备是使用外部电源)。
只有通过对Pulver-Curror进行恢复,才能使设备循环。
解决这个问题的正确途径是什么?
我实现了一个肮脏的把戏在FX2的固件可以解决这个问题:
我实现了一个用户命令(vx_11)调用所有的方法,实现td_init()(见代码贝娄)。
然后我打电话给该用户的命令在设备开启相位(在libu***驱动)。
空隙TDyIIT(空隙)/在启动时调用一次
{
初始化文件包();
}
启动时空启动板(空隙)/调用一次
{
CPUCs=0x10;//CkkSPD[1:0]=10,用于48 MHz操作
IFCONFIG=0xE3;
…
…
}
//用户命令:
BoOL Dr.VundMcNordNod(Valm)
{
…
…
案例VXY11:
初始化文件包();
断裂;
}
因为某些原因,我不太明白,我要把这两次用户命令否则公交还是死了。
我相信有更好的/干净的方法来解决这个问题。
注:CyPress芯片的复位引脚连接到VCC。
谢谢,malik cisse
以上来自于百度翻译
以下为原文
I have an issue with a FX2LP USB device not restar
ting after my linux-libu*** based application has been killed with Ctl-c during data transfer.
It seems that the USB bus is going away while power is still applied (My device is using external power supply).
Only powercycling the device by replugging powwer cable helps.
What is the right way to solve this issue?
I implemented a dirty trick in the FX2 firmware that seems to solve the problem:
I implemented a user command (VX_11) that calls all the rutines implemented in TD_Init() (see code bellow).
I then call this user command in the device opening phase (in the libu*** driver).
void TD_Init(void) // Called once at startup
{
initialize_board();
}
void initialize_board(void) // Called once at startup
{
CPUCS = 0x10; // CLKSPD[1:0]=10, for 48MHz operation
IFCONFIG = 0xE3;
...
...
}
//user command:
BOOL DR_VendorCmnd(void)
{
...
...
case VX_11:
initialize_board();
break;
}
For some reason I don't quite understand, I need to send this user command twice otherwise the bus is still dead.
I am sure there is a better/clean way to solve this issue.
Note: The reset pin of the cypress chip is connected to VCC.
Thanks, malik cisse