Feature/32bit quad i2s: Begin making switchable 16/32 which fixes RevD#92
Open
chipaudette wants to merge 14 commits into
Open
Feature/32bit quad i2s: Begin making switchable 16/32 which fixes RevD#92chipaudette wants to merge 14 commits into
chipaudette wants to merge 14 commits into
Conversation
Member
Author
|
@cab-creare-com , as discussed, I made a base class from which all the I2S classes inherit. This base class holds the static variable transfer32bits. As an aside, I also started to apply the 32-bit modifications the stereo output class (output_i2s_F32.h). I think that I increased the size of the i2s_tx_buffer and I started to make the necessary changes to isr() and update(). I don't think that I finished. I certainly didn't touch the DMA or I2S setup, which are your parts. It does still currently work correctly when in 16-bit mode. I don't believe that I touched any of the other non-Quad I2S classes other than to add the required inheritance. |
…ympan/Tympan_Library into feature/32bit_quad_I2s_unified
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
MOTIVATION: While the long-term plan is to make all of the I2S classes be 32-bits, I don't think that anyone is planning on digging into the I2S and DMA settings for the older Tympan RevD. Because I don't yet want to abandon RevD, we need to continue to support 16-bit transfers for RevD.
CHANGES: For the Quad classes, I've altered the classes so that they know whether they were configured for 32 bit (Rev E/F) or 16 bit (Rev D). Currently, Rev E/F is always configured for 32-bit and RevD is always configured for 16-bit. The isr() and update() methods then work correctly based on the internal flag denoting the data size.
TESTING: I've tested these changes using the attached version of the ChangeSampleRate example. I injected a 1kHz tone produced by my PC and listened via the Tympan's headphone output. I tested on a RevD and on a RevE. I tested using the Quad and Stereo versions of the I2S classes. I tested 44kHz and 96kHz. All of the tests sounded fine to me.
ChangeSampleRate_Quad.zip
NEXT STEPS: I'm just asking for a quick visual review to confirm that my changes don't interfere with your own work. You're welcome to do a deeper review, if you want, but I'm mainly trying to make sure that I didn't do something that messes up your work. If it looks like it won't affect your work, feel free to accept the pull request so that it gets pulled in to the develop branch.