This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF52840 USB AUDIO

Hi everyone,

I am currently trying to implement USB headset on nrf52840. As far as I can see the audio example from SDK14 uses SyncType=None meaning that bmAttributes bits for an endpoint sync type set to 0. And in example description it says that audio frames are synchronized to SOF event. So the question is how could the audio be synchronized to I2S mclk frequency? I didn't find any trimming function for MCLK in datasheet. So it looks like the solution would be to use asynchronous mode for audio ep. Is there an example for asynchronous sync type EP? Or is there a way to trim mclk?

Thanks

Parents
  • Hi,

    I'm not sure if I understand what you want. Regarding our I2S - You are right in that there are not trimming registers and there is not much you can configure to control MCK frequency. There is only one register (MCKFREQ) that specifies how 32 MHz clock should be divided to produce MCK. And you have a set of fixed values to choose from. The next related register is RATIO which specifies how MCK (i.e. master clock) is divided to produce LRCK (i.e. left-right or sample clock – it’s frequency must correspond to the audio sample rate). And here again, you have a set of values to choose from. And that’s it, you configure these two registers to achieve desired frequency (or actually a one closest to this desired one. See table 97 in nRF52840_OPS_v0.5.1)

Reply
  • Hi,

    I'm not sure if I understand what you want. Regarding our I2S - You are right in that there are not trimming registers and there is not much you can configure to control MCK frequency. There is only one register (MCKFREQ) that specifies how 32 MHz clock should be divided to produce MCK. And you have a set of fixed values to choose from. The next related register is RATIO which specifies how MCK (i.e. master clock) is divided to produce LRCK (i.e. left-right or sample clock – it’s frequency must correspond to the audio sample rate). And here again, you have a set of values to choose from. And that’s it, you configure these two registers to achieve desired frequency (or actually a one closest to this desired one. See table 97 in nRF52840_OPS_v0.5.1)

Children
No Data
Related