Skip to content

Conversation

maciejbocianski
Copy link
Contributor

@maciejbocianski maciejbocianski commented Mar 20, 2018

Description

USB generic test suite
In development

Pull request type

  • Fix
  • Refactor
  • New target
  • Feature
  • Breaking change
  • Test

@cmonr cmonr requested a review from c1728p9 March 20, 2018 22:46
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the ??? correspond to some sort of status?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's for my private use :)
Will be removed soon

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there suppose to be a request that == 4?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's for my private use :)
Will be removed soon

Copy link
Contributor

Choose a reason for hiding this comment

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

Why does this return in the middle of the function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This function is used only for documentation purpose and will be removed soon

Copy link
Contributor

@c1728p9 c1728p9 left a comment

Choose a reason for hiding this comment

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

A couple minor tweaks but after those updates are made it looks good.

Copy link
Contributor

Choose a reason for hiding this comment

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

With the new reset tests I had to add a retry to get this to work correctly:

    def find_device(self, serial_number):
        for _ in range(20):
            dev = usb.core.find(custom_match=TestMatch(serial_number))
            if dev is not None:
                break
            time.sleep(0.1)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

Choose a reason for hiding this comment

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

If disconnect() + complete() occur too fast the reset event will be dropped. At a minimum there should be a 200us delay between disconnect and connect. To be on the safe side I would recommend a 1ms delay, so the host controller has an entire USB frame to detect the disconnect.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@c1728p9
Copy link
Contributor

c1728p9 commented Mar 21, 2018

With #6403 and the above changes you should be able to get both the LPC1768 and K64F to pass testing.

@maciejbocianski maciejbocianski force-pushed the hal-spec-usb-device_generic2 branch 3 times, most recently from 1869e11 to d31bad6 Compare March 21, 2018 08:37
@0xc0170
Copy link
Contributor

0xc0170 commented Mar 21, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Mar 21, 2018

Build : SUCCESS

Build number : 1519
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6406/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Mar 22, 2018

@cmonr
Copy link
Contributor

cmonr commented Mar 22, 2018

No obvious errors.

Relaunching.
/morph export-build

@mbed-ci
Copy link

mbed-ci commented Mar 22, 2018

@maciejbocianski maciejbocianski force-pushed the hal-spec-usb-device_generic2 branch from d31bad6 to 59c799d Compare March 22, 2018 07:13
@mbed-ci
Copy link

mbed-ci commented Mar 22, 2018

@maciejbocianski maciejbocianski force-pushed the hal-spec-usb-device_generic2 branch from 59c799d to 4880d08 Compare March 22, 2018 15:00
@cmonr
Copy link
Contributor

cmonr commented Mar 22, 2018

@maciejbocianski Should this still be marked as do not merge, as per the description?

@maciejbocianski
Copy link
Contributor Author

Could be merged.
Further development will be proceed in separate PR's

@cmonr cmonr merged commit d16124d into ARMmbed:feature-hal-spec-usb-device Mar 22, 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.

5 participants