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.

Bcp Debug

Other Parts Discussed in Thread: TMS320C6670

Hello,
I am trying to generate an interrupt to DSP when there is error in any of the submodules in the BCP.

I have created an HWI with event ID 65 (corresponding to BCP error event) and written an ISR which does nothing but clears the EOI (end of interrupt) register and also clears the submodule raw status register.

The problem I am getting is that the interrupt occurs only the first time and it never comes again despite introducing errors in all BCP packets.

Am I missing something that needs to be done?

Platform : TMS320C6670

Regards

Nikhil

  • Anyone?? I still couldn't find it..

  • Hi Nikhil,

    Please provide the following information's to re-produce/verify the issue/source.

    1. What are all the packages used? Version?

    2. Could you please share the application source code?

    Thanks.

  • Hi Rajasekaran,

    The packages used are MCSDK PDK TMSC6670, SYS/BIOS 6.33.5.46, DSPLIB C66x 3.1.1.1

    The ISR code is as under:

    void PLT_Bcp_ErrorHandler_ISR (int arg)
    {
      Bcp_ModuleCfg     IntStatus;
      int       i = 0;
      uint32_t              key;            /* enable/disable hwi */
      uint32_t         eoi;
      uint32_t      mod_id_with_error ;
      uint8_t EngErrEnable;
      uint8_t DlgDoneEnable;
      uint8_t PpbErrEnable;
      /* check interrupt status register of BCP,if error occurs in a submodule,the corressponding bit is set high */
      Bcp_getInterruptStatusReg  ( gPhySharedData.hBcpLLDObj,
             CSL_chipReadReg (CSL_CHIP_DNUM),
             &IntStatus
             ) ;
      if(IntStatus.rd)
      {
       mod_id_with_error = Bcp_ModuleId_RD;
       //Bcp_getModuleIntRawStatus (gPhySharedData.hBcpLLDObj, Bcp_ModuleId_RD, CSL_chipReadReg (CSL_CHIP_DNUM), &EngErrEnable, &DlgDoneEnable, &PpbErrEnable);
      }
      if(IntStatus.crc)
      {
       mod_id_with_error = Bcp_ModuleId_CRC;
      }
    
      if(IntStatus.enc)
      {
       mod_id_with_error = Bcp_ModuleId_ENC;
       Bcp_getModuleIntRawStatus (gPhySharedData.hBcpLLDObj, Bcp_ModuleId_ENC, CSL_chipReadReg (CSL_CHIP_DNUM), &EngErrEnable, &DlgDoneEnable, &PpbErrEnable);
       asm(" NOP 9");
      }
    
      if(IntStatus.rm)
      {
       mod_id_with_error = Bcp_ModuleId_RM;
      }
    
      if(IntStatus.mod)
      {
       mod_id_with_error = Bcp_ModuleId_MOD;
      }
    
      if(IntStatus.cor)
      {
       mod_id_with_error = Bcp_ModuleId_COR;
      }
    
      /* clearing HWI */  
      Bcp_clearModuleIntRawStatus (gPhySharedData.hBcpLLDObj,
            Bcp_ModuleId_TM,
          CSL_chipReadReg (CSL_CHIP_DNUM),
          0x7f,
          1,
          1
        ) ;
     for(i = 4;i < 14 ;i++)
      {
       Bcp_clearModuleIntRawStatus (gPhySharedData.hBcpLLDObj,
         (Bcp_ModuleId)i,
         CSL_chipReadReg (CSL_CHIP_DNUM),
         0x7f,
         1,
         1
       ) ;
      }
      Bcp_setEoiReg (gPhySharedData.hBcpLLDObj,0);
      eoi = Bcp_getEoiReg(gPhySharedData.hBcpLLDObj);
    
      Bcp_getInterruptStatusReg  ( gPhySharedData.hBcpLLDObj,
          CSL_chipReadReg (CSL_CHIP_DNUM),
          &IntStatus
        ) ;
     
    }

  • Hi,

    Where you got this PLT_Bcp_ErrorHandler_ISR function, is this your own code?
    There is no direct test code for how to use interrupt for BCP. But you can find the interrupt calls at bcp_mmr.h file

    I could not get you, why you are clearing HWI with loop (Bcp_clearModuleIntRawStatus). This API clears the contents of Interrupt Raw status register for any given BCP submodule. I think so, you have to call Bcp_setModuleIntEnable and Bcp_getModuleIntEnable for enable the interrupt once you cleared. Find the more details at the KeyStone Architecture Bit Rate Coprocessor (BCP) User Guide (SPRUGZ1)

  • Hi Pubesh,

    The ISR code written is my own. Although we should clear the status of the submodule for which the error has come, yet I am clearing all the errors of all the submodules which , I think, does no harm.

    The  Bcp_getModuleIntEnable and Bcp_setModuleIntEnable are used to enable or disable(mask) the interrupt. It is enabled to let the interrupt not be masked. It should be called only one time for the errors that, we want, would interrupt the DSP.

    For clearing the error which caused the interrupt, Bcp_clearModuleIntRawStatus() is used.

    I have gone through the document and I think I have done everything that should be done. Still I don't know what I am missing here.

    Regards

    Nikhil 

  • Hi Nikhil,

          I understand that you are developing the SYS/BIOS application. If my understanding is correct, Have you ensured the ISR registration is done properly in SYS/BIOS?  If possible attach the complete project files. 

    In general, If any error interrupt is received then need to clear only corresponding error status right. 

    Why to clear all the errors status in all the sub modules?

    Thanks.

  • Hi Rajasekaran ,

    I think I have correctly resgisterd the ISR in sys/bios. Following is the code for the same. Please tell if something is missing here.

    BCP_register_error_handler_isr(Void)

    {

    int32_t eventId;

    Hwi_Params hwiParams;

    Error_Block eb;

    Error_init(&eb);

    eventId = 65; // (Primary interrupt - CIC3_OUT0)NOT CORE SPECIFIC

    Hwi_Params_init(&hwiParams);

    hwiParams.arg = 1;

    hwiParams.eventId = eventId;

    Hwi_create(10, PLT_Bcp_ErrorHandler_ISR, &hwiParams, &eb);

    return;

    }

    As for clearing the error status of the submodules, yes there is no need to clear all submodules. But then there is no harm either. I have also run the code after clearing the error only for the corresponding submodules, but of no use.

    //BR

  • hi,

    I am up against this thing again. Really need someone who can help.