2023-06-01 07:26 AM - edited 2023-11-20 04:11 AM
Hi.. I am working with stm32f429disco 1.. .I have generated with cube mx the fw init for usb host..
When I start my fw with the usb stick connected at least I am able to go inside the routine
USBH_Process
but when i run again the fw i am not able to stop in the same place..
What i mean is that with the usb stick connected just one time this variable is at value 1
phost->device.is_connected
The second time i try to stop the before variable is 0
Instead when I run the fw without the usb key conncted i never stop in the state
HOST_DEV_WAIT_FOR_ATTACHMENT
what could be wrong ?
It seems it is able to see the usb key just once and then something bad is happening
I think the setup from cube mx should be correct but i uploaded here ..
Can you please help me ?
VBus is enabled because the related led it is working..
Thanks
2023-06-01 02:15 PM
USB protocol requires real time response from the device. Stopping on breakpoint likely disturbs the connection and it fails. Find a way to debug without breakpoints.
2023-06-03 12:32 AM
Thanks @Pavel A. for your commnet. As confirmation can you please check the ioc file just to understand if everything was set up correctly for the stm32f429 disco 1 evaluation board. I don't understand why ST doesn't provide an ioc example for the usb host. Thanks a lot for your help
2023-06-03 11:38 AM
The STM32F4 package of examples has been developed before CubeMX has been released, so the examples for F4 boards are not based on .ioc and generated code.
New products do include .ioc based example projects.
Sorry, I don't have the stm32f429 disco to test ... and am a bit busy ))
2023-06-03 11:41 AM
Thanks @Pavel A. .. I will try to find some examples of ioc file for this development board. It is a pity they didnt update with the ioc file also for this board.
Thanks again
2023-06-12 03:19 AM
Hi @SGasp.1 , Did you get over the issue? I'm also using the same E-Val board and could not get any interrupt in the IRQ handler when working in Host mode.
2023-06-12 08:09 AM
Hi @RAnan.3 ..
The only solution that i have found it is reported here
https://community.st.com/s/question/0D53W00002FY6i2SAD/stm32f4-another-usb-host-msc-problem
I have tried to import quickly the folders but i got many issues.
Once i will have time i will try to fix the include issues..
You can try and let me know..
Thanks