2022-01-22 06:52 AM
if I give argument like above picture infinity loop stops working
but if I give the number num inside function the instead of giving argument then its working fine.
If I give int instead of double as the datatype of argument then also it's working.
Please help
2022-01-22 12:30 PM
What MCU ?
Does it provide float or double ?
How do you configure the compiler: software or hardware float libraries?
Use the debugger to see where the code hangs
Please format your code correctly, it is hard to read...
2022-01-22 06:05 PM
Oh, sorry, stm32f411re is the microcontroller. I don't know how to configure compiler. It has the default setting. Double is working if i give the value inside the function. When I'm debugging and running the code the code runs successfully but infinity loop stops.
2022-01-22 08:47 PM
So where exactly does it end up if the loop stops? If you halt in the debugger where is it?
In the Hard Fault routine? Does that output any useful data so you could determine if it got there?
Is the FPU enabled?
Have you reviewed the code generated by the compiler?
2022-01-22 09:22 PM
Try to increase the stack size
2022-01-23 06:34 AM
Right click on the project name / Properties / C/C++ Build / Settings
Tool Settings tab, MCU settings line