Search found 116 matches

by lilvinz
Tue Aug 22, 2017 12:38 pm
Forum: Bug Reports
Topic: STM32L476 USB HAL errors Topic is solved
Replies: 56
Views: 5571

Re: STM32L476 USB HAL errors Topic is solved

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
by lilvinz
Mon Aug 21, 2017 7:07 am
Forum: Bug Reports
Topic: STM32L476 USB HAL errors Topic is solved
Replies: 56
Views: 5571

Re: STM32L476 USB HAL errors Topic is solved

Could you try to change line 1006? otgp->oe[0].DOEPTSIZ = DOEPTSIZ_STUPCNT(3); Set the value to 1 then try to just set the register to zero, I suspect there is another cause for this. Another test, could you try to remove just that assertion? Giovanni Very quick testing reveals: otgp->oe[0].DOEPTSI...
by lilvinz
Mon Aug 21, 2017 7:02 am
Forum: Bug Reports
Topic: STM32L476 USB HAL errors Topic is solved
Replies: 56
Views: 5571

Re: STM32L476 USB HAL errors Topic is solved

I added that assertion with last changes for debug. Does it fails in trunk too or just in 16.1.8? Could you check the EP0 state when the assertion is triggered? How are you testing? Giovanni I did not have time to test it in trunk. That would require significant time to test. If you feel it is nece...
by lilvinz
Sun Aug 20, 2017 4:52 pm
Forum: Bug Reports
Topic: STM32L476 USB HAL errors Topic is solved
Replies: 56
Views: 5571

Re: STM32L476 USB HAL errors Topic is solved

Hi, i have backported your fix to 16.1.8 and it seems not to work. I am hitting this debug assert: void _usb_ep0setup(USBDriver *usbp, usbep_t ep) { size_t max; osalDbgAssert(usbp->ep0state == USB_EP0_STP_WAITING, "not in setup state"); usbp->ep0state is USB_EP0_ERROR when the assert is hi...
by lilvinz
Thu Jul 13, 2017 10:10 pm
Forum: Bug Reports
Topic: STM32L476 USB HAL errors Topic is solved
Replies: 56
Views: 5571

Re: STM32L476 USB HAL errors Topic is solved

I did another test and modified the 2nd patch to only clear DOEPINT_XFRC when DOEPINT_STUP bit is set which fails. When only checking for DOEPINT_SETUP_RCVD bit it works. So you original code seems not to handle DOEPINT_SETUP_RCVD. I didn't find any documentation regarding the difference between DOE...
by lilvinz
Thu Jul 13, 2017 9:32 pm
Forum: Bug Reports
Topic: STM32L476 USB HAL errors Topic is solved
Replies: 56
Views: 5571

Re: STM32L476 USB HAL errors Topic is solved

I tested the 2nd patch again. No issues with debug checks, no issues without debug checks. Tested using -O2 -ftlo as well as -O0. My build environment looks like this: GNU Tools for ARM Embedded Processors 6-2017-q2-update -specs=nano.specs -ggdb -fomit-frame-pointer -falign-functions=16 -falign-loo...
by lilvinz
Wed Jul 12, 2017 10:01 pm
Forum: Bug Reports
Topic: STM32L476 USB HAL errors Topic is solved
Replies: 56
Views: 5571

Re: STM32L476 USB HAL errors Topic is solved

I have to recheck thoroughly then. Did you try the first patch (imitating st hal behavior) as well?

Cheers

Vinz
by lilvinz
Wed Jul 12, 2017 3:05 pm
Forum: Bug Reports
Topic: STM32L476 USB HAL errors Topic is solved
Replies: 56
Views: 5571

Re: STM32L476 USB HAL errors Topic is solved

Giovanni wrote:Hi,

Is the new patch alternative to the first one?

Giovanni


Yes
by lilvinz
Sun Jul 09, 2017 3:19 pm
Forum: Bug Reports
Topic: STM32L476 USB HAL errors Topic is solved
Replies: 56
Views: 5571

Re: STM32L476 USB HAL errors Topic is solved

Here is a new patch against 16.1.8 based on the linux driver which seems to be more clean and works for me as well. diff --git a/os/hal/ports/STM32/LLD/OTGv1/stm32_otg.h b/os/hal/ports/STM32/LLD/OTGv1/stm32_otg.h index 2d0ae3b..1c8bc2f 100644 --- a/os/hal/ports/STM32/LLD/OTGv1/stm32_otg.h +++ b/os/h...
by lilvinz
Sun Jul 09, 2017 2:56 pm
Forum: Bug Reports
Topic: STM32L476 USB HAL errors Topic is solved
Replies: 56
Views: 5571

Re: STM32L476 USB HAL errors Topic is solved

Here is a patch which has been introduced in the linux kernel driver for synopsis OTG which seems to address the issue we see here: http://marc.info/?l=linux-usb&m=142080715106007&w=2 Only process DOEPINT.XferCompl on data packet as DOEPINTn.SetUp can occur with or without DOEPINT.XferCompl....

Go to advanced search