TI中文支持网
TI专业的中文技术问题搜集分享网站

EDMA3CC_COMPL_HANDLER_RETRY_COUNT的值是不是bug

EDMA3CC_COMPL_HANDLER_RETRY_COUNT的值在库中是10u

而IPR与ICR寄存器的都是32位的。

这里是不是bug,是不是应该是0x10u

Shine:

10u的u表示unsigned int,在c6000 compiler data type里是32bit的。
7.4 Data Types
www.ti.com/…/sprui04b.pdf

user3688025:

回复 Shine:

与32bit 没有关系吧,不管是几位的,10u的10进制就是10,而不是0x10=32吧。

我的问题不是你理解的这样的,是中断函数中的这个while。

void edma3CCComplIsr()

{

   volatile unsigned int pendingIrqs;

   volatile unsigned int isIPR = 0;

   unsigned int indexl;

   unsigned int Cnt = 0;

   indexl = 1u;

#ifdef _TMS320C6X

   IntEventClear(SYS_INT_EDMA3_0_CC0_INT1);

#else

   IntSystemStatusClear(SYS_INT_CCINT0);

#endif

   isIPR = EDMA3GetIntrStatus(SOC_EDMA30CC_0_REGS);

   if(isIPR)

   {

       while ((Cnt < EDMA3CC_COMPL_HANDLER_RETRY_COUNT)&& (indexl != 0u))

   {

       indexl = 0u;

       pendingIrqs = EDMA3GetIntrStatus(SOC_EDMA30CC_0_REGS);

       while (pendingIrqs)

       {

       if(TRUE == (pendingIrqs & 1u))

               {

               /**

                * If the user has not given any callback function

                * while requesting the TCC, its TCC specific bit

                * in the IPR register will NOT be cleared.

                */

               /* Here write to ICR to clear the corresponding IPR bits */

               EDMA3ClrIntr(SOC_EDMA30CC_0_REGS, indexl);

                     (*cb_Fxn[indexl])(indexl, EDMA3_XFER_COMPLETE, NULL);

               }

               ++indexl;

               pendingIrqs >>= 1u;

       }

           Cnt++;

   }

   }

}

Tony Tang:

回复 user3688025:

这是设置的retry的次数,与通道数无关。

通道的检查是由下面这个while完成的。

while (pendingIrqs)

       {

       if(TRUE == (pendingIrqs & 1u))

               {

               /**

                * If the user has not given any callback function

                * while requesting the TCC, its TCC specific bit

                * in the IPR register will NOT be cleared.

                */

               /* Here write to ICR to clear the corresponding IPR bits */

               EDMA3ClrIntr(SOC_EDMA30CC_0_REGS, indexl);

                     (*cb_Fxn[indexl])(indexl, EDMA3_XFER_COMPLETE, NULL);

               }

               ++indexl;

               pendingIrqs >>= 1u;

       }

user3688025:

回复 Tony Tang:

这个值是与什么有关,还是说只是库中默认设置的一个值,其实设置成1次,2次也是可以的?

赞(0)
未经允许不得转载:TI中文支持网 » EDMA3CC_COMPL_HANDLER_RETRY_COUNT的值是不是bug
分享到: 更多 (0)