I’ve recently begun the work of taking the WM8731 codec driver found in a lot of Mutable projects from depending on STM’s Standard Peripheral Library to the newer Low Level drivers. As soon as I can verify it’s working I’ll throw it up on GitHub in case they could be useful for someone else wanting to work with the HAL/LL and still use the driver.
Full disclosure, this is a learning exercise for me – I’ve done some work in the past with embedded systems but this is my first time diving into ARM or STM technologies.
Just about everything is compiling now, but the last hurdle is in
InitializeAudioInterface(...) and I’m not sure how to proceed. The SPL code uses
RCC_PLLI2SConfig(N, R) but the LL equivalent wants N, R, and M:
LL_RCC_PLLI2S_ConfigDomain_I2S(M, N, R). I’ve had a look through the manuals and tried to work backwards through the calculations, but I’m not sure how this is supposed to work. Can anyone shed some light on this?