<p style="padding:0 0 0 0; margin:0 0 0 0;">Diky obema, pristi tyden se tu student objevi, tak na to mkneme a dam pak vedet.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">V.P.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">______________________________________________________________<br />
> Od: Jan Waclawek <konfera@efton.sk><br />
> Komu: HW-news <hw-list@list.hw.cz><br />
> Datum: 21.02.2018 16:21<br />
> Předmět: Re: problem s usb-cdc v stm32<br />
></p>
No ale to by sa nevylepsilo delayom v USBD_SetClassConfig(), ktory je<br />
volany z USBD_SetConfig(), tj. z funkcie, ktora prave spracovava<br />
SET_CONFIGURATION.. inaksie povedane, device ten SET_CONFIGURATION<br />
ocividne prijme, ale k PC sa odpoved dostane, len ked sa oneskori... alebo<br />
je tam nejake komplikovanejsia suvislost.<br />
<br />
V tom USBD_SetClassConfig() sa vola inicializacia specificka pre to CDC, ak<br />
je to rovnake, ako example v Cube, tak USBD_CDC_Init(), v ktorom sa vola<br />
otvaranie jednotlilvych endpointov, volanie inicializacie suvisiaceho<br />
hardwaru (typicky USARTov) a tiez je tam ten nestastny malloc. Co z toho<br />
moze sposobit to, ze device neodpovie, netusim.<br />
<br />
Kazdopadne by som vsak doporucil namiesto nariekania normalne debuggovacie<br />
postupy, t.j. zistit, co sa stane ked sa ten connect nepodari (napr. ci<br />
nezostane cely mcu visiet v fault handleri alebo v nejakom cykle, alebo<br />
nejakom preruseni apod.,) a samozrejme skusit prekrokovat tu kriticku<br />
funkciu (toto mozno nebude viest k cielu, vid "delay pomaha"), pripadne<br />
robit rozne pomocne vypisy/blikanie atd. na sledovanie cesty programu.<br />
<br />
wek<br />
<br />
<br />
<br />
<br />
<br />
----- Original Message ---------------<br />
<br />
Subject: Re: problem s usb-cdc v stm32<br />
From: Tomas Dresler <dresler@hw.cz><br />
Date: Wed, 21 Feb 2018 14:42:59 +0100<br />
To: HW-news <hw-list@list.hw.cz><br />
<br />
>Dobry den,<br />
><br />
>nesouvisi to s tim, jestli aktivujete D+ rezistor jeste pred <br />
>inicializaci knihovny nebo hodin? To by si host myslel, ze uz jste <br />
>pripraveny k enumeraci a zatim by STM32 jeste startovala...<br />
><br />
>Tomas<br />
><br />
><br />
>On 2018-02-21 13:50, Vojtěch Petrucha wrote:<br />
>> Zdravim,<br />
>> netusite prosim nekdo co by mohlo stat za problemem popsanym<br />
>> zde: <a href="https://community.st.com/message/183355">https://community.st.com/message/183355</a> (text z odkazu<br />
>> nize...)<br />
>> Dotaz psal pred casem na forum muj student, ja mu nedokazu poradit<br />
>> jelikoz tu nemam ted ten HW.. pouziva Cube.. cast zapojeni<br />
>> zde: <a href="https://ibb.co/chc8DH">https://ibb.co/chc8DH</a><br />
>> Diky<br />
>> V.P.<br />
>> <br />
>> <br />
>> --------------------------------------------<br />
>> <br />
>> USB - SET_CONFIGURATION fails<br />
>> <br />
>> <br />
>> Hello,<br />
>> I have encountered a problem with my STM32L452VE - when I set up USB<br />
>> with CDC, it sometimes connects, sometimes not. When it doesn't<br />
>> connect, Windows clasically show yellow exclamation mark.<br />
>> <br />
>> Increasing heap size and chaning packets size didn't solve this issue.<br />
>> <br />
>> I have tried sniffing USB communication and problem seems to be the<br />
>> same every time - SET_CONFIGURATION is sent from host (PC) but no<br />
>> response is received. Upon closer inspection, I tried to modify HAL<br />
>> libraries by adding an extra delay, which miraculously solved the<br />
>> issue and now it succusefully connects every time.<br />
>> <br />
>> As this this fix appears to be highly temporary, does anyone know the<br />
>> root of the issue?<br />
>> <br />
>> <br />
>> <br />
>> _______________________________________________<br />
>> HW-list mailing list - sponsored by www.HW.cz<br />
>> Hw-list@list.hw.cz<br />
>> <a href="http://list.hw.cz/mailman/listinfo/hw-list">http://list.hw.cz/mailman/listinfo/hw-list</a><br />
>_______________________________________________<br />
>HW-list mailing list - sponsored by www.HW.cz<br />
>Hw-list@list.hw.cz<br />
><a href="http://list.hw.cz/mailman/listinfo/hw-list">http://list.hw.cz/mailman/listinfo/hw-list</a><br />
<br />
_______________________________________________<br />
HW-list mailing list - sponsored by www.HW.cz<br />
Hw-list@list.hw.cz<br />
<a href="http://list.hw.cz/mailman/listinfo/hw-list">http://list.hw.cz/mailman/listinfo/hw-list</a><br />