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.

TMS320F280025C: Software interrupts

Part Number: TMS320F280025C
Other Parts Discussed in Thread: C2000WARE

Hi,

Need an example how to use software interrupts.

a) install ISR

b) enable interrupt

c) set priority

d) trigger

Please

  • Hi,

    Unfortunately, we do not have an example showcasing Software interrupt. I will definitely reach out to the C2000ware development team, if we can add such an example in the future releases.

    You can refer to the timer example in C2000ware driverlib to understand how an interrupt is registered and ISRs are written. Instead of Timer hardware triggering the interrupt, you can have software triggering the interrupt using TRAP instruction. For more details, please refer to https://www.ti.com/lit/ug/spru430f/spru430f.pdf

    Regards,

    Veena

  • Hi,

    What should I do to setup interrupt priority?

    For example, I want Timer or ADC interrupt to be able to preempt CAN interrupt and not vice versa.

    Best regards

    Rasty

  • Or more specific question. How to I map certain interrupt to group? For example, move interrupt from group 1 to group 10?

  • Hi Rasty,

    What should I do to setup interrupt priority?

    The c28x Interrupts have fixed priority. There is a way you can enable nesting and change the priorities through software. For more details you can refer to this user guide and the interrupt_ex3_sw_prioritization example in C2000ware driverlib

    ow to I map certain interrupt to group? For example, move interrupt from group 1 to group 10

    The interrupt groups are fixed and cannot be updated. Note that, even though there are multiple interrupts within a group, each of those interrupts have their own ISRs and are being serviced independently

    Regards,

    Veena

  • Hi,

    I have interrupt from CAN (group 9). I'd like to offload work to software interrupt (group 1).

    If I signal software interrupt (TRAP) from another interrupt, ISR is immediately  preempted by software interrupts.

    How to I reduce priority of software interrupt? 

    Thanks

    Rasty

  • Hi Rasty,

    All software-initiated interrupts are non-maskable interrupts. These interrupts cannot be blocked. The C28x will immediately approve this
    type of interrupt and branch to the corresponding subroutine

    Are you using an RTOS? In an RTOS context it might be easier to implement the scenario you described. You can have a task which waits for a semaphore  released from the ISR and does the work you mentioned. The ISR code will just release the semaphore and exit. You can configure the task priority as per the need.

    Regards,

    Veena

  • Hi,

    I do not use RTOS for footprint consideration and application does not deserve usage of RTOS.

    I want to use interrupts (software or hardware) to prioritize jobs.

    General question, how do I control priority of interrupts? I do not want to mask /unmask interrupts in ISR.

    Is the there a generic way to set priority of interrupts/group of interrupts?

    Thanks

    Rasty 

  • Hi Rasty,

    The hardware interrupt priorities are fixed and all interrupts are disabled once ISR is entered (except the non-maskable interrupts), hence nesting is disabled by hardware. Interrupt nesting and customizing interrupt priorities can be achieved only though software by selectively re-enabling the interrupts in the ISR code.

    Regards,

    Veena