ClassD PWM Questions

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
User avatar
Woody
XCore Addict
Posts: 165
Joined: Wed Feb 10, 2010 2:32 pm

Re: ClassD PWM Questions

Postby Woody » Fri Mar 12, 2010 5:14 pm

What's your reference clock speed? Have you changed it to 400MHz from 100MHz? perhaps you've not changed DEF_REF_FREQ_MHz?
User avatar
Andy
Respected Member
Posts: 279
Joined: Fri Dec 11, 2009 1:34 pm

Postby Andy » Fri Mar 12, 2010 5:25 pm

DEF_REF_FREQ_MHz is set to 100. Is this correct?

Would reducing the reference from 400 to 100 mean I'd have to receive samples at 1/4 the rate?
User avatar
Woody
XCore Addict
Posts: 165
Joined: Wed Feb 10, 2010 2:32 pm

Postby Woody » Mon Mar 15, 2010 10:01 am

Andy wrote:DEF_REF_FREQ_MHz is set to 100. Is this correct?
Yes, if your reference clock is running at 100MHz (which it will be unless you've changed it).
Andy wrote:Would reducing the reference from 400 to 100 mean I'd have to receive samples at 1/4 the rate?
No, you just get less granularity on PWM pulse widths.
User avatar
Andy
Respected Member
Posts: 279
Joined: Fri Dec 11, 2009 1:34 pm

Postby Andy » Mon Mar 15, 2010 11:51 am

I've been doing some experiments with different delays and DEF_REF_FREQ_MHz but none seem to be getting me the correct results.

When the send delay is PWM_PERIOD_44100 and DEF_REF_FREQ_MHz 100, I get overflow. However, when I change DEF_REF_FREQ_MHz to 200 and the delay to (PWM_PERIOD_44100 * 2) I get normal speed/pitch audio but only the right channel is playing out both speakers.

I've double checked the samples and they're definitely being split off correctly in audioManager()... I'm a bit stuck on this one.

Who is online

Users browsing this forum: No registered users and 1 guest