Skip to content

nrf5x iso support#518

Merged
hathach merged 4 commits into
hathach:masterfrom
kasjer:kasjer/nrf5x-iso-support
Oct 2, 2020
Merged

nrf5x iso support#518
hathach merged 4 commits into
hathach:masterfrom
kasjer:kasjer/nrf5x-iso-support

Conversation

@kasjer
Copy link
Copy Markdown
Collaborator

@kasjer kasjer commented Sep 21, 2020

Describe the PR
ISO endpoints were not covered in nrf5x driver.
Code deals with ISO IN and OUT endpoints.
Intermediate steps needed for ISO to work on NRF:

  • increasing number for device endpoints (it was 8).
  • increasing max endpoint size variable size
  • closing endpoints

Additional context
Code should not affect current non-ISO control flow.
It was tested with audio driver that @PanRe is going hopefully to submit soon :)

@PanRe
Copy link
Copy Markdown
Collaborator

PanRe commented Sep 21, 2020 via email

@hathach
Copy link
Copy Markdown
Owner

hathach commented Sep 24, 2020

hihi, sorry for late response, I am scratching my head with other things just now. Will check out this ASAP 😅

Copy link
Copy Markdown
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

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

Thank you very much for this great PR, and sorry for being late with review (was busy with other works for last week 😪). This look great, I only have a few minor comment,

  • the only issue is the if logic in the dcd_edpt_stall
  • There is lots of number 8 used for ISO endpoint, maybe we should have an enum EPNUM_ISO = 8 or any name like that just to make it easier to tell the diff when we refer to EP ISO or the count of CBI.

Comment thread src/portable/nordic/nrf5x/dcd_nrf5x.c
Comment thread src/portable/nordic/nrf5x/dcd_nrf5x.c Outdated
Comment thread src/portable/nordic/nrf5x/dcd_nrf5x.c Outdated
Comment thread src/device/usbd.c Outdated
Comment thread src/portable/nordic/nrf5x/dcd_nrf5x.c Outdated
kasjer added 4 commits October 1, 2020 09:22
Currently number of endpoints was hard coded to 8.
NRF52 has 9 IN and 9 OUT endpoints.
ISO endpoints are 0x08 and 0x88 and without this change those
two ISO endpoint could not be used.
Closing endpoints can be important when there are alternate
instances. This adds functionality of closing endpoints
similar to what exists in other drivers.
msp stores max packet size.
For ISO endpoints 8 bits is not enough so it's changed to 16 bits.
ISO endpoints were not covered so far by the driver code.
This adds support for ISO IN and OUT endpoint handling.
Registers for ISO IN(OUT) endpoints are placed just after normal IN(OUT)
so in some cases common code could be used for handling all type of
transfers.
Generally code synchronizes ISO endpoint handling to SOF interrupt.
This code does not change the way of how non-ISO endpoints are treated.

Code uses strategy outlined in nRF52840 Produce Specification v1.0
sections 6.35.11.1 and 6.35.11.2.
@kasjer kasjer force-pushed the kasjer/nrf5x-iso-support branch from 3a245f5 to 96da1ca Compare October 1, 2020 07:23
Copy link
Copy Markdown
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

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

Superb !! Thank you very much for this great PR, sorry for being slow on reviewing, I am catching up now. PR look great, I haven't tested it yet, But I will definitely test it out with the UAC2 #521 later on.

@hathach hathach merged commit 9c4acea into hathach:master Oct 2, 2020
@kasjer kasjer deleted the kasjer/nrf5x-iso-support branch October 2, 2020 14:19
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.

3 participants