STM32L476 USB HAL errors Topic is solved
Re: STM32L476 USB HAL errors
I have changed line 1006 in hal_usb_lld.c, setting value to 1 and 0 with same result: EP0 state machine error at receiving mentioned "A1..." packet.
Re: STM32L476 USB HAL errors
kreyl wrote:I checked out the trunk and replaced next files in my project:hal_usb.h
hal_usb.c
hal_usb_cdc.h
hal_usb_lld.h
hal_usb_lld.c
stm32_otg.h
Don't forget to update the registry as well. Otherwise the workaround will not be active.
Cheers
Vinz
Re: STM32L476 USB HAL errors
Removing assert at line 950 (osalDbgAssert(false, "EP0 state machine error");) fixed the problem, everything works smoothly.
Vinz, yes, I have replaced stm32_registry.h with file from trunk, STM32_OTG_SEQUENCE_WORKAROUND is defined there.
Vinz, yes, I have replaced stm32_registry.h with file from trunk, STM32_OTG_SEQUENCE_WORKAROUND is defined there.
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: STM32L476 USB HAL errors
What the the ep0 state when the assertion is triggered?
It looks like an IN transaction end while an OUT transaction is ongoing. Probably it is another instance of the problem, the fix was for OUT while IN/STP.
This device seems to throw EP0 interrupts at random times.
Giovanni
It looks like an IN transaction end while an OUT transaction is ongoing. Probably it is another instance of the problem, the fix was for OUT while IN/STP.
This device seems to throw EP0 interrupts at random times.
Giovanni
Re: STM32L476 USB HAL errors
Sorry, I was wrong: when STM32_OTG_SEQUENCE_WORKAROUND defined, everything works without disabling the assert.
When STM32_OTG_SEQUENCE_WORKAROUND undefined, assert fires at state USB_EP0_IN_SENDING_STS.
When STM32_OTG_SEQUENCE_WORKAROUND undefined, assert fires at state USB_EP0_IN_SENDING_STS.
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Who is online
Users browsing this forum: No registered users and 63 guests