cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with USB implementation with touchgfx

naveen
Associate II

 

I am using the STM32HUB50xBT6 development kit with TouchGFX. When enabling USB as Full-Speed (FS) and programming it with `USBH_PROCESS_STACK_SIZE` set to 4096, I face an issue where the allocation of `MSC_Handle` fails in the lower layers of the `usbh_msc` file. The debugging print message shows "cannot allocate memory for MSC handle," and this occurs within the `USBH_MSC_InterfaceInit()` function.

Can anyone help me in this

Thanking you in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
naveen
Associate II

this issue got solved, the problem is dynamic memory allocation when i peek inside a API of a driver there they are using malloc function to create a instant memory.

CORRECT ME IF IAM WRONG HERE: 
"what i learned from touchgfx, touchgfx will not support dymanic memory allocation it only supports static allocation. " correct me here please 

the same problem someone has faced. solution got explain by @Pavel A.  also iam pasting the link here for reference of their conversation " Concern on the usage of malloc() on USB Host MSC ... - STMicroelectronics Community "

thank your support!!

View solution in original post

1 REPLY 1
naveen
Associate II

this issue got solved, the problem is dynamic memory allocation when i peek inside a API of a driver there they are using malloc function to create a instant memory.

CORRECT ME IF IAM WRONG HERE: 
"what i learned from touchgfx, touchgfx will not support dymanic memory allocation it only supports static allocation. " correct me here please 

the same problem someone has faced. solution got explain by @Pavel A.  also iam pasting the link here for reference of their conversation " Concern on the usage of malloc() on USB Host MSC ... - STMicroelectronics Community "

thank your support!!