Why Ammclib can not work in interrupt program?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why Ammclib can not work in interrupt program?

891 Views
amosxue
Contributor II

Follow the User's Guide of Ammclib,I have integrated the lib into CW10.&. It works, when I use the lib in main(),but when I use the lib function in interrupt, it does not work.

extern void usrIsr (void)
{
PIT.CHANNEL[0].TFLG.R=0x1; /*Clear PIT0 Interrupt flag*/
..........
f32Angle = FRAC32 (0.5);
GFLIB_SinCos (f32Angle, &pf32Output);
scope1=pf32Output.f32Arg1;

......

}

Why? How to handle the mistake?

2 Replies

755 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

could you please specify, which microcontroller you use and could you please share some simple project?

Regards,

Martin

755 Views
robert_metzerot
Contributor II

Hello,

was there any solution of this problem? I have the same problems too and use MPC5777C.

I tried to multiply in an ISR. If i call for test the function MLIB_Mul(FRAC32(0.185), FRAC32(0.195), F32) an IVOR1-exception occurs.

Then i tried the function  MLIB_Abs() within this ISR. Its result is the same as input (negative sign) - not ok.

In any loop, which is called from the main loop, all this functions works fine.

Can you give support?

Thank you.

0 Kudos