On STM32F4 MCU I need to convert floating point numbers into integer.
I have FP numbers as result from arm_pid_f32() function but later I need to update internal DAC's values which accept 12bit integer.
I know that i will lose some "precision" but if I don't convert it and let it pass directly into DAC update function i got some strange behaviors which makes me problem.
What is the best approach to done that?
I'm using KEIL MDK-ARM IDE + CMSIS DSP library.
BTW: The MCU is used in PID control loop, I have 12bit A/D, PID algorithm with my coefficients and DAC as output device. DAC is currently used for debugging purpose and later will bi replaced with PWM module which also require integer numbers.