Hello!
I'm trying to build a small audio device using a Nano Pi M1 Plus (raspberry-pi-like SBC), sending 16-bit 2-channel I2S at 44100Hz to a STA350B dev board.
Board: X-NUCLEO-CCA01M1 - Sound terminal expansion board based on STA350BW for STM32 Nucleo - STMicroelectronics
STA350B datasheet: https://www.st.com/resource/en/datasheet/sta350b.pdf
NanoPi: NanoPi M1 Plus - FriendlyARM WiKi
I'm able to bit-bang the I2C interface and get/set registers. They seem to return values that match the power-on values, so I'm reasonably confident the I2C is working.
The next issue I have is that the board has a MCLK input - which it seems(?) to require - it can handle a number of multiples of the sample frequency. Googling around it seems that 256*f is the most common - ie. 11.2896MHz.
I don't think I can generate a suitable 11.2896MHz signal from the NanoPi. If I'm able to find a 11.2896MHz 3.3V oscillator and use that - is this going to cause problems if the BCLK/LRCLK signals aren't exactly] the right frequency?
Cheers,
Ben
I'm trying to build a small audio device using a Nano Pi M1 Plus (raspberry-pi-like SBC), sending 16-bit 2-channel I2S at 44100Hz to a STA350B dev board.
Board: X-NUCLEO-CCA01M1 - Sound terminal expansion board based on STA350BW for STM32 Nucleo - STMicroelectronics
STA350B datasheet: https://www.st.com/resource/en/datasheet/sta350b.pdf
NanoPi: NanoPi M1 Plus - FriendlyARM WiKi
I'm able to bit-bang the I2C interface and get/set registers. They seem to return values that match the power-on values, so I'm reasonably confident the I2C is working.
The next issue I have is that the board has a MCLK input - which it seems(?) to require - it can handle a number of multiples of the sample frequency. Googling around it seems that 256*f is the most common - ie. 11.2896MHz.
I don't think I can generate a suitable 11.2896MHz signal from the NanoPi. If I'm able to find a 11.2896MHz 3.3V oscillator and use that - is this going to cause problems if the BCLK/LRCLK signals aren't exactly] the right frequency?
Cheers,
Ben
"f I'm able to find a 11.2896MHz 3.3V oscillator and use that - is this going to cause problems if the BCLK/LRCLK signals aren't exactly] the right frequency?"
It likely would cause problems. Some dacs have a built-in ASRC that can resample the I2S to be consistent with the MCLK frequency. Don't know about the one you have.
It likely would cause problems. Some dacs have a built-in ASRC that can resample the I2S to be consistent with the MCLK frequency. Don't know about the one you have.
I figured as much, thanks.
I did manage to get this working by making the NanoPi an I2S slave, and then generating Master, Frame and Bit clocks from a separate microcontroller, and using those to drive both the NanoPi and the STA350.
Spent a long time trying to debug a lack of sound until I realized there's a vital "turn on the external amplifier" bit in one of the I2C config registers that I'd missed.
Cheers,
Ben
I did manage to get this working by making the NanoPi an I2S slave, and then generating Master, Frame and Bit clocks from a separate microcontroller, and using those to drive both the NanoPi and the STA350.
Spent a long time trying to debug a lack of sound until I realized there's a vital "turn on the external amplifier" bit in one of the I2C config registers that I'd missed.
Cheers,
Ben
Hello Strags,
I work on a audio project with a nanopi very similar to yours (neo core H3).
Like you, I need to configure the i2s in slave mode.
Could you explain me how to configure the i2s0 in slave mode (or send me some URLs that explain how to do such configuration)
Thank you very much
Pierre
I work on a audio project with a nanopi very similar to yours (neo core H3).
Like you, I need to configure the i2s in slave mode.
Could you explain me how to configure the i2s0 in slave mode (or send me some URLs that explain how to do such configuration)
Thank you very much
Pierre