title: STM32F4 float to int conversion
body: <p>On STM32F4 MCU I need to convert floating point numbers into integer.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>What is the best approach to done that?</p>
  
  <p>I'm using KEIL MDK-ARM IDE + CMSIS DSP library.</p>
  
  <p>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.</p>