Skip to content

Initial draft of the HAL USBPhy API #438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 13, 2018

Conversation

c1728p9
Copy link
Contributor

@c1728p9 c1728p9 commented Mar 6, 2018

Fill in the USB contributing page for the HAL USBPhy API.

Fill in the USB contributing page for the HAL USBPhy API.
Complete initial copy edit, mostly for active voice and formatting.
Copy link
Contributor

@AnotherButler AnotherButler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left some queries related to passive voice for you to address.

- You can use all endpoints in any valid endpoint configuration concurrently.
- The device supports use of at least one control, bulk, interrupt and isochronous in each direction at the same time - at least 8 endpoints.
- The device supports all standard endpoint sizes (wMaxPacketSize).
- The device can handle an interrupt latency of at least 100ms if reset is not being performed and address is not being set.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query: Who or what is not performing the reset? Also, who or what is not sending the address? You, the user?

- The device supports use of at least one control, bulk, interrupt and isochronous in each direction at the same time - at least 8 endpoints.
- The device supports all standard endpoint sizes (wMaxPacketSize).
- The device can handle an interrupt latency of at least 100ms if reset is not being performed and address is not being set.
- USBPhyEvents events are only sent when USBPhy is in the initialized state.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query: Who or what sends USBPhyEvents?

- The device supports all standard endpoint sizes (wMaxPacketSize).
- The device can handle an interrupt latency of at least 100ms if reset is not being performed and address is not being set.
- USBPhyEvents events are only sent when USBPhy is in the initialized state.
- When unpowered, only the `USBPhyEvents::power` event can be sent.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query: Who or what sends the USBPhyEvents::power event?

- The device can handle an interrupt latency of at least 100ms if reset is not being performed and address is not being set.
- USBPhyEvents events are only sent when USBPhy is in the initialized state.
- When unpowered, only the `USBPhyEvents::power` event can be sent.
- On USB reset, all endpoints are removed except for endpoint 0.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query: Who or what removes all endpoints? Does the USB reset do this, or is that correlation?

- When unpowered, only the `USBPhyEvents::power` event can be sent.
- On USB reset, all endpoints are removed except for endpoint 0.
- `USBPhyEvents::out` and `USBPhyEvents::in` events only occur for endpoints that you have added.
- A call to `USBPhy::ep0_write` results in `USBPhyEvents::in` being called if not interrupted by a power loss or reset.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query: Who or what calls USBPhyEvents::in?

- On USB reset, all endpoints are removed except for endpoint 0.
- `USBPhyEvents::out` and `USBPhyEvents::in` events only occur for endpoints that you have added.
- A call to `USBPhy::ep0_write` results in `USBPhyEvents::in` being called if not interrupted by a power loss or reset.
- A call to `endpoint_read` followed by `endpoint_read_result` results in `USBPhyEvents::out` being called if not interrupted by a power loss or reset.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query: Who or what calls USBPhyEvents::out?

- `USBPhyEvents::out` and `USBPhyEvents::in` events only occur for endpoints that you have added.
- A call to `USBPhy::ep0_write` results in `USBPhyEvents::in` being called if not interrupted by a power loss or reset.
- A call to `endpoint_read` followed by `endpoint_read_result` results in `USBPhyEvents::out` being called if not interrupted by a power loss or reset.
- Endpoint 0 naks all transactions aside from setup packets until one of `ep0_read`, `ep0_write` or `ep0_stall` has been called.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query: Who or what calls ep0_read, ep0_write or ep0_stall?


##### Notes

[Include any potential trouble areas in bullet format here.]
- Make sure USB packets are processed in the correct order when multiple packets are present. IN endpoints should be handled before OUT endpoints if both are pending.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query: Who or what processes the USB packets?


##### Notes

[Include any potential trouble areas in bullet format here.]
- Make sure USB packets are processed in the correct order when multiple packets are present. IN endpoints should be handled before OUT endpoints if both are pending.
- Setup packets may be resent if there is noise on the USB line. The USBPhy should be able to handle this scenario and respond to the setup packet with an ACK.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query: Who or what resends setup packets?

Amanda Butler added 2 commits March 13, 2018 15:37
Change passive to active voice.
Add embedded Doxygen class reference, and add warning for feature-branch docs.
@AnotherButler AnotherButler merged commit 0518589 into ARMmbed:new_engine Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants