Skip to content

nrf: put supervisor enable/disable tick in place #2890

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 2 commits into from
Jun 1, 2020

Conversation

jepler
Copy link

@jepler jepler commented May 13, 2020

I assume that the "same" fix as samd is needed in order to make audio play properly after reduced power.

Testing performed: only building the software

@jepler jepler requested a review from tannewt May 13, 2020 16:05
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Are there interrupts generated when the DMA buffer swaps? Using that would be better than the tick enable because it'll happen at the needed frequency.

@jepler
Copy link
Author

jepler commented May 13, 2020

@tannewt I can look into it if you have a pointer to where else we're doing this. In samd audio it looks like audio interrupts "are involved" (e.g., we look at event_interrupt_active to decide whether more data needs to be fed) but it still didn't work, which is why #2889 had a similar "fix" for audio weirdness. I guess both could use further looking into rather than speculative fixes.

@jepler
Copy link
Author

jepler commented May 13, 2020

e.g., in nRF I2SOut we can allow EVENTS_TXPTRUPD to generate an interrupt. But there is no explicit handler defined for it. Does this mean it would get a dummy interrupt handler and all would be well?

@tannewt
Copy link
Member

tannewt commented May 13, 2020

@tannewt I can look into it if you have a pointer to where else we're doing this. In samd audio it looks like audio interrupts "are involved" (e.g., we look at event_interrupt_active to decide whether more data needs to be fed) but it still didn't work, which is why #2889 had a similar "fix" for audio weirdness. I guess both could use further looking into rather than speculative fixes.

Ya, I should have thought about it more with the samd fix as well. I'm ok having it in temporarily. It would be good to look into for the longer term though. Relying on tick is a heavy handed way of getting it to work.

e.g., in nRF I2SOut we can allow EVENTS_TXPTRUPD to generate an interrupt. But there is no explicit handler defined for it. Does this mean it would get a dummy interrupt handler and all would be well?

I don't think the interrupt handler itself is actually needed. The main thing is that it wakes up the WFI in sleep and then clears the interrupt in the background task.

@tannewt
Copy link
Member

tannewt commented May 20, 2020

@jepler Do you have time to look into using DMA interrupts instead of ticks?

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Merging for inclusion in the next beta. Will revisit with background rework.

@tannewt tannewt merged commit 4146d6f into adafruit:master Jun 1, 2020
@jepler jepler deleted the nrf-audio-tick branch November 3, 2021 21:10
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