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.

omapl138的upp中断事件无法响应,使用sysbios。

Other Parts Discussed in Thread: SYSBIOS, OMAP-L138, TMS320C6748

中断设置代码如下:(通过查技术手册查到upp的中断事件号为91)

Hwi_Params_init(&upphwiParams);
    upphwiParams.arg = 12;
    upphwiParams.enableInt = FALSE;
    upphwiParams.eventId = 91;//SYS_INT_UPP_INT,see datasheet p308
    upphwiParams.priority = 12;
    uppHwi = Hwi_create(6,UPP_Isr,&upphwiParams,&eb2);
    if (uppHwi == NULL) {
        System_abort("main: failed to create Hwi thread");
    }
    Hwi_enableInterrupt(6);

在程序运行中,upp的upies寄存器的相应位都设为1,在传输过程中upier寄存器eowi位也为1,但是没有进入我的中断响应函数。

想请教:是我中断响应设置哪里的问题,或还有什么额外需要设置的吗?如果我要在使用sysbios的前提下怎么去设置中断响应。

  • 从BIOS的使用说明来看,你的代码差不多,UPISR有置位没?

    RUNTIME HWI CREATION
    Below is an example that configures an interrupt at runtime. Typically such code would be placed in main().
      #include <xdc/runtime/Error.h> 
      #include <ti/sysbios/hal/Hwi.h> 
       
      Hwi_Handle myHwi; 
       
      Int main(Int argc, char* argv[]) 
      { 
          Hwi_Params hwiParams; 
          Error_Block eb; 
        
          Hwi_Params_init(&hwiParams); 
          Error_init(&eb); 
       
          // set the argument you want passed to your ISR function 
          hwiParams.arg = 1;         
        
          // set the event id of the peripheral assigned to this interrupt 
          hwiParams.eventId = 10;    
        
          // don't allow this interrupt to nest itself 
          hwiParams.maskSetting = Hwi_MaskingOption_SELF; 
        
          //  
          // Configure interrupt 5 to invoke "myIsr". 
          // Automatically enables interrupt 5 by default 
          // set params.enableInt = FALSE if you want to control 
          // when the interrupt is enabled using Hwi_enableInterrupt() 
          // 
        
          myHwi = Hwi_create(5, myIsr, &hwiParams, &eb); 
        
          if (Error_check(&eb)) { 
              // handle the error 
          } 
      } 
        
      Void myIsr(UArg arg) 
      { 
          // this runs when interrupt #5 goes off 
      } 
    
  • 谢谢Tony,问题已经解决了,是查的手册不对;我最开始开的手册是OMAP-L138 C6000 DSP+ARM Processor Technical Reference Manual (Rev.A),p308上的upp中断号是91,但是在TMS320C6748 DSP Technical Reference Manual (Rev. A),p85上的upp中断号是94;通过例程确定94是对的;后面我找gpio的中断号也是以TMS320C6748 DSP Technical Reference Manual (Rev. A)的为准。

  • P308是ARM AINTC上的中断号,DSP侧的中断号在P99。

    两个核上的中断号不一样,各是各的。

x 出现错误。请重试或与管理员联系。