PC: Windows XP
IDE: CodeWarrior for S12x V5.1
Chip: S12XEP100
Code:
When run this code, VTST_BattOverCurrTh1_A not equal VTST_BattOverCurrTh2_A and get a wrong value
So I view assembly code,
When execute SEX A,X JSR _FUFLOAT, get a wrong value, it seems SEX A,X wrong, compiler's bug?
Original Attachment has been moved to: Project.zip
Hi,
thanks for posting your questions.
can you please upload your entire demo project folder in zip format here. thus i can debug and check your problem directly. thanks!
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Have uploaded the project, thank you!
Hi
I reproduced your problem. Will escalated it to development team.
for the moment please define HVSamples3_o2 as unsigned short as a workaround:
unsigned short HVSamples3_o2[8] = {0x0,0x0,0x10,0x0,0x10,0x0,0x0,0x0};
thus
both VTST_BattOverCurrTh1_A and VTST_BattOverCurrTh2_A will be 40.95996.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks, it is not the best way to fix this problem, my code generated by Simulink, I can not control all the code. If it is the compiler's bug, hope can fix it fast. It is also exists in CodeWarrior for S12x V5.2, thank you!
Hi Alon.
this problem has been reported to development team. I will let you know if I get any update.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------