DSO203 GCC APP - Community Edition (2.51+SmTech1.8+Fixes)

I fixed the RMS bug which is only in my DSO. :frowning: :?:



I modified some thing in menu.c like this:
</s>case RMS: if(Meter[i].Track == TRACK1){ if (_1_source == HIDE) Tmp=0; else { Tmp =(Ka2[_A_Range]*Int_sqrt(a_Ssq/bag_max_buf)+ 512)/1024; // use bag_max_buf as average divider if(Tmp <= 4) Tmp = 0; // round of precision error Tmp *= Y_Attr[_A_Range].SCALE; if (_1_source == CH_X10) Tmp=Tmp*10; } } if(Meter[i].Track == TRACK2){ if (_2_source == HIDE) Tmp=0; else { Tmp =(Kb2[_B_Range]*Int_sqrt(b_Ssq/bag_max_buf)+ 512)/1024; // use bag_max_buf as average divider if(Tmp <= 4) Tmp = 0; // round of precision error Tmp *= Y_Attr[_B_Range].SCALE; if (_2_source == CH_X10) Tmp=Tmp*10; } }<e>

Maybe is a little strange,

but in my situation, I find that when Vin=0, a_Ssq and b_Ssq are 0. If I add a Ka1[_A_Range] in Tmp, the RMS is bigger than actual.

Can I debug it directly with a ST-link?

Thanks,