Dual DAC problem
-
- Posts: 3
- Joined: Tue Mar 17, 2015 12:55 pm
Dual DAC problem
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?
Re: Dual DAC problem
Any chance you're using the ADCs on the second submodule to trigger a PWM reload?
Dan Ciliske
Project Engineer
Netburner, Inc
Project Engineer
Netburner, Inc
-
- Posts: 3
- Joined: Tue Mar 17, 2015 12:55 pm
Re: Dual DAC problem
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?
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?