You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds handling for two SAI blocks with no master (e.g. daisy following another daisy, etc.).
The immediate use case for this is to be able to set up a second Daisy as a DSP for a primary Daisy, where the secondary Daisy would be configured with both channels set to Sync::SLAVE.
Now, the SAI peripheral driver will detect that, and still set the SaiInitTypeDef::Synchro for the B slot to SAI_ASYNCHRONOUS so that they can share a callback in the typical fashion.
This has been working fine for me during an hour or so of testing with One daisy generating audio, sending it to the second to echo back to the first, and output on its SAI1 outputs.
However, I have noticed a few times where it seems like one of the streams is getting a bit off, before correcting itself.
I have a feeling this may be an issue with the SAI1 and SAI2 synchronization, which has come up a few times in the past, but has never been consistently reproducible.
I'll spend a little time looking at whether I can recreate that behavior, and possibly improve cross-SAI sync at the same time, but that may be something we take care of later if it isn't consistent.
I'll add a pair of examples, or share a new repo with programs for each side before merging this so others can use that as a jumping off point for multi-daisy projects 😄
I'll spend a little time looking at whether I can recreate that behavior, and possibly improve cross-SAI sync at the same time, but that may be something we take care of later if it isn't consistent.
I tested a bit more, and haven't seen this happen again yet.
However, I did look a little bit, and there are both ways at syncing the SAIs to one another, and the pin for "I2S_CKIN" is pin D3 on the seed.
So reconfiguring the clock to use MCLK from another daisy is also possible, though would require some tweaking of how we deal with the clock tree (SAI1 and SAI2 can even have their own clock inputs if that's ever useful).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds handling for two SAI blocks with no master (e.g. daisy following another daisy, etc.).
The immediate use case for this is to be able to set up a second Daisy as a DSP for a primary Daisy, where the secondary Daisy would be configured with both channels set to
Sync::SLAVE.Now, the SAI peripheral driver will detect that, and still set the
SaiInitTypeDef::Synchrofor the B slot toSAI_ASYNCHRONOUSso that they can share a callback in the typical fashion.This has been working fine for me during an hour or so of testing with One daisy generating audio, sending it to the second to echo back to the first, and output on its SAI1 outputs.
However, I have noticed a few times where it seems like one of the streams is getting a bit off, before correcting itself.
I have a feeling this may be an issue with the SAI1 and SAI2 synchronization, which has come up a few times in the past, but has never been consistently reproducible.
I'll spend a little time looking at whether I can recreate that behavior, and possibly improve cross-SAI sync at the same time, but that may be something we take care of later if it isn't consistent.
I'll add a pair of examples, or share a new repo with programs for each side before merging this so others can use that as a jumping off point for multi-daisy projects 😄