Dual DAC problem

Discussion to talk about software related topics only.
Post Reply
RichAdili1
Posts: 3
Joined: Tue Mar 17, 2015 12:55 pm

Dual DAC problem

Post by RichAdili1 »

My app has been successfully using DAC0 as well as PWM_A3 and PWM_B3 as independent channels. The DAC as well as the two PWMs are each configured for trivial use, i.e. I simply write new pulse widths or a DAC value as needed. Attempting to add DAC1 causes PWM_B3 to reload erratically. Obviously I'm missing something but cannot find the cause. Where is the connection between power-up of DAC1 and reload of PWM_B3?
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: Dual DAC problem

Post by dciliske »

Any chance you're using the ADCs on the second submodule to trigger a PWM reload?
Dan Ciliske
Project Engineer
Netburner, Inc
RichAdili1
Posts: 3
Joined: Tue Mar 17, 2015 12:55 pm

Re: Dual DAC problem

Post by RichAdili1 »

No, not using ADC triggers. My PWM code was copied from the MOD54415-PWM example code EdgeAlignedPWM() function, which contains the line:
sim1.mcpwm.sm[submod].val[0] = reset/2; //Median 0

The MCF54415 reference manual is not terribly clear regarding this register. However, commenting out this line appears to solve the problem. Is this a bug in the example code?
Post Reply