diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-09-19 09:46:15 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-09-19 09:46:15 +0000 |
commit | 1d47a1a5a67135620ed5d7fedc0f552270f382b3 (patch) | |
tree | 6ad273154b91f5a52017177f11225dc5ddac7c64 | |
parent | 7956d88851e0357c678b9632ce27b7b943500f60 (diff) | |
download | ChibiOS-1d47a1a5a67135620ed5d7fedc0f552270f382b3.tar.gz ChibiOS-1d47a1a5a67135620ed5d7fedc0f552270f382b3.tar.bz2 ChibiOS-1d47a1a5a67135620ed5d7fedc0f552270f382b3.zip |
Fixed bug 3569374.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4692 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/platforms/STM32/USBv1/usb_lld.c | 11 | ||||
-rw-r--r-- | readme.txt | 1 |
2 files changed, 7 insertions, 5 deletions
diff --git a/os/hal/platforms/STM32/USBv1/usb_lld.c b/os/hal/platforms/STM32/USBv1/usb_lld.c index aacdbfbf6..121e82f43 100644 --- a/os/hal/platforms/STM32/USBv1/usb_lld.c +++ b/os/hal/platforms/STM32/USBv1/usb_lld.c @@ -290,7 +290,6 @@ CH_IRQ_HANDLER(STM32_USB1_HP_HANDLER) { */
CH_IRQ_HANDLER(STM32_USB1_LP_HANDLER) {
uint32_t istr;
- size_t n;
USBDriver *usbp = &USBD1;
CH_IRQ_PROLOGUE();
@@ -339,17 +338,19 @@ CH_IRQ_HANDLER(STM32_USB1_LP_HANDLER) { /* Endpoint events handling.*/
while (istr & ISTR_CTR) {
+ size_t n;
uint32_t ep;
uint32_t epr = STM32_USB->EPR[ep = istr & ISTR_EP_ID_MASK];
const USBEndpointConfig *epcp = usbp->epc[ep];
if (epr & EPR_CTR_TX) {
+ size_t transmitted;
/* IN endpoint, transmission.*/
EPR_CLEAR_CTR_TX(ep);
- n = (size_t)USB_GET_DESCRIPTOR(ep)->TXCOUNT0;
- epcp->in_state->txcnt += n;
- epcp->in_state->txsize -= n;
+ transmitted = (size_t)USB_GET_DESCRIPTOR(ep)->TXCOUNT0;
+ epcp->in_state->txcnt += transmitted;
+ epcp->in_state->txsize -= transmitted;
if (epcp->in_state->txsize > 0) {
/* Transfer not completed, there are more packets to send.*/
if (epcp->in_state->txsize > epcp->in_maxsize)
@@ -362,7 +363,7 @@ CH_IRQ_HANDLER(STM32_USB1_LP_HANDLER) { epcp->in_state->mode.queue.txqueue,
n);
else {
- epcp->in_state->mode.linear.txbuf += n;
+ epcp->in_state->mode.linear.txbuf += transmitted;
usb_packet_write_from_buffer(USB_GET_DESCRIPTOR(ep),
epcp->in_state->mode.linear.txbuf,
n);
diff --git a/readme.txt b/readme.txt index 1abf88a01..2998900aa 100644 --- a/readme.txt +++ b/readme.txt @@ -83,6 +83,7 @@ *****************************************************************************
*** 2.5.1 ***
+- FIX: Fixed problem in STM32F1xx USB driver after revision 4598 (bug 3569374).
- FIX: Fixed GPIO glitch during PAL initialization (bug 3569347)(backported
to 2.4.3).
- FIX: Fixed Data available event not generated in serial_usb driver (bug
|