float argument inside function stopping the infinite loop. screen sorts and file are given below. Edit: mcu I'm using is stm32f411re .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-22 6: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
- Labels:
-
DEBUG
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-22 6: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-22 8: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?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-22 9:22 PM
Try to increase the stack size
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-23 6:34 AM
Right click on the project name / Properties / C/C++ Build / Settings
Tool Settings tab, MCU settings line
