Regarding use of Automotive math library functions for floating calculation.

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

Regarding use of Automotive math library functions for floating calculation.

545 Views
pratibhasurabhi
Contributor V

Hi,

I am using S12ZVML128 controller and Automotive Math Control Lib version 1.0.2.

In PI  loop, I have to do floating calculation. If I have used ansif library then floating multiplication,division is taking so much time so my motor is not rotating properly.

I have to use MLIb function for float calculation but I dont know how these function works.

So please tell me the solution for the same as early as possible.

0 Kudos
2 Replies

337 Views
RadekS
NXP Employee
NXP Employee

Hi PRATIBHA,

The S12Z do not have an HW unit for floating point calculation.

The ansif library just emulates floating point operations – therefore it takes too long.

The only reasonable way for S12Z is using Fixed-point fractional numbers (F16 or F32).

The fractional range is [-1, 1).  

I hope it helps you.

Have a great day,
Radek

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

337 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

 

There is a user guide for Automotive Math and Motor Control Library Set for NXP MC9S12ZVM

Devices, which you can find here.

 

Regards,

Daniel

0 Kudos