2022-01-03 06:44 AM
I am posting this more as an open question, and perhaps to help someone else...
When configuring SAI2 for Audio in CubeMX I had some issues which stemmed from MCLK not appearing to work correctly for the Audio Codec. This would cause the wm8994 to become unresponsive after setting WM8994_AIF1_CLOCKING1 to expect AIF1 Clock Source = MCLK1 pin.
After some investigation I realised that the call to __HAL_SAI_ENABLE(&hsai...) was not being auto-generated from the config.
Adding it in the User Code section resolved the issue for me.
So my questions are..
All other settings for SAI2; GPIO, DMA etc all seem to be generatred correctly from the config, just not this last part to enable MCLK.
2022-01-03 11:20 AM
This is normal for all peripherals generator setup it , but not start.
2022-01-04 09:20 AM
Thanks for the clarification. I guess I didn't consider SAI to be a "periperal" in that sense as it's part of the SoC.