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.

TMS320F280039C: Can ISR codes itself be output as a static library?

Part Number: TMS320F280039C


Dear Champs,

I am asking this for our customer.

The user wants to use static libraries among their teams for confidentiality purposes.

They are aware how to generate a static library for functions.

But they are asking if and how this kind of codes can be output as a static library.

#pragma CODE_SECTION(ADCA1_ISR, ".TI.ramfunc")
__interrupt void ADCA1_ISR(void)     // ADC
{
    // Set interrupt priority:
    volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER1.all;
    IER |= M_INT1;
    IER    &= MINT1;                         // Set "global" priority
    PieCtrlRegs.PIEIER1.all &= MG1_1;   // Set "group"  priority
    PieCtrlRegs.PIEACK.all = 0xFFFF;   // Enable PIE interrupts
    __asm("  NOP");
    EINT;

    //
    // Insert ISR Code here between EINT and DINT.......
    // -------------------------------------------------------
    // Toggle GPIO
      GPIO_writePin(myGPIO3, 1);

      SysCtl_delay(24);   // delay for (24*5 + 9) cycles ~1 us


...................


      //
      // Clear the ADC interrupt flag
      //
      ADC_clearInterruptStatus(ADCA_BASE, ADC_INT_NUMBER1);

      //
      // Check if overflow has occurred: workaround for the errata: ADC: Interrupts may Stop...
      //
      if(true == ADC_getInterruptOverflowStatus(ADCA_BASE, ADC_INT_NUMBER1))
      {
          ADC_clearInterruptOverflowStatus(ADCA_BASE, ADC_INT_NUMBER1);
          ADC_clearInterruptStatus(ADCA_BASE, ADC_INT_NUMBER1);
      }



      Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP1);

      // Toggle GPIO
      GPIO_writePin(myGPIO3, 0);
    // -------------------------------------------------------

    //
    // Restore registers saved:
    //
    DINT;
    PieCtrlRegs.PIEIER1.all = TempPIEIER;



}
#endif

That is, can ISR function (especially nesting ISR) itself be used to generate a static library rather than calling libraries inside an ISR?

Wayne Huang