-
Notifications
You must be signed in to change notification settings - Fork 3k
Add Kinetis USB Phy #6337
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
Add Kinetis USB Phy #6337
Conversation
c1728p9
commented
Mar 12, 2018
- Add Kinetis USBPhy
- Add extra checks to USBDevice
- Fix read_start behavior when configuring
Please review @maciejbocianski and @fkjagodzinski |
262cddc
to
a9f94dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM!..would be nice to know how to unit test these..!
NVIC_EnableIRQ(USB0_IRQn); | ||
} | ||
|
||
void USBPhyHw::deinit() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we add disconnecting code here (similar to LPC176X implementation)?
without it, re-initialization is failing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. It has been added.
Copy the Kinetis USB driver files from mbed-os\features\unsupported\USBDevice\targets\TARGET_Freescale and update them to match the new USBPhy API.
Assert that when a callback is completed it is the active callback.
Remove the USBDevice function read_start and automatically start all reads internally in USBDevice. This patch also renames the function read_finish to read.
a9f94dc
to
0c90346
Compare
@ashok-rao the USB device HAL specification explains how to run the tests:
|
Addressed @maciejbocianski's comment and also simplified the USBDevice read API (user API not HAL API). The older API allowed reads to be explicitly started, which some hardware doesn't support (Like the LPC1768). With the new API the receiver is automatically started when the endpoint is added. Old endpoint state machine diagram: New endpoint state machine diagram: The USB technology docs PR has also been updated to reflect this. |
/morph build |
Build : FAILUREBuild number : 1449 |
Remove read_start and replace read_finish with read to match the new USBDevice API.
0c90346
to
1ee2866
Compare
Will relaunch when able to. ARM license CI issue. |
/morph build |
Build : SUCCESSBuild number : 1459 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 1100 |
Test : FAILUREBuild number : 1226 |
Initialize the _transfer structure so the behavior is the same regardless of prior memory contents. This fixes a hang during USB testing when CI flags are used.
Call USBDevice::endpoint_stall/unstall in the request to set/clear halt so the endpoint state is properly updated in the array _endpoint_info.
CI issue: NRF52 flash cache test Rebuilding due to new PR commits. |
Build : SUCCESSBuild number : 1462 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 1107 |
Test : FAILUREBuild number : 1235 |
CI issue: NRF52 flash cache test Restarting. |
Test : SUCCESSBuild number : 1237 |