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.

TMS320F28335: “step into”and“resume”output waveform is inconsistent

Part Number: TMS320F28335

When using TMS320F28335, you want to use the monitoring window to view the value of EPwm6Regs.CMPA.half.CMPA, and then use the "Graph" function of CCS software to view the waveform after EPwm6Regs.CMPA.half.CMPA.

The ideal waveform of EPwm6Regs.CMPA.half.CMPA should be a sine wave on the 0 scale line. I observed this waveform with an oscilloscope.

In fact, when I use "step into", the value of EPwm6Regs.CMPA.half.CMPA increases normally, and the output waveform with "Graph" is also normal. However, when I use "resume" for operation debugging, The change of the value of EPwm6Regs.CMPA.half.CMPA cannot be seen in the monitoring window, and the output waveform is no longer an ideal sine wave.

I wonder why this is the case, and hope to get some help.

I have attached the code I am using below.

main.c

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "DSP2833x_Device.h" // DSP2833x Headerfile Include File
#include "DSP2833x_Examples.h" // DSP2833x Examples Include File
#include "Math.h"
//#include "pwm.h"
interrupt void epwm6_timer_isr(void); //
void EPWM6_Init(Uint16 tbprd);
int N=256;
int i,k=0;
float m=1,b;//
float sina[256];
float sinb[256];
/*******************************************************************************
* : main
* :
* :
* :
*******************************************************************************/
void main()
{
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

EPwm6Regs.CMPA.half.CMPA value calculation formula:

thanks!!!