Hi Giovanni,
i am seeing usb errors on STM32L496.
if the error occurs or not depends on the usb host port i am plugging in.
I have not found a pattern yet but this smells like a timing triggered issue.
Maybe it is related to viewtopic.php?t=3439
This is running into an assertion "already transmitting" during setup:
https://github.com/ChibiOS/ChibiOS/blob ... usb.c#L830
Any ideas on how to proceed tracking this down?
Thanks and best regards
Vinz
STM32L496 USB error Topic is solved
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: STM32L496 USB error
That problem was about getting an interrupt in an unexpected state of the driver state machine, this seems to be the same, not sure if it is the same problem.
What version are you using? host?
Giovanni
What version are you using? host?
Giovanni
Re: STM32L496 USB error
Giovanni wrote:What version are you using? host?
Host: Linux Mint 19
4.15.0-34-generic #37-Ubuntu SMP Mon Aug 27 15:21:48 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
ChibiOS 18.2.1
Compiler: arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 7-2018-q2-update) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907]
Flags: -O2 -flto -specs=nano.specs -ggdb -fomit-frame-pointer -falign-functions=16 -falign-loops=16
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: STM32L496 USB error
Could you give a try to trunk code? there is a significant difference in the OTGv1 driver.
Giovanni
Giovanni
Re: STM32L496 USB error
Trace of failure:
Maybe this helps getting an idea of whats going wrong.
Btw. i enabled the L4 workaround for the stm32l496.
When i find some time, i will redo the trace on a host port which doesn't show the error.
Then maybe i can see the diff.
Cheers
Vinz
Code: Select all
...
lld_serve_interrupt(sts = 0x00000008 /* GINTSTS_SOF */)
lld_serve_interrupt(sts = 0x00000008 /* GINTSTS_SOF */)
lld_serve_interrupt(sts = 0x00000008 /* GINTSTS_SOF */)
lld_serve_interrupt(sts = 0x00080000 /* GINTSTS_OEPINT */)
OEPINT(src = 0x00010000)
otg_epout_handle(epint = 0x00008008 /* DOEPINT_SETUP_RCVD | DOEPINT_STUP */)
_usb_ep0setup(ep = 0)
default_handler(ep = 0)
usbStartTransmit(ep = 0)
usb_lld_start_in(ep = 0)
lld_serve_interrupt(sts = 0x00040000 /* GINTSTS_IEPINT */)
IEPINT(src = 0x00000001)
otg_epin_handler(ep = 0)
lld_serve_interrupt(sts = 0x00000010 /* GINTSTS_RXFLVL */)
otg_rxfifo_handler(sts = 0x01cc0080 /* ep = 0, cnt = 8, /* GRXSTSP_SETUP_DATA */)
lld_serve_interrupt(sts = 0x00000010 /* GINTSTS_RXFLVL */)
otg_rxfifo_handler(sts = 0x01cc0080 /* ep = 0, cnt = 8, /* GRXSTSP_SETUP_DATA */)
lld_serve_interrupt(sts = 0x00000010 /* GINTSTS_RXFLVL */)
otg_rxfifo_handler(sts = 0x01cc0080 /* ep = 0, cnt = 8, /* GRXSTSP_SETUP_DATA */)
lld_serve_interrupt(sts = 0x00000008 /* GINTSTS_SOF */)
lld_serve_interrupt(sts = 0x00000010 /* GINTSTS_RXFLVL */)
otg_rxfifo_handler(sts = 0x01ec0080 /* ep = 0, cnt = 8, /* GRXSTSP_SETUP_DATA */)
lld_serve_interrupt(sts = 0x00000010 /* GINTSTS_RXFLVL */)
otg_rxfifo_handler(sts = 0x01e80000 /* ep = 0, cnt = 0, /* GRXSTSP_SETUP_COMP */)
lld_serve_interrupt(sts = 0x00080000 /* GINTSTS_OEPINT */)
OEPINT(src = 0x00010000)
otg_epout_handle(epint = 0x00008008 /* DOEPINT_SETUP_RCVD | DOEPINT_STUP */)
_usb_ep0setup(ep = 0)
default_handler(ep = 0)
usbStartTransmit(ep = 0)
HALT
Maybe this helps getting an idea of whats going wrong.
Btw. i enabled the L4 workaround for the stm32l496.
When i find some time, i will redo the trace on a host port which doesn't show the error.
Then maybe i can see the diff.
Cheers
Vinz
Re: STM32L496 USB error
Trace of different error on different host port:
Code: Select all
...
lld_serve_interrupt(sts = 0x00000008 /* GINTSTS_SOF */)
lld_serve_interrupt(sts = 0x00000008 /* GINTSTS_SOF */)
lld_serve_interrupt(sts = 0x00000008 /* GINTSTS_SOF */)
lld_serve_interrupt(sts = 0x00000010 /* GINTSTS_RXFLVL */)
otg_rxfifo_handler(sts = 0x01ec0080 /* ep = 0, cnt = 8, /* GRXSTSP_SETUP_DATA */)
lld_serve_interrupt(sts = 0x00000010 /* GINTSTS_RXFLVL */)
otg_rxfifo_handler(sts = 0x01e80000 /* ep = 0, cnt = 0, /* GRXSTSP_SETUP_COMP */)
lld_serve_interrupt(sts = 0x00080000 /* GINTSTS_OEPINT */)
OEPINT(src = 0x00010000)
otg_epout_handle(epint = 0x00008008 /* DOEPINT_SETUP_RCVD | DOEPINT_STUP */)
_usb_ep0setup(ep = 0)
default_handler(ep = 0)
usbStartTransmit(ep = 0)
usb_lld_start_in(ep = 0)
lld_serve_interrupt(sts = 0x00040000 /* GINTSTS_IEPINT */)
IEPINT(src = 0x00000001)
otg_epin_handler(ep = 0)
lld_serve_interrupt(sts = 0x00040000 /* GINTSTS_IEPINT */)
IEPINT(src = 0x00000001)
otg_epin_handler(ep = 0)
_usb_ep0in(ep = 0)
usbStartReceiveI(ep = 0)
usb_lld_start_out(ep = 0)
lld_serve_interrupt(sts = 0x00000010 /* GINTSTS_RXFLVL */)
otg_rxfifo_handler(sts = 0x01e50000 /* ep = 0, cnt = 0, /* GRXSTSP_OUT_DATA */)
lld_serve_interrupt(sts = 0x00000010 /* GINTSTS_RXFLVL */)
otg_rxfifo_handler(sts = 0x01e70000 /* ep = 0, cnt = 0, /* GRXSTSP_OUT_COMP */)
lld_serve_interrupt(sts = 0x00080000 /* GINTSTS_OEPINT */)
OEPINT(src = 0x00010000)
otg_epout_handle(epint = 0x00002011 /* DOEPINT_13?? | DOEPINT_OTEPDIS | DOEPINT_XFRC */)
_usb_ep0out(ep = 0)
lld_serve_interrupt(sts = 0x00000010 /* GINTSTS_RXFLVL */)
otg_rxfifo_handler(sts = 0x01ec0080 /* ep = 0, cnt = 8, /* GRXSTSP_SETUP_DATA */)
lld_serve_interrupt(sts = 0x00000010 /* GINTSTS_RXFLVL */)
otg_rxfifo_handler(sts = 0x01e80000 /* ep = 0, cnt = 0, /* GRXSTSP_SETUP_COMP */)
lld_serve_interrupt(sts = 0x00080000 /* GINTSTS_OEPINT */)
OEPINT(src = 0x00010000)
otg_epout_handle(epint = 0x00008008 /* DOEPINT_SETUP_RCVD | DOEPINT_STUP */)
_usb_ep0setup(ep = 0)
default_handler(ep = 0)
Hitting this: https://github.com/ChibiOS/ChibiOS/blob/stable_18.2.x/os/hal/src/hal_usb.c#L800
Re: STM32L496 USB error
DOEPINT_13 seems to be "nak":
https://www.intel.com/content/www/us/en ... 93052.html
Maybe this makes sense to you.
https://www.intel.com/content/www/us/en ... 93052.html
Maybe this makes sense to you.
Who is online
Users browsing this forum: No registered users and 20 guests