2023-09-29 11:24 AM
STM32U575VIT6Q
Configured USB_OTG_FS to Device only mode and further configured ThreadX and USBX..
But when running the code it always get stuck at this Memory insufficient error..
Solved! Go to Solution.
2023-09-29 01:07 PM - edited 2023-09-29 01:08 PM
at which size you set it ?
(for host) i set pool size 0x8000 , stack size 24*1024 B.
2023-09-29 01:07 PM - edited 2023-09-29 01:08 PM
at which size you set it ?
(for host) i set pool size 0x8000 , stack size 24*1024 B.
2023-10-04 02:49 PM
Hi @AScha.3 ,
Thanks for your response.
I set pool size as 0x8000 and stack size as 24*1024, but still the firmware stuck at the Memory insufficient error..
Can you share me your configurations? or your code for my reference with only USB peripheral active..
2023-10-05 06:15 AM - edited 2023-10-05 06:22 AM
sharing my code would not help you, it has nothing in common with your project, except using this Azure/usbx.
but i see, in your debug pic , pool start - end = 512 B. thats not enough. i have 24KB here.
see:
but you set Application thread stack size also to 24K. try set this at 1024 (as i did).
and read the info, cube is giving : (we hope, its right...)
2023-10-05 02:25 PM
Hi @AScha.3 ,
Thanks for your response.
I changed configuration as follows and it resolved the memory allocation issue. But, the USB is not detected on the device manager on the PC. Not sure if i am missing anything else. Let me know if you have any suggestions. Thanks a lot for your support.
UXDevice memory pool size = 1024*26
USBX Device System Stack Size = 1024*22
USBX Device Application Thread Stack Size = 1024
2023-10-05 02:26 PM
My STM32 project file is placed on the below link,
https://drive.google.com/file/d/1cgsYnBItklQ5ghDTIzFgrIrc8Wn5GlTJ/view?usp=sharing
2023-10-05 10:53 PM
well, after about 50 hours try+debug , i got it almost running (audio host).... :expressionless_face:
look at example , maybe you can find something, thats missing in your code:
usb doing "nothing" - i found, on my chip (H563zit) usb-vdd power was NOT enabled ! so it will never do anything on the usb-lines ; needed :
/* Drive vbus */
USBH_DriverVBUS(USB_VBUS_TRUE);