SAMG55 - I2S - 48Khz

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am using a SAMG55 Xplained Pro board to develop an audio player of sorts. It is all working fine with the 120Mhz system clock. At 46.875 Khz.

Now I would like to run the I2S at a real 48Khz/12.288Mhz.
I am not clear about the options I have. I2S only runs form either the MCK or the PCK4 clock. I can't see how to use an external crystal to get the rates I need.

 

I thought about overclocking the entire board, but I think I might lose the USB 48Mhz clock that way?

 

Otherwise, any hints would be helpful. I have only been working with the G55 for a month or so. I am probably missing something.

 

Thanks!

Last Edited: Thu. Oct 15, 2015 - 11:33 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

The only way is to slightly overclock or underclock to match the required frequency after all the dividers.

 

You have two PLLs, one of them can be used for USB, another one for the peripherals (including I2SC). One disadvantage is that all your peripherals will run at some strange frequency.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for your response. I was sort of afraid of that. I can't imagine the G55 would have problems running at 122,288,000? I am currently thinking of just replacing the XTAL osc and driving it with a 12.288 Mhz Osc.

This should work ok because the USB is using the PLL, correct?

I am not sure if I can get those frequencies out of the PLL. But I will look into it. As far as I can tell, only one PLL is being used at the moment. Hmmm..

 

 

Thanks again!

 

edit: Oops. I see now. PLL0 is the system clock and PLL1 is the USB clock, both derived from the Slow Clock. So the external 12.288 Mhz Xtal is brought in the XIN input and the 3-20Mhz Crystal Osc is bypassed to allow the new XTAL to become the main clock.  SO .. the Main Clock may not be used at the moment for anything (that is still ASF code I haven't totally gone through yet).

 

edit:

It looks like I can bring in 12.288Mhz via XIN and use it as MAIN_CLOCK and drive PCK4 to I2SC0. And the rest of the clocks stay the same.

 

 

Last Edited: Fri. Aug 28, 2015 - 08:21 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I ran G53 at 49,152,000 (max 48 MHz) for the same exact reason and it did not seem to mind under normal room conditions.

 

I don't see why 12.288 MHz would not work.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sweet. I haven't had a moment to try it yet, but my solution above seems like it should work without affecting the current clock setup? I don't think MAIN_CLOCK is used at all at the moment. Do you have any thoughts on that?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Actually, it looks like both PLL can only run from 32kHz crystal (looking at Figure 18-1. "General Clock Block Diagram" in the DS). So if you are using USB, then you will have to have this crystal.

 

And from there, you can multiply 32768 by 1465 to get 48 MHz clock for USB and multiply by 3732 to get reasonably close to 122,288,000 (you will get 122,290,176).

 

But the rest of your system will have to run at that weird frequency.

 

I don't really see the point of having 3-20 MHz crystal input on this part at all.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

And if you are not Neil Young working on a Pono player, then you will get close enough for any practical purposes.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Actually, disregard all this. I got what you are trying to do. Yes, if you just connect 12.288 MHz crystal and route it to PCK4 without divider, then it will all work.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I do have that 32Khz xtal. PLL0 uses it for the 120Mhz system clock and PLL1 is used for USB. I like the idea of just using a higher multiplier on PLL0 but I may have to use exact freqs. Given that, I am looking at leaving everything as is and just adding a 12.288Mhz xtal on XIN for MAIN_CLOCK. It doesn't appear MAIN_CLOCK is used at all at the moment. Though your solution is easier and I can't imagine anyone could hear the 20Khz difference.

 

thanks!