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.

Reg ARM to DSP interrupt without BIOS

Other Parts Discussed in Thread: OMAPL138

Hi,

I am trying to interrupt DSP from ARM on OMAP L138.

I have done following:

ARM side:

DSP_init();

//(Rise DSP Interrupt by making SYSCFG_CHIPINT3 as 1)

SYSCONFIG->CHIPSIG=0x00000008;

DSP side

Init_Interrupts() {
Map SYSCFG_CHIPINT3 to INTSEL4 of INTMUX1

// Assign the address of the IST to the IST pointer
ISTP = (unsigned int)intcVectorTable;
 
// Clear all CPU maskable interrupts
ICR = DSPINTC_IST_ALL_MASK_INT;
 
// Enable INT4 interrupts
IER = DSPINTC_IST_NMI | DSPINTC_IST_INT4;
}

interrupt void myISR (void)
{
 sysRegs->CHIPSIG_CLR=0x0000000F;
 printf("DSP Woke up");
}

I have mapped myISR to INTVEC4 of int vector table in intvecs.asm

_vector4: VEC_ENTRY _myISR

 

With this I am not able to interrupt DSP. What else I need to do?

thanks, durga

  • Hey Durga,

    It looks like you might have already viewed the no-OS examples provided in the quickStartOMAPL1x package; however, the link is provided below in case others come across the same issue.

    A few questions I have:

    1. Are you also enabling interrupts on the DSP side by calling the intrinsic function "_enable_interrupts" after initializing the interrupts?
    2. What exactly does "DSP_init()" do?

    Side note:

    You may be careful with how you load your projects and which is run first. If the ARM sends the interrupt before the DSP interrupts have been initialized, you most likely will not get the desired outcome. Out of curiosity, have you been able to compare your project to the "ARM2DSP_integration" example provided in the quickStart package? The project files are located in the "syscfg" folder for each platform/cpu.

    OMAPL1x no-OS examples: http://processors.wiki.ti.com/index.php/QuickStartOMAPL1x_rCSL

    Hope this helps!

    Regards,
    Kevin

  • Hi Kevin,

    Many thanks for the reply. The examples provided did work.

    Regarding the questions you have asked:
    1. Are you also enabling interrupts on the DSP side by calling the intrinsic function "_enable_interrupts" after initializing the interrupts?
     Yes.

    2. What exactly does "DSP_init()" do?
     Power up the DSP and bring the DSP out of RESET.

    3. You may be careful with how you load your projects and which is run first. If the ARM sends the interrupt before the DSP interrupts have been initialized, you most likely will not get the desired outcome.
     Before sending the ARM interrupt, I have loaded DSP code and its waiting in while 1 loop for the interrupt.

    4. Out of curiosity, have you been able to compare your project to the "ARM2DSP_integration" example provided in the quickStart package? The project files are located in the "syscfg" folder for each platform/cpu.

     Difference was I accessed sysreg directly ie

     At ARM(to generate interrupt on CHIPSIG2):
     Unlock sys config registers.
     sysRegs->CHIPSIG=sysRegs->CHIPSIG|0x00000004;
     lock sys config registers

     At DSP(in my_isr):
     sysRegs->CHIPSIG_CLR=0x0000000F;

    Please answer the following.

    1. Can we access sysRegs at DSP directly?
    2. There is a procedure given in C674x CPU instruction data sheet (sprufe8b) ie set GIE bit in CSR register, set IE bit in IER etc., Where are we doing all these in the example code? And if I want to do all these steps myself (document says IER access is allowed only in supervisor mode), how can I do?

    thanks, Durga

  • Hey Durga,

    "1. Can we access sysRegs at DSP directly?"

    Yes, you should be able to access the registers directly. In fact, the CSL macros that are used in the example essentially do the same. The CSL macros can be found in the header file "support/include/ti/pspiom/cslr/cslr.h" and the arguments passed can be found in the header file "support/include/ti/pspiom/cslr/cslr_syscfg0_OMAPL138.h". For example, the line of code

    CSL_FINST(sysRegs->CHIPSIG, SYSCFG_CHIPSIG_CHIPSIG2, ASSERT);

    resolves to: sysRegs->CHIPSIG = (sysRegs->CHIPSIG & 0xFFFFFFFB) | (0x00000004);

    "2. There is a procedure given in C674x CPU instruction data sheet (sprufe8b) ie set GIE bit in CSR register, set IE bit in IER etc., Where are we doing all these in the example code? And if I want to do all these steps myself (document says IER access is allowed only in supervisor mode), how can I do?"

    Setting up the DSP interrupt controller is carried out in the function "setup_DSP_INTC()". As for the supervisor mode, the example does not perform any operations to explicitly put the DSP into the supervisor mode. I believe that this should already be the case when you enter "main()".

    A few other questions/things to try:

    1.) Does your DSP ISR unlock the sysRegs before attempting to clear the interrupt? You might try just leaving the registers unlocked at the beginning to ensure that this is not an issue.

    2.) Try clearing all SYSCFG interrupts at the beginning of your code.

    3.) Does your DSP interrupt ISR use the key word "interrupt"? See the example for clarity.

    Hope this helps!

    Regards,
    Kevin

     


  • Hi Kevin,

    Thanks for those inputs.

    "Does your DSP ISR unlock the sysRegs before attempting to clear the interrupt? You might try just leaving the registers unlocked at the beginning to ensure that this is not an issue."

    Does that mean using kick0 and kick1 registers?
    Use of kick registers is supported on DSP? I thought they are only used on ARM.

    thanks,
    Durga

  • Hi Durga,

    "Does that mean using kick0 and kick1 registers?"
    Yes, you are correct; I did mean using the kick0 and kick1 registers!

    "Use of kick registers is supported on DSP? I thought they are only used on ARM."
    The kick registers can be used by both the ARM and DSP. One question I have yet to ask is which silicon revision you are using. If you are using a revision of 2.0 or higher, than you can disregard the statement I made about unlocking the registers as the kick registers have been disabled and the SYSCFG registers will be always unlocked. You can read more about the kick registers (section 11.2.2) in the latest revision of the OMAPL138 System Reference Guide here: http://www.ti.com/lit/pdf/sprugm7. You can also see which silicon revision you are developing on by using the gel file located here: http://processors.wiki.ti.com/index.php/OMAP-L1x_Debug_Gel_Files.

    Hope this helps!

    Regards,
    Kevin

  • hi durga,

    i want to learn to interrupt DSP from ARM as well, and i use the quickStart example which located in the "syscfg" folder. But i can't run the .out files on both DSP and ARM.

    Would you like to tell me that, how do you load the .out files and how to run them?

    thanks & best regards.

    --

    li bin