This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: UCD3138HSFBEVM-029
Tool/software: Code Composer Studio
Hi everyone, i need to generate dpwm waveform ,for this i have referred videos in ti website, but couldn't able to get dpwm waveform. Could you please tell me is there any necessary hardware connection get dpwm waveforms. I have atttached the code, is there any changes to make in code?
#define MAIN 1
#define PCLK_PERIOD 4.0e-9
#define PERIOD_SECONDS 10.0e-6
#define PERIOD_CLK ((int)(PERIOD_SECONDS/PCLK_PERIOD)<<4)
#define EVENT1 (int)(PERIOD_CLK*0.00)
Dpwm0Regs.DPWMCTRL0.bit.PWM_MODE = 0;
// Set to normal mode
Dpwm0Regs.DPWMCTRL0.bit.CLA_EN = 0;
Dpwm0Regs.DPWMPRD.all = PERIOD;
Dpwm0Regs.DPWMEV1.all = EVENT1;
Dpwm0Regs.DPWMCTRL0.bit.PWM_EN = 1;
LoopMuxRegs.GLBEN.bit.DPWM0_EN = 1;
(GioRegs.FAULTIN.bit.FLT3_IN == 0)
// Re-Check pin assignment (ADC_EXT/SYNC may be?)
MiscAnalogRegs.CLKTRIM.bit.HFO_LN_FILTER_EN = 0;
ram_event2 = Dpwm0Regs.DPWMEV2.all;
Dpwm0Regs.DPWMEV2.all = ram_event2;
what is value of PERIOD?
What is Dpwm0Regs.DPWMPRD.all = PERIOD;
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Sean Xu:
I have changed Dpwm0Regs.DPWMPRD.all = PERIOD_CLK;
still i am not getting dpwm waveform.
In reply to gouthami c v:
This is open loop configuration, so the PID won't affect the DPWM duty.
Maybe Dpwm0Regs.DPWMEV2.all is very small 0r zero. you can use memory debugger to check what is value of this register.
Dpwm0Regs.DPWMEV2.all is very small 0r zero. you can use memory debugger to check what is value of this register.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.