Olimex LPC1766STK: The USB host waiter stack should be configurable because it needs to be a lot depending when using a hub
This commit is contained in:
parent
f48d9f93ce
commit
f9a30b1804
@ -429,7 +429,7 @@ static struct lpc17_list_s *g_iofree; /* List of unused I/O buffers */
|
||||
/* Pool and freelist of asynchronous transfer structures */
|
||||
|
||||
static struct lpc17_list_s *g_asynchfree;
|
||||
static struct lpc17_list_s g_asynchbuffers[CONFIG_LPC17_USBHOST_NASYNCH];
|
||||
static struct lpc17_asynch_s g_asynchbuffers[CONFIG_LPC17_USBHOST_NASYNCH];
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
@ -3499,7 +3499,7 @@ struct usbhost_connection_s *lpc17_usbhost_initialize(int controller)
|
||||
#ifdef CONFIG_USBHOST_ASYNCH
|
||||
/* Initialize asynchronous transfer structures */
|
||||
|
||||
for (i = 0, asynch = (struct lpc17_asynch_s *)g_asynchbuffers;
|
||||
for (i = 0, asynch = g_asynchbuffers;
|
||||
i < CONFIG_LPC17_USBHOST_NASYNCH;
|
||||
i++, asynch++)
|
||||
{
|
||||
|
@ -4,4 +4,16 @@
|
||||
#
|
||||
|
||||
if ARCH_BOARD_LPC1766STK
|
||||
|
||||
config LPC1766STK_USBHOST_STACKSIZE
|
||||
int "USB host waiter stack size"
|
||||
default 1536 if USBHOST_HUB
|
||||
default 1024 if !USBHOST_HUB
|
||||
depends on USBHOST
|
||||
|
||||
config LPC1766STK_USBHOST_PRIO
|
||||
int "USB host waiter task priority"
|
||||
default 100
|
||||
depends on USBHOST
|
||||
|
||||
endif
|
||||
|
@ -982,9 +982,10 @@ Configuration Sub-Directories
|
||||
When I ran into stack size issues, I just increased the size of
|
||||
all threads that had smaller stacks.
|
||||
|
||||
CONFIG_EXAMPLES_HIDKBD_STACKSIZE=2048 : Was 1024
|
||||
CONFIG_HIDKBD_STACKSIZE=2048 : Was 1024
|
||||
CONFIG_SCHED_HPWORKSTACKSIZE=2048 : Was 1024 (1024 is probably ok)
|
||||
CONFIG_EXAMPLES_HIDKBD_STACKSIZE=2048 : Was 1024
|
||||
CONFIG_HIDKBD_STACKSIZE=2048 : Was 1024
|
||||
CONFIG_SCHED_HPWORKSTACKSIZE=2048 : Was 1024 (1024 is probably ok)
|
||||
CONFIG_LPC1766STK_USBHOST_STACKSIZE=1536 | Was 1024
|
||||
|
||||
STATUS:
|
||||
2015-04-26: The hub basically works. I do get crashes in the LPC16 USB host driver
|
||||
|
@ -110,11 +110,11 @@
|
||||
#endif
|
||||
|
||||
#ifdef NSH_HAVEUSBHOST
|
||||
# ifndef CONFIG_USBHOST_DEFPRIO
|
||||
# define CONFIG_USBHOST_DEFPRIO 50
|
||||
# ifndef CONFIG_LPC1766STK_USBHOST_PRIO
|
||||
# define CONFIG_LPC1766STK_USBHOST_PRIO 50
|
||||
# endif
|
||||
# ifndef CONFIG_USBHOST_STACKSIZE
|
||||
# define CONFIG_USBHOST_STACKSIZE 1024
|
||||
# ifndef CONFIG_LPC1766STK_USBHOST_STACKSIZE
|
||||
# define CONFIG_LPC1766STK_USBHOST_STACKSIZE 1024
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@ -275,8 +275,8 @@ static int nsh_usbhostinitialize(void)
|
||||
|
||||
syslog(LOG_ERR, "ERROR: Start nsh_waiter\n");
|
||||
|
||||
pid = task_create("usbhost", CONFIG_USBHOST_DEFPRIO,
|
||||
CONFIG_USBHOST_STACKSIZE,
|
||||
pid = task_create("usbhost", CONFIG_LPC1766STK_USBHOST_PRIO,
|
||||
CONFIG_LPC1766STK_USBHOST_STACKSIZE,
|
||||
(main_t)nsh_waiter, (FAR char * const *)NULL);
|
||||
return pid < 0 ? -ENOEXEC : OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user