USB Library
Revision History

 

This section describes in more detail the changes made between versions of the MCHPFSUSB stack. This section generally discusses only changes made to the core files (those found in the <install directory>\Microchip folder). This section generally doesn't include changes to the demo projects unless those changes are important to know about. This section also doesn't encompass minor changes to the stack files such as arrangement or locations of definitions or any other organizational changes. 

 

For more information about how to compare the actual source of two different revisions, please see the Appendix - Using a diff tool section of this document.

Topics
Name 
Description 

  • Added support for PIC32MM0256GPM064 PIM

 

  • All demo projects: stack files reverted back to external references rather than imported locally
  • Adds HID PC example of how to talk to multiple instances of the same device (same VID/PID)
  • Minor fixes/improvements to code comments.
  • Improved error handling and throughput for CDC PC example. Additional fix for various carriage return/new line combinations.
  • Add support for PIC24F1024GB610 family to HID boot loader

 

  • Removed requirement to implement system_config.h for USB. Stack now only uses usb_config.h for configuration.
    • Files affected: most stack framework files.
  • USBInitialize() and USBTasks() removed. Use USBDeviceTasks()/USBHostTasks() or USBHostInit()/USBDeviceInit() as required.
    • Files affected: usb_common.h
  • Fixed dereferencing type-punned pointer will break strict-aliasing warning on full optimization.
    • Files affected: usb_device.c, usb_device_hid.c
  • Added MSDTransferTerminated() function.
    • Files affected: usb_device_msd.c
  • Added error checking for NULL data handler
    • Files affected: usb_host.c
  • Added return for case in USBHostDeviceStatus() for when the device state variable was invalid value.
    • Files affected: usb_host.c
  • Fixed error when parsing HID descriptors resulting in invalid errors... more 
  • Added support for the PIC24FJ256GB410 PIM.
  • Now licensed under Apache v2.0 license. Available upon request under MLA license.
  • Added EVENT_ALT_INTERFACE and EVENT_HOLD_BEFORE_CONFIGURATION
    • Files affected: usb_common.h
  • HID host API updated to allow for simultaneous IN and OUT transfers
  • USBHostHIDDeviceDetect() updated to allow for detection of new devices without having to scan all possible addresses.
  • Minor optimization for speed and size:
    • Files affected: usb_device.c
  • Fixed issue with being able to scan multiple configurations on an attached device:
    • Files affected: usb_host.c
  • Allow a driver to not have a data event handler by placing NULL... more 
  • Moved header files to "/inc" folder. Projects need to add path in project to point to "<install directory>/framework/usb/inc" to use the library.
  • Fixed issue where stack variable might not be initialized on non-compliant host.
    • Files affected: usb_device.c
  • Fixed issue where idle information was getting cleared if a bus error occurred.
    • Files affected: usb_device.c
  • Added functionality to allow low speed devices to provide/get timing information to the stack for time sensitive features (control transfers, idle controls, etc.)
  • Fixed issue where some drives would not work because the a double write wasn’t done when flushing data to the device resulting in some... more 
  • Added USB Device CDC serial emulator demo for 8-bit devices
  • Added USB Windows driver installation/removal tools under: \apps\usb\device\utilities
  • Implemented HID idle rate control in USB Device HID Keyboard demo
  • Modifications to PIC16F145x USB HID device bootloader memory mapping
  • Data transfer rate improvements in USB device msd_sd_card_reader demo
  • Bug fixes and project cleanup
 
  • Major changes to folder structure
  • Changed all type definitions and API used by the stack from GenericTypeDefs.h to standard C99 types.
  • Better hardware abstraction of the demo board specific features from the example application code.
  • Addition of new demo board platforms.
  • Expanded demo support for some existing platforms
  • PIC32 product support removed. PIC32 products are supported by the MPLAB(R)Harmony Framework (www.microchip.com/Harmony).
 
Updated HID bootloader for PIC18 devices. Added software entry point at 0x001C and robustness features to allow re-entry into bootloader in the event of interrupted erase/program/verify sequence.
  • Core USB stack files affected: None
  • Individual project files: All PIC18 HID bootloader projects were updated. Additionally, all main.c (or equivalent) USB device project demo files were updated, to reserve the 0x1006 and 0x1016 flash words for storing the "flash signature" and application firmware version values. For usage details, see the inline comments at the top of the main.c file in the HID bootloader firmware project.
  • Updated the cross platform PC application software... more 

Android files changed to request for protocol version and to wait for a user configurable startup delay.
  • stack files affected: usb_host_android.c
