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.

TMS320F2802x : Using IQMath libray in linear assembly

Genius 12760 points

Other Parts Discussed in Thread: TMS320F28023

Target TMS320F28023

2802x_IQmath_BootROMSymbols.lib included

IQmathLib.lib included

 

Is it possible to call a IQmath function from boot rom out of a assembler interrupt routine running in RAM?

When doing this I am running into an illegal operation trap.

This is the call from assembler :

….

0x0087B4:   8F020000    MOVL       XAR4,#0x020000

0x0087B6:   A842        MOVL       *-SP[2],XAR4

0x0087B7:   8F018000    MOVL       XAR4,#0x018000

0x0087B9:   A8A9        MOVL       @ACC,XAR4

0x0087BA:   767FEFF5    LCR        0x3FEFF5

….

 

Doing this from a C environment it works.

Regards, Bernd

 

  • Bernd Oexle said:

    Target TMS320F28023

    2802x_IQmath_BootROMSymbols.lib included
    IQmathLib.lib included
     
    Is it possible to call a IQmath function from boot rom out of a assembler interrupt routine running in RAM?
    When doing this I am running into an illegal operation trap.
    This is the call from assembler :
    ….
    0x0087B4:   8F020000    MOVL       XAR4,#0x020000
    0x0087B6:   A842        MOVL       *-SP[2],XAR4
    0x0087B7:   8F018000    MOVL       XAR4,#0x018000
    0x0087B9:   A8A9        MOVL       @ACC,XAR4
    0x0087BA:   767FEFF5    LCR        0x3FEFF5
    ….
     
    Doing this from a C environment it works.

    Regards, Bernd

     

    Bernd,

    The IQmath library follows the same calling conventions as the C compiler.  My guess is some of the C-Calling conventions are not being handled correctly by the calling function.   Can you double check?  Information is in the compiler reference guide www.ti.com/lit/spru514

    More information here as well:

    http://processors.wiki.ti.com/index.php/C28x_Code_Generation_Tips_and_Tricks#Accessing_Assembly_from_C_Questions

    If you believe they are being properly followed can you provide more information or a test case?

    -Lori