mirror of
git://projects.qi-hardware.com/f32xbase.git
synced 2024-11-23 22:35:20 +02:00
Requests following a rejected SETUP requests failed too, which sometimes
produces user-visible errors and may confuse implementations. (E.g., when probing for an unimplemented feature and subsequently being greeted by a timeout.) - fw/comon/usb.c (handle_setup): set SOPRDY when answering a request error with a stall, according to the example in AN139. This seems to eliminate the timeouts observed in requests following after bad requests. - fw/boot/boot.c (run_payload): described how the host is expected to respond to the device resetting its USB stack
This commit is contained in:
parent
bc37839a3a
commit
fd09655773
@ -71,6 +71,15 @@ void run_payload(void)
|
|||||||
/* Restart USB */
|
/* Restart USB */
|
||||||
USB0XCN = 0;
|
USB0XCN = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The USB host must detect a disconnect (pull-ups absent) within 2 and
|
||||||
|
* 2.5 us according to parameter Tddis in table 7-13 on page 186 of the
|
||||||
|
* Universal Serial Bus Specification Revision 2.0.
|
||||||
|
*
|
||||||
|
* If our application calls usb_init really really quickly, we may need
|
||||||
|
* an extra delay here.
|
||||||
|
*/
|
||||||
|
|
||||||
debug("launching payload\n");
|
debug("launching payload\n");
|
||||||
|
|
||||||
__asm
|
__asm
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* common/usb.c - USB hardware setup and standard device requests
|
* common/usb.c - USB hardware setup and standard device requests
|
||||||
*
|
*
|
||||||
* Written 2008, 2009 by Werner Almesberger
|
* Written 2008-2010 by Werner Almesberger
|
||||||
* Copyright 2008m 2009 Werner Almesberger
|
* Copyright 2008-2010 Werner Almesberger
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -258,8 +258,9 @@ okay:
|
|||||||
}
|
}
|
||||||
stall:
|
stall:
|
||||||
printk("STALL\n");
|
printk("STALL\n");
|
||||||
usb_write(E0CSR, SDSTL_0);
|
/* AN139 recommends this sequence */
|
||||||
ep0.state = EP_STALL;
|
usb_write(E0CSR, SOPRDY | SDSTL_0);
|
||||||
|
ep0.state = EP_IDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user