I'm trying to use this C code#include <stdio.h>
char arr[50];
int var_int;
float var_float;
int main (void)
{
while (1)
{
var_int++;
sprintf (arr,"RES 1 %d",var_int);
var_float = var_float + 0.1;
sprintf (arr,"RES2 %d %f",var_int,var_float...
Yes, those are valid points, thanks. I tried to examine the MCU state at the fault state.Bit 2 in LR is 0, therefore main stack was active at the exception moment, SP points to 0x20017e58, examining this part of memory reveals PC at address SP+0x18, ...
That is good observation, I was a bit too quick and didn't show VECTACTIVE bits in SCB->ICSR, set to 0x03, pointing indeed to Hard fault.I have no sources for library *printf functions in my project to step into and take a look at offending piece of ...
I tried to increase arr size as you suggested, explicitly initialize both variables, with no effect on the result. Sprintf code shouldn't fail with any value of integer of float variable anyway.Also, I tried to increase minimal stack and heap size fr...