BeagleBoard/GSoC/2022 Proposal/PRU-based USB stack
Contents
Proposal Template
About
Student: Seak Jian De
Mentors: Jason Kridner, giuliomoro
Code: [N/A]
Wiki: https://elinux.org/index.php?title=BeagleBoard/GSoC/2022_Proposal/PRU-based_USB_stack
GSoC: PRU-based USB stack
Status
This project is currently just a proposal.
Proposal
Completed all the requirements listed on the ideas page. the code for the cross-compilation task can be found here submitted through the pull request #158.
About you
IRC: Jian De
Github: https://github.com/Fred-JD
School: Universiti Teknologi Malaysia
Course: 3rd Year Electronics Engineering
Country: Malaysia
Language: English, Mandarin, Malay
Typical work hours: 4PM - 11PM UTC +8
Previous GSoC participation: First year apply gsoc.
About your project
Project Name
PRU-based USB stack
Description
Why develop PRU-Based USB stack?
As we know, Linux wasn’t designed as a real-time operating system that can guarantee a rate of data transfer with a peripheral. With multi-tasking, multiple programs run at the same time, and the OS grants a portion of the valuable time to each thread. Different threads can have different priorities. RPU is a solution of this which BeagleBoard device can be beneficial of minimize the latency for USB peripherals.
Feature
- Implement USB Host Controller for PRU
- Implement USB Host Core for PRU
- Support USB class driver for (MIDI, HID, AUDIO)
- Providing detailed Documentation for USB Host API
Introduction
USB Concept
Transfer Types[1]
- Control Transfers
- Bulk Transfers
- Interrupt Transfers
- Isochronous Transfers
USB Protocol[2]
Descriptors
- Each device contains Descriptors which contain information about the device.
- Each device contains Descriptors which contain information about the device.
Interfaces
- USB devices publish their endpoints as part of an Interface.
- USB devices publish their endpoints as part of an Interface.
Endpoints
- USB pipes are opened to Endpoints. Devices publish Endpoint descriptors to enable clients to query what endpoint are available and what characteristics they have. Endpoint descriptors contain information about the I/O direction (IN which is from the device to the host or OUT which is from the host to the device), the transfer type (Control, Bulk, Interrupt, or Isochronous) and the maximum supported packet size.
- USB pipes are opened to Endpoints. Devices publish Endpoint descriptors to enable clients to query what endpoint are available and what characteristics they have. Endpoint descriptors contain information about the I/O direction (IN which is from the device to the host or OUT which is from the host to the device), the transfer type (Control, Bulk, Interrupt, or Isochronous) and the maximum supported packet size.
Pipes
- Communication between the host and a USB device is performed through Pipes.
- Communication between the host and a USB device is performed through Pipes.
Method of Implementation
USB Host Controller
Enumeration
The host enumerate the device by issuing control transfers containing standard USB requests to the device. All USB devices must support control transfers, standard requests, and endpoint zero.
Descriptors
USB descriptors are the data structures that enable the host to learn about a device. Each descriptor contains information about the device as a whole or an element of the device.
Types of descriptor:-
- Device Descriptors
- Configuration Descriptors
- Interface Descriptors
- Endpoint Descriptors
- String Descriptors
USB Host Core
Elements of a Control Transfer
- Setup Stage
- Data Stage
- Status Stage
- Error Handling
Standard Requests
- Get Status
- Clear Feature
- Set Feature
- Set Address
- Get Descriptor
- Set Descriptor
- Get Configuration
- Set Configuration
- Get Interface
- Set Interface
- Synch Frame
- Set SEL
- Set Isochronous Delay
USB Host Device Class
Timeline
Provide a development timeline with a milestone each of the 11 weeks and any pre-work. (A realistic timeline is critical to our selection process.)
Date | Status | Details | |
---|---|---|---|
Presubmission |
|
||
May 20th - June 12th | Community Bonding |
| |
June 13th | Milestone #1 |
| |
June 20th | Milestone #2 |
| |
June 27th | Milestone #3 |
| |
July 4th | Milestone #4 |
| |
July 11th | Milestone #5 |
| |
July 18th | Milestone #6 |
| |
July 25th | Milestone #7 |
| |
August 1st | Milestone #8 |
| |
August 8th | Milestone #9 |
| |
August 15th | Milestone #10 |
| |
August 22nd | Milestone #11 |
If the USB core API function well will move on working with MIDI class function. | |
August 29th | Milestone #12 |
| |
Sep. 5th | Milestone #13 |
|
Experience and approach
In 5-15 sentences, convince us you will be able to successfully complete your project in the timeline you have described.
- In my first year of University I have passed the 3 month junior training program by ROBOCON UTM which include basic programming, basic electronics and basic Mechanisms.
- * I have built a line following robot with dsPIC30f4011 microcontroller. Solder and design my own hardware with the PIC microcontroller. Understand about GPIO, PWM, UART, ADC/DAC. I have experience in C programming and know how circuit connection with breadboard. photo.
- * I have build a custom PCB to control robotic pneumatic valve with Altium designer. photo
- I have build a flutter mobile app which read and display sensor value from Bluetooth module with Maker Uno (similar with Arduino Uno). Then store the value on AWS with MQTT protocol.\
- I have build Footfall Counter with openCV github
- In order to successfully to complete the projects, I will start it early which start to work with the technology before official code period so I have extra time for debug and testing.
Contingency
What will you do if you get stuck on your project and your mentor isn’t around?
Benefit
Misc
Completed all the requirements listed on the ideas page. the code for the cross-compilation task can be found here submitted through the pull request #158.
Suggestions
Is there anything else we should have asked you?