Skip to content
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

Cuatro DFSDM1 mic demodulation #2077

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Cuatro DFSDM1 mic demodulation #2077

wants to merge 4 commits into from

Conversation

robbederks
Copy link
Contributor

@robbederks robbederks commented Nov 13, 2024

need to enable SEC_I2S for sound input: /usr/comma/sound/tinymix set "MultiMedia1 Mixer SEC_MI2S_TX" 1

@robbederks robbederks changed the title Cuatro DMSDM1 mic demodulation Cuatro DFSDM1 mic demodulation Nov 14, 2024
register_set(&SAI4_Block_A->SLOTR, (0b11 << SAI_xSLOTR_SLOTEN_Pos) | (1U << SAI_xSLOTR_NBSLOT_Pos) | (0b01 << SAI_xSLOTR_SLOTSZ_Pos), 0xFFFF0FDFU); // NBSLOT definition is vague

// init DFSDM for PDM mic
DFSDM1_Channel0->CHCFGR1 = (76U << DFSDM_CHCFGR1_CKOUTDIV_Pos) | DFSDM_CHCFGR1_CHEN; // CH0 controls the clock
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: use register methods here

@robbederks
Copy link
Contributor Author

we should probably also turn off the mic if the SAI isn't being clocked

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.

1 participant