From d932e56dca2d410ccb1097edb7fcdcb02b33c254 Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 15 Feb 2013 14:37:37 +0000 Subject: [PATCH] STM32 F4 patches from Petteri Aimonen (mostly USB) git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5652 42af7a65-404d-4744-a932-0658087f49c3 --- ChangeLog | 18 +++ Documentation/NuttxUserGuide.html | 188 ++++++++++++++++++---------- arch/arm/src/stm32/stm32_otgfsdev.c | 139 +++++++++++++++++--- drivers/usbdev/Kconfig | 15 +++ drivers/usbdev/usbdev_trprintf.c | 40 +++++- include/nuttx/arch.h | 38 ++++-- include/nuttx/usb/usbdev_trace.h | 51 ++++++-- sched/Kconfig | 28 +++++ sched/os_start.c | 6 + 9 files changed, 419 insertions(+), 104 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b23207da5..b15cac83e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4178,3 +4178,21 @@ * configs/stm32f3discovery/nsh/defconfig: Disable SPI. It is nto used. * drivers/mtd/sst39vf: Add a driver for the SST29VF NOR FLASH parts. + * sched/os_start.c: Add an additional call-out to support board- + specific driver initialization during the start phase: If + CONFIG_BOARD_INITIALIZE is defined, then an additioinal + initialization function called board_initialize() will be called + just after up_initialize() is called and just before the initial + application is started. + * arch/arm/src/stm32/stm32_otgfsdev.c, drivers/usbdev/usbdev_trprintf.c, + and include/nuttx/usb/usbdev_trace.h: Add logic to support decoding + of device-specific trace events to make the trace ouput more readable. + From Petteri Aimonen. + * arch/arm/src/stm32/stm32_otgfsdev.c: Need to manually set CNAK in + the case where we are waiting for a SETUP command with DATA. Otherwise, + the core may NAK further transactions. From Petteri Aimonen. + * arch/arm/src/stm32/stm32_otgfsdev.c: Add logic to prevent premature + to IDLE state. This change (plus the previous) was necessary to get + the CDC/ACM driver working the certain STM32 F4 hardware (but not others). + These changes appear to prevent certain race conditions that may or may + not cause USB problems. From Petteri Aimonen. diff --git a/Documentation/NuttxUserGuide.html b/Documentation/NuttxUserGuide.html index 3df2dfa9d2..a12e61335a 100644 --- a/Documentation/NuttxUserGuide.html +++ b/Documentation/NuttxUserGuide.html @@ -13,7 +13,7 @@

NuttX Operating System

User's Manual

by

Gregory Nutt

-

Last Updated: February 5, 2013

+

Last Updated: February 13, 2013

@@ -1999,8 +1999,22 @@ priority of the calling task is returned.
  • 2.3.5 waitid
  • 2.3.6 wait
  • +
  • - atexit() and on_exit() may be use to register callback functions that are executed when a task exits. + Task Exit Hooks. + atexit() and on_exit() may be use to register callback functions that are executed when a task group terminates. + A task group is the functional analog of a process: + It is a group that consists of the main task thread and of all of the pthreads created by the main task thread or any of the other pthreads within the task broup. + Members of a task group share certain resources such as environment variables, file descriptors, FILE streams, sockets, pthread keys and open message queues. +

    +
    + NOTE: + Behavior of features related to task groups depend of NuttX configuration settings. + See the discussion of "Parent and Child Tasks," below. + See also the NuttX Threading Wiki page and the Tasks vs. Threads FAQ for additional information on tasks and threads in NuttX. +
    +

    + A task group terminates when the last thread within the group exits.