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.

[参考译文] RTOS:当我使用 Hwi_create 来创建一个 sci Rx 中断时、但是中断只能运行一次。 为什么? 我是否需要重新启用中断??? 谢谢!

Guru**** 2595800 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/671608/rtos-when-i-use-the-hwi_create-to-create-a-sci-rx-interrupt-but-the-interrupt-can-only-run-once-why-do-i-need-to-re-enable-the-interrupt-thanks

工具/软件:TI-RTOS

UINT16 Hwi5=0;

void myIsr6()

   
   Hwi5++;
   
   //PieCtrlRegs.PIEACX.ALL |= PIEACK_group9;    

}    

int main()

   Dint; //由 BIOS 打开
   
   memcpy (&RamfuncsRunStart、&RamfuncsLoadStart、(uint32_t)&RamfuncsRunSize);
   
   InitDSP();

   InitApp();

   //Task_numPriorities - 1是最高优先级 Task_numPriorities = 16
   Task_Handle 任务;
   Task_Params taskParams;
   ERROR_Block EB;

   Hwi_Params HwiParams;
   Hwi_handle myHwi;


   ERROR_INIT (&EB);
   Hwi_Params_init (hwiParams);
   /*设置 myIsr6参数*/
   hwiParams.arg = 12;
   hwiParams.enableInt = false;

   myHwi = Hwi_create (96、myIsr6、NULL、&EB);
   if (myHwi = NULL){
   system_abort ("Hwi 创建失败");
   }

   Hwi_enableInterrupt (96);

   ERROR_INIT (&EB);

   Task_Params_init (&taskParams);
   taskParams.STACKSIZE = maximum_Task_Stack;
   taskParams.priority = GEN_TSK_PRIO;
   
   任务= Task_create (taskGeneral、&taskParams、&EB);
   if (task =NULL){
       //System_printf ("Task_create() failed!\n");
       BIOS_exit (0);
   }
 
   Task_Params_init (&taskParams);
   taskParams.STACKSIZE = maximum_Task_Stack;
   taskParams.priority = COM_TSK_PRIO;
   
   任务= Task_create (taskCom、&taskParams、&EB);
   if (task =NULL){
       //System_printf ("Task_create() failed!\n");
       BIOS_exit (0);
   }

   BIOS_start();   /*不返回*/
   返回(0);

BIOS 6.46.5.55 在 TMS28379D   CCS 6.2.0.00050上运行

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    除了确认 PIE 内的中断外:

        PieCtrlRegs.PIEACX.ALL |= PIEACK_group9;    

    我怀疑您必须通过读取 SCI 外设寄存器集中的某些寄存器来处理 SCI 中断。

    在这个 e2e 帖子中:

      

    所示的'scibRxFifoIsr'中断处理程序读取 SCI 数据、清除任何 SCI 溢出指示、清除 SCI 中断闪存、然后确认 PIE 中断。

    如果这些步骤被排除、则无法触发后续中断。

    Alan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    谢谢、但是我使用 BIOS 来管理中断、所以我认为它不需要 ACK 标志。  谢谢!

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    我认为你是对的。 BIOS 将执行 PIE ACK。 但是、ISR 需要完全为 SCI 提供服务。