FPU issue in function call (STM32F407 and STM32F429)
Hello,
the function "double2layer" has no important content. It is just the double value given to the function which causes the error. (i earased the whole content - the fault still happens)
void double2str( double value, char *str, uint8_t precision )
{
if( value >= 0 )
*(str++) = '+';
else{
*(str++) = '-';
value = -value;
}
}
If i copy this function into the calling routine everything works fine.
Or this way works too:
void double2str( double *val, char *str, uint8_t precision )
{
double value = *val;
if( value >= 0 )
*(str++) = '+';
else{
*(str++) = '-';
value = -value;
}
}
When i try to debug i get into this at the function call:
/**
* @brief This is the code that gets called when the processor receives an
* unexpected interrupt. This simply enters an infinite loop, preserving
* the system state for examination by a debugger.
* @param None
* @retval None
- /
.section .text.Default_Handler,"ax",%progbits
Default_Handler:
Infinite_Loop:
b Infinite_Loop
.size Default_Handler, .-Default_Handler