LPC55S69 FPU multiplication error (Hard floats)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LPC55S69 FPU multiplication error (Hard floats)

跳至解决方案
891 次查看
v_canoz
Contributor III

Hello,

I have a very surprising problem with LPC55S69. The hard ABI is enabled.

 

float a = 255.0;
float b = 1.0;
float res = a * b;

 

With this simple test case I get different results each time the function is called : 

 

res = 0.407566
res = 0.489081
res = 0.505314

...

 

 What can cause this?

标签 (1)
0 项奖励
1 解答
875 次查看
v_canoz
Contributor III

Hi,

Further testing showed that it's due to a stack corruption. Don't know why yet, but now I'm confident it is not related to the FPU.
Sorry for disturbing!

在原帖中查看解决方案

0 项奖励
2 回复数
876 次查看
v_canoz
Contributor III

Hi,

Further testing showed that it's due to a stack corruption. Don't know why yet, but now I'm confident it is not related to the FPU.
Sorry for disturbing!

0 项奖励
881 次查看
converse
Senior Contributor V

Can you post the whole project that reproduces this?

0 项奖励