History: usbh_base


This page describes all changes made to the usbh_base package, the USB Host base, since its release.

Version

3.21 (2020-05-18, 19:26):

  • Fix at revision 3.16 (remove active transfers when Host Controller is stopped) was incorrectly removing transfers for all devices connected to the root HUB when any device was removed from a port connected to an external HUB, potentially corrupting communication with any active device.

3.20 (2020-03-18, 17:13):

  • Expanded t_usbh_port_inf with release (bcdDevice) field.
  • Config option added to round down the polling interval to the greatest power of 2 that is smaller then the original or equal.

3.19 (2020-02-24, 16:56):

  • Code could crash if disconnect happened during enumeration.

3.18 (2019-09-13, 12:00):

  • C++ compiler errors eliminated.

3.17 (2018-08-27, 16:30):

  • Static analysis issues eliminated.

3.16r2 (2019-07-11, 14:05):

  • Default configuration option value for OTG (USBH_OTG_SRPHNP_SUPPORT) set to 0.

3.16 (2019-06-28, 13:40):

  • Active transfers are removed when Host Controller is stopped. This caused issues when restarting a host controller after being stopped while there were active transfers.

3.15 (2019-05-29, 18:30):

  • OTG SRP and HNP support added.

3.14r2 (2018-08-29, 18:17):

  • Document HTML link added to the documentation folder.
  • History and document files renamed to the package name.

3.14 (2018-06-19, 13:29):

  • Hard-coded constant value replaced by a macro (USBH_SETUP_SIZE).

3.13 (2017-09-25, 07:49):

  • Compiler warnings eliminated.

3.12 (2017-06-29, 10:34):

  • Compiler warnings eliminated.

3.11:

  • Static analyzer warnings were eliminated (CodeSonar).

3.10:

  • Compiler warnings were eliminated.

3.09:

  • Fixed the case when there are no more free resources when a new device is connected.

3.08:

  • warnings removed.

3.07:

  • Host controller stop could fail to work correctly if a device was plugged to a port and USBH_MAX_EXT_HUBS was not set.

3.06:

  • usbh_test_mode_port() operation fixed for ports on a HUB directly connected to the root HUB.

3.05:

  • connection is reported in port information for connected but not enumerated devices.
  • devices reconnected to the root HUB during enumeration didn't enumerate correctly.
  • usbh_test_mode_device() returned success when invalid port handle was passed as a parameter.

3.04:

  • works with USBH_MAX_EXT_HUBS set to zero.

3.03:

  • usbh_get_port_inf_port() function added to gain information of a device based on the host controller ID and port path.

3.02:

  • warnings removed.

3.01:

  • usbh_test_mode_dev() and usbh_test_mode_port() introduced to be able to enable test mode on HS devices and ports.

2.32:

  • warnings removed.

2.31:

  •  Enumeration failure occurred if usbh_get_port_inf() was called from connection notification callback.

2.30:

  •  Fast connect-disconnect problem fixed.
  •  Suspend call for an already suspended device was handled incorrectly.

2.29:

  •  Incorrect mount could happen for a device connected to the root HUB in case a device was unplugged just before the new connection.
  •  usbh_get_string() was fixed.

2.28:

  • Remote wakeup request incorrectly caused re-enumeration.

2.27:

  • Fix for non-RTOS mode stop/suspend/resume all RTOS/non-RTOS mode.

2.26:

  • Many fixes to avoid issues with suspend, resume, re-enumeration, disconnection or HC stop occurring simultaneously.
  • Fix to generate disconnection events for downstream devices of a disconnected HUB.
  • Possibility to suspend/resume a HUB with downstream devices.
  • Fix to allow the use of a device connected to an FS HUB via an HS HUB.

2.25:

  • Added support for enabling Remote Wakeup capability on devices supporting it.

2.24:

  • Mutex protection added around control channel transfers. Required to avoid simultaneous access from class drivers are allowed to execute control channel transfers from different tasks (e.g. HID).

2.23:

  • Suspend/resume checks if the option is available in the host controller. Without this fix the system could crash if the HC didn't support suspend or resume.
  • Warnings removed on 16-bit microcontrollers.

