Part Number: TMS320F28027
Hi team,
Here's an issue from the customer may need your help:
float M_factor;
uint32_t pwm_duty_tmp;
1) Since M_factor is floating point data and PWM_duty_tmp is an integer, the operations involved are as follows:
A. pwm_duty_tmp= M_factor*256;
B. pwm_duty_tmp= M_factor<<8;
Which one is faster?
2) Does M_factor lose data during the shift (provided that PWM_duty_tmp= M_factor*256 is correct)?
3) If a floating-point number can be shifted, what are the instructions?
Could you help check this case? Thanks.
Best Regards,
Cherry