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.

Linux/TDA2P-ACD: Interrupt assert on IPU2

Part Number: TDA2P-ACD


Tool/software: Linux

Hi,

We have custom TDA2px board and are trying to move DCAN module to execute on IPU2 instead of IPU1_1 when Linux is on A15. We are using PROCESSOR_SDK_VISION_03_03_00_00. We succeeded in running it on IPU1_1 when Linux is NOT on A15. When DCAN module starts to register interrupt #28 for DCAN we get the following error:

 [HOST] [IPU2  ]     18.318947 s:  UTILS: DCAN INTERRUPT: HWI Create for INT28 !!!
 [HOST] [IPU2  ]     18.319130 s:  ### XDC ASSERT - ERROR CALLBACK START ###
 [HOST] [IPU2  ]     18.319191 s:
 [HOST] [IPU2  ]     18.319313 s: E_alreadyDefined: Hwi already defined: intr# 28
 [HOST] [IPU2  ]     18.319404 s:
 [HOST] [IPU2  ]     18.319435 s:  ### XDC ASSERT - ERROR CALLBACK END ###

So IPU2 tries to register interrupt for DCAN but failes for some reason. First we thought that Linux is blocking the INTR and we found that GPIO5 uses that INTR so we disabled it and when we run "cat /proc/interrupts" there is no INTR #28 but still we have the same error when we run ./apps.out. Do you have some idea what could cause the problem? Is it even possible to use DCAN module on IPU2 when Linux is on A15?

Regards,

Nevena Stojanovic

  • Hi Nevena ,

    Looks like there is interrupt conflict between Linux and DCAN module used. Linux uses 0-31 interrupt lines, can you use anything other than 0-31 which is free?

    Thanks & Regards,
    Vivek Dhande.
    Texas Instruments (India) Pvt Ltd
  • Hi,

    we have already tried changing

    #define SYSTEM_DCAN_INTR_ID              (28)

    to

    #define SYSTEM_DCAN_INTR_ID              (77)

    in file system_dcan.c which have impact on

    IntXbar_connectIRQ(intrId, DCAN1_IRQ_INT1);

    and 

    BspOsal_registerIntr(intrId,
                         (BspOsal_IntrFuncPtr)Utils_dcanInt1Isr,
                         &dcanIsrContext);

    where intrId = SYSTEM_DCAN_INTR_ID.

    After that we don't have assert on IPU2, but interrupt isn't getting called in loopback mode.

    Are those two functions sufficient in order to connect 77 with DCAN1_IRQ_INT1 or we need to do something more on lower level?

     


    Regards,

    Nevena Stojanovic

  • Any update?

    Regards,

    Nevena Stojanovic
  • Hello,

    Just to update you. We solved the issue. Beside changing the interrupt ID (to 61), we had to completely disable CAN under linux (in make kernel_menuconfig). Also, in function Utils_dcanPlatformInit(), we had to call:

    PlatformDCAN1PadConfig();
    PlatformDcanClkConfig(0);
    PlatformDCAN1RXSetPinMux();

    and it worked.

    Regards,
    Nevena Stojanovic