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.

TI例程PMSM的死区问题

您好,请问TI例程的PMSM3-1有死区设置吗?我采到的PWM波没有死区,电路板一直报错

  • 你看一下PWM寄存器初始化中有没有设置DBFED的值,这就是死区时间

    你的电路板报错是驱动芯片由于上下桥短路而报错吗?如果是其他部分报错不一定是死区的原因

  • 我的报警灯是上下桥臂直通的报警,用示波器看不仅没有死区,而且还有交叉的现象,也设置死区时间了,3.2us,怎么回事呢

  • 死区时间=(m*p)个cpu时钟周期,m为由死区定时控制寄存器的位设定范围是0~15,p为死区定时器的预定标因子最大是32,我都设置的最大值,cpu时钟周期是50ns,这样的话死区时间最大应该是3.2us,但是输出的PWM波没有死区,而且有交叉的部分

  • 你好,

    你看的是DSP引脚上的PWM波形还是管子上的PWM波形呢?

    能否把波形图发上来看看?

  • 是DSP引脚的

    下边是放大的

  • 看起来死区是设置了。

    你是不是把PWM模块的AQ设反了,也就是高低电平逻辑反了?

  • 设置的1、3、5高有效,2、4、6低有效;上图为1、2的波形;还有就是现在程序进入view-only模式,怎么退出?在网上看的右键选source mode,但是没有这选项啊

  • 您好,打扰您了,在28335 ADC的经典例程——  Example_2833xAdcSeq_ovdTest.c中遇到了疑问

    下面是其部分程序:

    这是三个定义值,我不理解这三个定义值有什么意义或者作用,想请教一下您,谢谢,下面红色字体是问题。

    #define POST_SHIFT      0     // 当所有的采样表满后的移动结果,Shift results after the entire sample table is full
    #define INLINE_SHIFT    1    // 当数据从结果寄存器中取出时的移动结果,Shift results as the data is taken from the results regsiter
    #define NO_SHIFT           0    // 不移动数据,Do not shift the results

    #define BUF_SIZE   1024  // 采样缓冲器的大小Sample buffer size

        for (i=0; i<(BUF_SIZE/16); i++)
         {
           // Wait for int1
           while (AdcRegs.ADCST.bit.INT_SEQ1== 0){}//没有发生SEQ1中断,等待……发生SEQ1中断,如果发生则向下执行
           GpioDataRegs.GPBSET.bit.GPIO34 = 1;  // 设置监视器,用于观察是否发生SEQ1中断(可选)Set GPIO34 for monitoring  -optional
           AdcRegs.ADCST.bit.INT_SEQ1_CLR = 1;//中断清除位,清除中断标志SEQ1

    #if INLINE_SHIFT//==1,将结果存入采样表列
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT0)>>4);
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT1)>>4);
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT2)>>4);
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT3)>>4);
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT4)>>4);
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT5)>>4);
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT6)>>4);
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT7)>>4);

    #endif //-- INLINE_SHIFT

    #if NO_SHIFT || POST_SHIFT //这一句是定义为0的,那么下面的程序始终是不会被执行的,那么下面的这段程序有什么用呢?谢谢==0,不移动数据||所有的采样表满后的移动结果

           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT0));
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT1));
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT2));
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT3));
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT4));
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT5));
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT6));
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT7));

    #endif //-- NO_SHIFT || POST_SHIFT

           while (AdcRegs.ADCST.bit.INT_SEQ1== 0){}
         GpioDataRegs.GPBCLEAR.bit.GPIO34 = 1;  // Clear GPIO34 for monitoring  -optional
           AdcRegs.ADCST.bit.INT_SEQ1_CLR = 1;

    #if INLINE_SHIFT

           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT8)>>4);
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT9)>>4);
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT10)>>4);
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT11)>>4);
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT12)>>4);
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT13)>>4);
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT14)>>4);
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT15)>>4);

    #endif //-- INLINE_SHIFT

    #if NO_SHIFT || POST_SHIFT这一句是定义为0的,那么下面的程序始终是不会被执行的,那么下面的这段程序有什么用呢?谢谢

           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT8));
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT9));
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT10));
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT11));
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT12));
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT13));
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT14));
           SampleTable[array_index++]= ( (AdcRegs.ADCRESULT15));
    #endif   // -- NO_SHIFT || POST_SHIFT

     }

    这一句是定义为0的,那么下面的程序始终是不会被执行的,那么下面的这段程序有什么用呢?谢谢
    #if POST_SHIFT    // For post shifting, shift the ADC results
        // in the SampleTable buffer after the buffer is full.
        for (i=0; i<BUF_SIZE; i++)
        {
          SampleTable[i] = ((SampleTable[i]) >>4);
        }
    #endif // -- POST_SHIFT

        GpioDataRegs.GPBCLEAR.bit.GPIO34 = 1;  //清除GPIO34为0                    Clear GPIO34 for monitoring  -optional
      }

  • 是将原来的高有效改为低有效,低有效改为高有效吗?已经改了还是不行

  • 而且把死区设置去掉还是一样,这是怎么回事,就是在TI官网下的例程