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:
Gregory Nutt 2015-05-03 16:14:08 -06:00
parent af319b779d
commit aac16a62c8
3 changed files with 22 additions and 9 deletions

View File

@ -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

View File

@ -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

View File

@ -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;
}