I tried to use FileX with USB mass storage, but when I try to initialize the Host USB Controller (with the USB key inserted) I get an error because the USB host controller did not find the USB device.
The flash drive is powered. Is there something wrong with the configuration?
The problem is in these lines of code:
/* Check the class container if it is for a USBX Host Mass Storage class. */
== _ux_utility_memory_compare (_ux_system_host_class_storage_name, host_class,
status = ux_system_host_storage_change_function (event, instance);
The ux_system_host_storage_change_function function is never called!
Hello Paolo!Thank you for your message and reaching through our Renesas Community. First, would like to confirm the hardware module/ part number that you are currently using. Would like also to know if you have ran through and check this document below:https://www.renesas.com/us/en/document/apn/usbx-host-class-mass-storage-module-guideHope this helps.
If this response, or one provided by another user, answers your question, please verify the answer. Thank you!
Renesas Engineering Community Moderatorhttps://community.renesas.com/https://academy.renesas.com/https://en-support.renesas.com/knowledgeBase/
I use S7G2 with SSP 2.4.0
I just read that document but I didn't find any errors.
Is it the code example or have you integrated this code into your own program?
If it's your own program, please try the sample code provided by Renesas and check if it works out of the box . https://www.renesas.com/us/en/document/scd/usbx-host-class-mass-storage-module-guide-rev105-sample-code?r=1054631
Also if it's your program, did you change any setting in the FileX/USBX stacks in the visual configurator? If yes, please provide the screenshots of the properties so I could try to reproduce your issue here.
By the way, is it a custom board or some development board like SK-S7G2 or DK-S7G2?
Your VBUSEN signal is not used. Normally this controls 5V supply to a attached usb device. What's your connection like?
I use a custom board. I didn't have a code example, I had integrated in to own program.
Now I use a signal analyzer.
I will keep you updated.
I do not use VBUSEN because the 5 V is always on.
I found that it is not a hardware problem if I remove all threads except the one that uses the USB mass controller detection works.
I have to remove these threads, if I disable them it still doesn't work and I don't understand why.
Do you have any ideas?
The type of your error and the result of your tests make me think that the problem is with the memory usage. Probably some of your threads use too much of RAM so the USBX and thread stacks overlap. Please check if you set enough stack and heap sizes, and if their overall size doesn't exceed the RAM volume.
The RAM is 99% because I use all free ram for heap (I changed the script file).
I tried increasing the main stack but it doesn't work.
How can I tell if there is an overlap between USBX and thread stack?