In the WinUSB based device projects, changed Microsoft specific OS descriptors to reside in ROM
  • stack files affected: none (only demo specific usb_config.h and usb_descriptors.c files affected)
Added conditional compilation definitions to support PIC16F1454, PIC16F1455, and 'LF' flavored PIC16F145x family devices
  • stack files affected: usb_function_cdc.c
 

Android driver condensed to remove protocol specific drivers.
  • stack files affected: usb_host_android.c, usb_host_android_protocol_v1.c (removed), usb_host_android_protocol_v1_local.h (removed)
Support added for registering Android HID reports.
  • stack files affected: usb_host_android.c, usb_host_android.h
Added support to ignore protocol, subclass, and/or class in the TPL for a USB host Added support for a client driver to register for EP0 traffic only Removed unused variables
  • stack files affected: usb_function_audio.c, usb_function_cdc.c
Added support for vendor class specific requests for MS descriptors
  • stack files affected: usb_function_generic.c, usb_function_generic.h, usb_device.c
Fixed folder capitalization issue:
  • stack files affected: usb_host_printer_primitives.c
Fixed an issue... more 
Android audio and HID support added to accessory driver
  • stack files affected: usb_host_android.c, usb_host_android_protocol_v1.c, usb_host_android.h, usb_host_android_protocol_v1.h, usb_host_android_local.h, usb_host_android_protocol_v1_local.h
Cleaning up unused variables in the stack
  • stack files affected: usb_device_cdc.c, usb_device_audio.c
Fixed build issue on Mac/Linux systems for printer host demo
  • stack files affected: usb_host_printer_primitives.c
Modifications to enable EP0 only driver
  • stack files affected: usb_host.h, usb_host.c, usb_host_local.h
Modifications to allow wildcards on TPL table entries Fixed issue where a device reporting 0 configurations available would cause the host stack to crash.
  • stack files affected: usb_host.c
Added support for Microsoft OS Descriptors
  • stack files affected:... more 
XC16 and XC32 support added.
  • stack files affected: usb_hal.h, usb_ch9.h, usb_hal_*.h, usb_host_printer.h, usb_host_printer_esc_pos.h, usb_function_msd.c, usb_function_msd_multi_sector.c, usb_function_phdc_com_model.c, usb_host_printer_esc_pos.c, usb_host_printer_pcl_5.c, usb_host_printer_postscript.c, usb_device.c, usb_device_local.h, usb_hal_local.h, usb_hal_pic24.c, usb_hal_pic24f.c, usb_host_local.h, usb_otg.c

Fixed issue with PIC32 access to USB registers not being atomic.
  • stack files affected: usb_hal_pic32.h

Support for PIC16F1459 family devices.
  • stack files affected: usb_hal.h, usb_device.c, usb_hal_pic16f1.h, usb_device_local.h

Removed hid_report_in[] and hid_report_out[] buffers from stack files. All HID demos responsible for allocating their own data buffers.
  • stack files affected: usb_function_hid.h, usb_device.c

Moved part specific mapping of BDT to HAL files.
  • stack files affected: usb_hal_dspic33e.h, usb_hal_pic16f1.h, usb_hal_pic18.h, usb_hal_pic24.h, usb_hal_pic24e.h, usb_hal_pic24f.h, usb_hal_pic32.h
 
  1. Read-modify-write race condition in the way the USB interrupt flag was getting cleared on the PIC32 devices.
    • Stack files affected: usb_hal_pic32.h
  2. Added option to disable NAK timeouts for CDC host transfers (USB_HOST_CDC_NAK_TIMEOUT)
    • Stack files affected: usb_host_cdc.c
  3. The ALLOW_GLOBAL_VID_AND_PID option does not issue the EVENT_OVERRIDE_CLIENT_DRIVER_SELECTION event.
    • Stack files affected: usb_host.c
  4. USB host isochronous writes did not function correctly
    • Stack files affected: usb_host.c
  5. USB host isochronous writes and reads could not occur during the same frame
    • Stack files affected: usb_host.c
  6. NULL pointer dereference could occur if a malloc() call failed during device enumeration in USB host stack while creating the endpoint data... more 
  1. Data event handler of Android driver not passing events to protocol handler resulting in possible memory leak.
    • Stack files affected: usb_host_android.c
  2. Issues with mass storage demos on OS X 10.7 when SD-card is read-only.
    • Stack files affected: usb_function_msd.c
  3. Fixed compile warnings when -Wall option selected on C32
    • Stack files affected: usb_host_msd.c
  4. Fixed issue with call back redirection macro for EP0 request handler.
    • Stack files affected: usb_device_local.h
  5. Added configuration option to disable DTS checking in hardware
    • Stack files affected: usb_device.c
  6. Fixed a race condition between the 1msec interrupt and the detach interrupt. If the detach interrupt occurs just before the 1msec... more 
  1. Added example showing how to connect to custom HID, LibUSB, WinUSB, and MCHPUSB demos from an Android v3.1+ host.
    • Stack files affected: none
  2. Updated libusb driver INF to be signed, so now it can be installed with Windows 7
    • Stack files affected: none
  3. Some dsPIC projects not building correctly
    • Stack files affected: usb_hal_dspic33e.h, usb_hal_pic24e.h
 
  1. UART RX functionality fixed on several demos using the PIC24FJ256DA210 development board.
    • Stack files affected: none
  2. Race condition fixed in Android OpenAccessory framework that could lead to the accessory not attaching periodically.
    • Stack files affected: usb_host_android_protocol_v1.c
  3. Added Android Accessory workaround for when Android device attaches in accessory mode without first attaching as the manufacturer's mode (happens when accessory is reset but not detached from bus).
    • Stack files affected: usb_host_android_protocol_v1.c, usb_host_android.c, usb_host_android.h
  4. Fixed issue where non-supported Android protocol versions would try to enumerate.
    • Stack files affected: usb_host_android.c
  5. PIC18F Starter Kit MSD SD card reader demo not working correctly.
    • Stack files affected:... more 
  1. Fixes issues in the cross-platform HID boot loader that caused certain hex files not to work if the various sections in the hex file were not order in increasing address in the .hex file.
    • Stack files affected: none
  2. Added UART output support for PIC24FJ256DA210 Development Board in Host – Printer Full sheet demo.
    • Stack files affected: none
 
v2.9 
  1. Adds PHDC peripheral support.
  2. Adds Android accessory support for host mode accessories.
  3. Added MPLAB X project files for most demo projects.
  4. Added code to allow subclass 0x05 (SFF-8070i devices) to enumerate to the MSD host. Support limited to devices that use SCSI command set only.
    • Stack files affected: usb_host_msd.c
  5. Added additional logic to MSD SCSI host code to improve support for various MSD devices by trying to reset various error conditions that may occur.
    • Stack files affected: usb_host_msd_scsi.c
  6. Fixed issue with CDC host where SET_CONTROL_LINE_STATE command response was formatted incorrectly.
    • Stack files affected: usb_host_cdc.c
  7. Added support for both input and... more 
v2.8 
  1. Fixed issue with SetFeature(ENDPOINT_HALT) handling in the device stack. Error could cause one packet of data to get lost per endpoint after clearing a ENDPOINT_HALT event on an endpoint. Issue could also cause the user to lose control of endpoints that may not have been enabled before the SetFeature(ENDPOINT_HALT) was received. Parts of the issue described in the following forum thread: http://www.microchip.com/forums/tm.aspx?m=503200.
    • Stack files affected: usb_device.c
  2. Fixed stability issue in device stack when interrupts enabled related to the improper enabling of the interrupt control bits in an interrupt context.
    • Stack files affected: usb_device.c
  3. Fixed issue STALLs were not handled correctly... more 
  1. Fixed USBSetBDTAddress() macro, so that it correctly loads the entire U1BDTPx register set, enabling the BDT to be anywhere in RAM. Previous implementation wouldn't work on a large RAM device if the linker decided to place the BDT[] array at an address > 64kB.
    • Stack files affected: usb_hal_pic32.h
  2. Fixed initialization issue where HID parse result information wasn't cleared before loading with new parse result data.
    • Stack files affected: usb_host_hid_parser.c
  3. Update to support the PIC18F47J53 A1 and later revision devices.
    • Stack files affected: usb_device.c
  4. Fixed an error on 16-bit and 32-bit processors where a word access could be performed on a... more 
v2.7 
  1. Fixed error where USBHandleGetAddr() didn't convert the return address from a physical address to a virtual address for PIC32.
  2. Added macro versions of USBDeviceAttach() and USBDeviceDetach() so they will compile without error when using polling mode.
  3. Fixes issue in dual role example where a device in polling mode can still have interrupts enabled from the host mode causing an incorrect vectoring to the host interrupt controller while in device mode.
    • Stack files affected: usb_hal_pic18.h, usb_hal_pic24.h, usb_hal-pic32.h, usb_device.c
  4. Modified the SetConfigurationOptions() function for PIC32 to explicitly reconfigure the pull-up/pull-down settings... more 
MLA - USB Library Help Version : 2.16
http://www.microchip.com/mla