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.

ISR written in asm

Other Parts Discussed in Thread: CONTROLSUITE

Hi all !   I have created asm function, which called from other C-file:


.ref gvar
.global _int_TINT2

.text

_int_TINT2:
ASP
NASP
LRETR

.end

But  Errors was generated during compilation:

"../my_isr.asm", ERROR! at line 2: [E0002] Invalid mnemonic specification
.ref gvar

"../my_isr.asm", ERROR! at line 3: [E0002] Invalid mnemonic specification
.global _int_TINT2

Thanks  in advance!

  • Hi Valdis,

    I suspect you are missing whitespace/tab before the assembly directives. If that is the case the assembler should also have problems with your instructions.

    Unlike C in assembly whitespace is a part of code, where labels are at the beginning of line instructions should be at leas one whitespce/tab away from the beginning of the line and operands should be at least one whitespace from instruction.

    Regards, Mitja

  • Hello Mitja,

    Could you provide an example of ISR written in assembly?

    My intention is to achieve the so called "naked ISR" without automatic context save... If there is such possibility for C28x in CCS4, it will be very helpful for me!

    Thanks in advance!

    Kristian

  • Take a look at www.ti.com/lit/an/spraan9a/spraan9a.pdf

    Regards, Mitja

  • Thank you Mitja for your proposal!

    I have a projet where I have to mix C and asm files and pretty new in TI TMS320(F28335) on the other hand :-). I couldn't find a description how to organized the asm file, where the ISR is accomodated. Could you provide me such documentation!

    Second questions is relatd to context save/restor. Is the model described in , "Example 24. Low-Priority Interrupt Service Routine Context Save" is complete (including the automatic context save/restore) and will save the complete context, including the FPU?

     

    Thank you for your support!

    Regards

    Kristian

     

  • Hi Kristian

    I am sorry, but I do not have any examples of mixed project.

    The example 24 does full context save and restore.

    Regards, Mitja

  • Hi Kristian,

    I might recommend taking a look at the following controlSUITE project:
    \controlSUITE\development_kits\Multi-DCDC-Color-LED-Kit_v1.0\LED-ColorMix\

    This project's configuration and 'slow loop' is coded in 'C' whereas the main ISR was written in assembly.  The project isn't a perfect match for you since it is based on the fixed-point (and smaller) F28027, but it may at least serve as a decent reference for you.

    Good luck on your project!


    Thank you,
    Brett

  • Mitja, Brett,

    Thank you for your support! It looks promising!

     

    Regards

    Kristian