Part Number: TMS320F280049
Other Parts Discussed in Thread: ADS1018
Tool/software: TI C/C++ Compiler
Dear Champs,
I am asking this for our customers.
The user uses MISRA-C:2004 to check and and is troubled with this
"#1483-D (MISRA-C:2004 12.6/A) Expressions that are effectively Boolean should not be used in operations with expressions that are not effectively Boolean"
in below two excerpts of codes.
On C28x
- Calculation_Parameter_A_I16 = Apm_Hvdc_Calibration_00_Str.Apm_Hvdc_Curr_Parm_A_I16;
- Apm_Lvdc_Cmd_00_Str.Apm_Lvdc_Curr_Cmd_U16 = Derating_Iout_Command_U16;
- Calculation_Data_Temp_1_I32 = (I32)(Iin_Adc_Avg_Data_U16);
- Calculation_Data_Temp_1_U32 = (U32)(Calculation_Data_Temp_1_U16);
- Ads1018_Rx_Data_U16 = Ads1018_Rx_Data_U16 >> 4;
- Ads1018_Rx_Data_U16 = SpibRegs.SPIRXBUF;
On CLA
- Hsfb_Cla_Temp_1_CLA_U16 = Hsfb_Cla_Temp_1_CLA_U16 >> 2;
- Hsfb_Cla_Temp_1_CLA_U16 = (CLA_U16)(AdcaResultRegs.ADCRESULT0);
- Hsfb_Voltage_Loop_Vars_CLA_STR.Ref = Hsfb_Voltage_Command_CPU_F32;
- Hsfb_Cla_Temp_2_CLA_F32 = Hsfb_Voltage_Command_CPU_F32 + Hsfb_Ctrl_Param_Vout_Delta_Adc_CPU_F32;
- Hsfb_Cla_Temp_1_CLA_F32 = Hsfb_Current_Loop_Vars_CLA_STR.Out * 65535.0;
Do you have any suggestion?
Wayne Huang