How to convert between Q format and float format in ccs? What is the code format? The following code is wrong:
The variables "Notch_parameters.r_k" and "Notch_parameters.notch_outvoltage" are float type, and the variable "iv.vbus_filtered" is an unsigned 32-bit Q18,
Q format converted to float type:Notch_parameters.r_k=float(iv.vbus_filtered)/(262144)
Convert float type to Q format:int(Notch_parameters.notch_outvoltage*(4096))
May I ask how to correctly convert in CCS?