The clocks for STM32F401 I2S PLL are not starting up. I had a look at the RCC_PLLI2SCFGR register and - interestingly - the values for PLLI2SN and PLLI2SR were not set as in my mcuconf.h.
After further investigation, I found that the I2S PLL is not enabled in the stm32_registry.h for the STM32F401! Why is that?
I propose this fix, which makes my board finally play sound in TX MASTER mode.
See this git diff
Code: Select all
diff --git a/os/hal/ports/STM32/STM32F4xx/stm32_registry.h b/os/hal/ports/STM32/STM32F4xx/stm32_registry.h
index 56ca20a33..5dde2681d 100644
--- a/os/hal/ports/STM32/STM32F4xx/stm32_registry.h
+++ b/os/hal/ports/STM32/STM32F4xx/stm32_registry.h
@@ -2894,10 +2894,10 @@
/* Clock tree attributes.*/
#define STM32_HAS_RCC_PLLSAI FALSE
-#define STM32_HAS_RCC_PLLI2S FALSE
+#define STM32_HAS_RCC_PLLI2S TRUE
#define STM32_HAS_RCC_DCKCFGR TRUE
#define STM32_HAS_RCC_DCKCFGR2 FALSE
-#define STM32_HAS_RCC_I2SSRC FALSE
+#define STM32_HAS_RCC_I2SSRC TRUE
#define STM32_HAS_RCC_I2SPLLSRC FALSE
#define STM32_HAS_RCC_CK48MSEL FALSE
#define STM32_RCC_CK48MSEL_USES_I2S FALSE
Additionally, the mcuconf.h should include a setting for the I2S PLL source, e.g.
Code: Select all
#define STM32_I2SSRC STM32_I2SSRC_PLLI2S