2023-08-02 08:12 AM
Greetings,
I'm using a low power microphone and would like to turn it off when not in use. That is done by turning off the clock to microphone, which is generated in ADF as output clock. Stopping sample acquisition (either by TRGO using window mode acquisition mode or by calling HAL_MDF_AcqStop()) does not stop the output clock. The only way I found to stop it is to call HAL_MDF_DeInit(), but that takes multiple clock cycles. Is there a way to set output clock to only be enabled when sampling? Also, when I DeInit the MDF, the clock pin stays High. Is there a way to leave it low (just pulldown resistor doesn't work)?
Solved! Go to Solution.
2023-08-10 01:52 AM - edited 2023-08-10 02:48 AM
Hello @btd5 ,
Thank you for your question.
The clock generator (CKGEN) block is responsible of the generation of the processing clock, and the clock provided to the MDF_CCK0 and MDF_CCK1 pins.
You can directly copy paste this line into your code.
/* Disable clock generator */
p_mdf_base->CKGCR &= ~(MDF_CKGCR_CKDEN);
Please in order to keep the MDF in a stable state follow this sequence :
Best regards,
Pierre
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-08-10 01:52 AM - edited 2023-08-10 02:48 AM
Hello @btd5 ,
Thank you for your question.
The clock generator (CKGEN) block is responsible of the generation of the processing clock, and the clock provided to the MDF_CCK0 and MDF_CCK1 pins.
You can directly copy paste this line into your code.
/* Disable clock generator */
p_mdf_base->CKGCR &= ~(MDF_CKGCR_CKDEN);
Please in order to keep the MDF in a stable state follow this sequence :
Best regards,
Pierre
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.