2020-09-08 06:06 AM
Hi all,
We are using the en.stm32_f105-07_f2_f4_usb-host-device_lib_2.2.0 library for CDC functionality. Our STM32 ist USB device connected with host. Everything working fine till the host gets HW reset. Then sometimes after host booted again the STM32 does not send data. Do you know why it could happened and do you know reliable fix for this case?
Thanx,
Sergey
2020-09-08 11:27 AM
When the host reboots it must re-enumerate connected devices (reset, assign address etc).
Make sure you handle this correctly and can repeat enumeration several times.
-- pa
2020-09-08 11:38 PM
Hi Pavel,
Thank you for answer! We are using en.stm32_f105-07_f2_f4_usb-host-device_lib_2.2.0
As host we are using PC running with Linux 4.19. The host after reboot finds our board connected as CDC ACM. Enumeration etc. seems to be ok. But there are something wrong in data sending. Because sometimes device sends no data. In this error case I saw in debugger, that data comes via CDC into device. I found already one deadlock in usbd_cdc_core.c sending logic:
we implemented resetting of this state machine onto USB Reset interrupt and error comes now very seldom. But sometimes we still see that the device receives and does not send data.
I'm asking me: "what is still wrong here? are we alone who got this error? Probably this error already known and ST knows solution for it"
Thanx,
Sergey