2.22:

  • When ports are removed host controller delete address function received incorrect device address if the device was not in addressed state, as a consequence if stop/delete was called during enumeration of a device the system could lock up waiting for a mutex and also memory could have been locked forever in hcc_mem module.
  • Lock timeout mutex at usbh_delete() to make sure it is unlocked before deletion.
  • Warnings removed.

2.21:

  •  usbh_state(), usbh_get_vid_pid(), usbh_get_port_path() functions removed and usbh_get_port_inf() function introduced.

2.20:

 - timeout task: addition of 0x100 to subtraction of current frame number and previous frame number in case of cframe overflow removed.

2.19:

  • Non-blocking transfer could be stopped in case of suspended device due to an uninitialized variable in _usbh_transfer_start().

2.18:

  • Suspend/resume handling implementation fixed, all blocking transfers directed to a suspended device will be aborted with USBH_ERR_SUSPENDED error code and all non-blocking transfers will be placed to a pending queue and restarted when the device resumes.
  • Handles remote wakeup.
  • usbh_state() function added.

2.17:

  • Enumeration failed callback added.

2.16:

  • Locks mutexes at usbh_delete() to make sure mutexes are unlocked before deleting them.

2.15:

  • Preserve toggle for:

           - multi-packet transfers advanced by the common part

            - parts of Get Device Descriptor.

2.14:

  •  usbh_timeout_task changed to be able to handle time slicing. Problem occurred if transfer initiated by a task of the same priority level as the timeout task timed out and the scheduler instead of finishing the timeout task switched to the task that started the transfer. This could crash the system.

2.13:

  • Warning fixed.

2.12:

  • In case of an error occurs when transfer is started the error code is also written to the transfer structure, without this some class drivers could become unoperational if called from a lower priority task than usbh_pmgr_task.

2.11:

  • usbh_get_vid_pid() function introduced.
  • usbh_reenumerate() function introduced.
  • usbh_register_config_select_cb() introduced.

2.10:

  • psp_endianness.h used instead of psp_endiness.h.
  • usbh_utils uses usbh_base version number (not separated any more).

   

Earlier fixes in usbh_utils (for reference):

   3.0:

  • get_next_dsc() removed and get_next_cfg_dsc() added instead. This new function will be able to process any size of configuration descriptor without the need of a buffer that can hold the whole descriptor.

   2.1:

  •  Check function prototypes by including its header file.

2.9:

  • Use get_next_cfg_dsc() instead of get_next_dsc() to process next descriptor in the config.
  • Removed some needless transfer variable sets from usbh_receive_control_b and usbh_send_control_b.

2.8:

  • Pending transfers are executed in FIFO order (before it was LIFO) this is required for correct ISO operation.
  • If a device failed to enumerate and another device was plugged (without plugging the bad device) the new device couldn't enumerate either.

2.7:

  • return codes changed from enum to #define.
  • notification callback has return code now, in case the user needs to tell any state to the class driver.
  • USBH_TIMEOUT_NODATA, USBH_TIMEOUT_IN and USBH_TIMEOUT_OUT renamed to USBH_TIMEOUT_CONTROL_*.
  • USBH_TIMEOUT_CONTROL_IN changed from 500 to 5000 ms, found some devices where data is returned only 2seconds later to the setup packet.
  • USBH_TIMEOUT_CONTROL_NODATA changed from 100ms to 1000ms for the same purpose as USBH_TIMEOUT_CONTROL_IN.
  • needless version number checks removed.
  • NTF codes changed from enum to #define.

2.6:

  • Check function prototypes by including its header file.

2.5:

  • Suspend/resume crashed on a root HUB that doesn't support suspend/resume.

2.4:

  • FS device could fail to mount in a multi host controller EHCI and OHCI combination. This was fixed and the enumeration code was reorganized.

2.3:

  • USBH_ERR_INVALID_SIZE error code introduced
  • Common code (usb_host.c) reorganized due to a bug that could cause never ending transfers in case TRANSFER_FULL error was returned by the host controller and all pending transfers were finished before current transfer was added to pending queue.
  • Pending and timeout mutex introduced instead of global pmgr_mutex for clearer understanding.

2.2:

  • OAL resource initialization changed. It will free resources from init in case of failure.

2.1:

  • Initial release.