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.
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!
-----------------------------------------------------------------------------------------------------------------------
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