I am working on a project that reads files from a pendrive and records them in flash memory.
I have the USBX Mass Storage example on the S5D9 development board and it works correctly.
I have a user project that is already running on that same S5D9 board and that has 485 communications with other devices, and I want to add this functionality to read files from a pendrive in this project.
When I add a new thread usb_thread, with a FileX on USB Mass Storage, and I configure it exactly like the sample project, I get an error when trying to debug the application.
In common_data.c, line 215, in the function ux_common_init0, the inicialization of the host stack return an error, the line
status_ux_init = ux_host_stack_initialize (ux_system_host_change_function); return 0x16 (UX_THREAD_ERROR).
All the configuration of two projects are equal. I do not know where the error may be, can someone help me with this?
The e2studio is version 6.3.0 and today I installed the ssp version 1.5.1.
How's this issue? Were you able to solve it?
JBRenesasRulz Forum Moderator
In reply to JB:
In reply to Hanton:
In reply to Renesas Karol:
I attached the thread and USBX on ux configuration.
In my project I have not included USBX Source, I do not know if it is necessary.
But in the TCP communications thread, NetX Source and ThreadX Source are added.
Now I change the USBX Pool Memory Size to 63488, and I put a callback function: User Callback for Host Event Notification(Only valid for USB Host) usb_host_plug_event_notification. The result after these changes is the same error.
Thanks for your help.
Now I have added the USBX Source without modifying its configuration by default and the problem is solved, it does not give the error. But i do not know why.
And now I have another problem, I do not get the error, but when I enter the pendrive it does not call the callback function usb_host_plug_event_notification.
The configuration of the USBX Source is:
I don´t know if I have to configure something to activate the callback function, because in the example project that does work, not even the USBX Source is added.
No, I have not changed anything about the ThreadX Source configuration, it was added because it was necessary when adding NetX Source, which is necessary to change Maximum Listen Requests to 16.
In any case I enclose the ThreadX Source configuration, the missing fields are empty, and the last field Show linkage warning is Disabled.
In reply to Josh: