Skip to content

Commit

Permalink
Documentation: update USB component documentation (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
MiloradCvjetkovic authored Oct 8, 2024
1 parent ff5eb07 commit 7a9fa52
Show file tree
Hide file tree
Showing 13 changed files with 118 additions and 113 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Documentation/Doxygen/USB/src/ref_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Directory | Description

<b>Header Files</b>

The API interface of the USB Component is provided in the header file %rl_usb.h.
The API interface of the USB Component is provided in the header file **%rl_usb.h**.
The table below provides a complete overview of all public header files.

Header File | Used by | Description
Expand Down
28 changes: 15 additions & 13 deletions Documentation/Doxygen/USB/src/resource_requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ on the interrupt nesting and therefore on the priority settings of these ISR.
| :---------------------------------------------------------------- | :----------------------
| Stack Size (in Bytes) | + 512 for USB Device Driver

\note
The stack size requirements depend on the maximum nesting of exception and ISR execution and therefore on the priority settings
of the various interrupt and exception sources.
Stack size for the ISRs is typically configured in the application `linker script` or device's `startup_device.s` file.
The stack size for the ISRs configures only the stack space that is used by exception and interrupt service routines
of the drivers. The stack size requirements depend on the maximum nesting of exception and ISR execution and therefore
on the priority settings of the various interrupt and exception sources.

User code that calls API functions of the USB Device Component should have a minimum of 512 Bytes of stack space available.
Since API functions are frequently called from threads, the thread stack size should be at least 512 Bytes (see below).
Stack size for threads is configured in the CMSIS-RTOS2 configuration file.
The stack size of the thread that calls USB Device API functions should be at least 512 bytes large.

### CMSIS-RTOS2 Requirements {#usbd_rtos_req}

Expand Down Expand Up @@ -64,7 +65,7 @@ n is the instance number, m is the endpoint number 1...15

The following table shows the memory requirements for read-only (Flash) and read-write (RAM) memory.
These numbers may be used to estimate the total size requirements of the application, but the actual numbers depend
on compiler optimizations and target processor and may be therefore slightly different.
on compiler optimizations and target processor and may therefore slightly differ.

| Component | RO Memory [Bytes] | RW Memory (Data) [Bytes] |
| :-------------------------- | :---------------: | :--------------------------------------------------------------------------------------------------------|
Expand All @@ -83,20 +84,21 @@ components used in the application and the configuration of these components.

### Stack Requirements {#usbh_stack_req}

The USB Host Core receives events sent from the interrupt service routine (ISR) of the USB Host Driver.
The USB Host Core receives events sent from the interrupt service routine (ISR) of the **USB Host Driver**.
The stack requirements for the ISR are typically less than 512 Bytes. The total stack space required for ISR depends
on the interrupt nesting and therefore on the priority settings of these ISR.

| Option (under section Stack Configuration) | Increase Value by
| :---------------------------------------------------------------- | :----------------------
| Stack Size (in Bytes) | + 512 for USB Host Driver

\note
The stack size requirements depend on the maximum nesting of exception and ISR execution and therefore on the priority settings
of the various interrupt and exception sources.
Stack size for the ISRs is typically configured in the application `linker script` or device's `startup_device.s` file.
The stack size for the ISRs configures only the stack space that is used by exception and interrupt service routines
of the drivers. The stack size requirements depend on the maximum nesting of exception and ISR execution and therefore
on the priority settings of the various interrupt and exception sources.

User code that calls API functions of the USB Host Component should have a minimum of 512 Bytes of stack space available.
Since API functions are frequently called from threads, the thread stack size should be at least 512 Bytes.
Stack size for threads is configured in the CMSIS-RTOS2 configuration file.
The stack size of the thread that calls USB Host API functions should be at least 512 bytes large.

### CMSIS-RTOS2 Requirements {#usbh_rtos_req}

Expand Down Expand Up @@ -135,7 +137,7 @@ n is the instance number

The following table shows the memory requirements for read-only (Flash) and read-write (RAM) memory.
These numbers may be used to estimate the total size requirements of the application, but the actual numbers depend
on compiler optimizations and target processor and may be therefore slightly different.
on compiler optimizations and target processor and may therefore slightly differ.

| Component | RO Memory [Bytes] | RW Memory (Data) [Bytes]
| :---------------------------| :---------------: | :-----------------------:
Expand Down
4 changes: 2 additions & 2 deletions Documentation/Doxygen/USB/src/rl_usb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ be used before any class specific functions are called:
- Initialize the USB Device Controller, Hardware Driver and a specific USB Device using \ref USBD_Initialize.
- Connect a specific USB Device to the USB Bus by calling \ref USBD_Connect.

These two functions are accompanied \ref USBD_Disconnect and \ref USBD_Uninitialize. Use them to properly disconnect and
uninitialize the device from the USB bus.
These two functions are accompanied by the \ref USBD_Disconnect and \ref USBD_Uninitialize functions.
Use them to properly disconnect and uninitialize the device from the USB bus.

Static and Run-Time Configuration
---------------------------------
Expand Down
1 change: 0 additions & 1 deletion Documentation/Doxygen/USB/src/usb_classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ The documents available at
[Communications Device Class](https://www.usb.org/documents?search=&category%5B%5D=49&type%5B%5D=55&items_per_page=50)
describe the nine available request types for the Abstract Control Model (ACM). All requests specified for the Network
Control Model (NCM) by the documents in ECM120.pdf and NCM10.pdf are supported.
are not supported.

### USB Descriptors {#CDC_Descriptors}

Expand Down
6 changes: 3 additions & 3 deletions Documentation/Doxygen/USB/src/usb_concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Examples of functions:
- An imaging device such as a scanner, printer, or camera.
- A mass storage device such as a CD-ROM drive, floppy drive, or DVD drive.

The **logical USB network** appears as a star network to the developer with the host at the centre. Hubs do not introduce
The **logical USB network** appears as a star network to the developer with the host at the center. Hubs do not introduce
any programming complexity and are transparent as far as the programmer is concerned. An USB device will work the same way
whether connected directly to a root-hub or whether connected via intermediate hubs. All USB devices are available as
addressable nodes in this master/slave network. Only the host can initiate a data transfer in the network.
Expand Down Expand Up @@ -277,7 +277,7 @@ voice-over-IP phone might have:

Provisions have been made in the USB component to give the user the option to
\ref Overriding_Descriptors "override the USB descriptors" if necessary. This can be the case when the device class needs
to be changed at runtime or other reports need to be created.
to be changed at run-time or other reports need to be created.

### Device Descriptor {#USB_Device_Descriptor}

Expand Down Expand Up @@ -522,7 +522,7 @@ configuration that best matches the requirements of the application software.
- D4...0: Reserved (reset to zero)
A device configuration that uses power from the bus and a local source reports a non-zero value in *bMaxPower* to indicate the
amount of bus power required and sets D6. The actual power source at runtime can be determined using the GetStatus(DEVICE)
amount of bus power required and sets D6. The actual power source at run-time can be determined using the GetStatus(DEVICE)
request. If a device configuration supports remote wakeup, D5 is set to 1.</td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Doxygen/USB/src/usb_host.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This chapter describes the software structure of the USB Host Component and explains its use for creating an USB Host application.

The USB Host Component simplifies software development of microcontroller systems that allow to connect USB Devices.
The USB Host Component simplifies software development of microcontroller systems that can communicate with USB Devices.

**Attributes of the USB Host Component:**

Expand Down
7 changes: 4 additions & 3 deletions Documentation/Doxygen/USB/src/usb_migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

- **USB Host specific**:
- **changed source configuration files to headers** (`USBH_Config_0..3.c` -> `USBH_Config_0..3.h`).
- **removed OHCI and EHCI drivers (moved to CMSIS-Driver pack)**.
- **removed OHCI and EHCI drivers** (moved to [CMSIS-Driver](https://github.com/ARM-software/CMSIS-Driver) pack).

The following sections show how to migrate projects from previous version of the MDK-Middleware (v7):

Expand Down Expand Up @@ -102,8 +102,9 @@ can be seen on the right-hand side.
was selected in the old **USBH_Config_0..3.c** file and copy appropriate controller's previous settings
to the new configuration file.
- for **Memory Pool Size** update the new value by **adding 128** since old setting did not include
additional necessary space for memory pool internal operation.
additional space necessary for memory pool internal operation.
![Old USBD_Config_0..3.c to new USBD_Config_0..3.h](usbh_config_migrate.png)

\note **OHCI** and **EHCI** drivers are not a part of the **MDK-Middleware** anymore but are distributed separately
via the **CMSIS-Driver** pack, so please consult CMSIS-Driver documentation on how to configure and use those drivers.
via the [CMSIS-Driver](https://github.com/ARM-software/CMSIS-Driver) pack, so please consult CMSIS-Driver documentation
on how to configure and use those drivers.
Loading

0 comments on commit 7a9fa52

Please sign in to comment.