[riot-devel] xtimer problem

Theodore Kotsonis kotsonis at aueb.gr
Thu Apr 7 18:08:26 CEST 2016


The problem isn't in printfs. They show up but I get this error.
I just change it with print_u32_dec(variable). I continue to get the  
printfs but the errors remains to show up

2016-04-07 14:06:16,042 - INFO # Context before hardfault:
2016-04-07 14:06:16,043 - INFO #    r0: 0x00000000
2016-04-07 14:06:16,048 - INFO #    r1: 0xf134b7e4
2016-04-07 14:06:16,048 - INFO #    r2: 0x00000328
2016-04-07 14:06:16,054 - INFO #    r3: 0x2000018c
2016-04-07 14:06:16,055 - INFO #   r12: 0x00000000
2016-04-07 14:06:16,055 - INFO #    lr: 0x08000fd3
2016-04-07 14:06:16,055 - INFO #    pc: 0x08000fe4
2016-04-07 14:06:16,055 - INFO #   psr: 0x21000021
2016-04-07 14:06:16,056 - INFO #
2016-04-07 14:06:16,056 - INFO # FSR/FAR:
2016-04-07 14:06:16,060 - INFO #  CFSR: 0x00008200
2016-04-07 14:06:16,060 - INFO #  HFSR: 0x40000000
2016-04-07 14:06:16,061 - INFO #  DFSR: 0x00000008
2016-04-07 14:06:16,061 - INFO #  AFSR: 0x00000000
2016-04-07 14:06:16,066 - INFO #  BFAR: 0xf134b7e4
2016-04-07 14:06:16,066 - INFO # Misc
2016-04-07 14:06:16,066 - INFO # EXC_RET: 0xfffffff1
2016-04-07 14:06:16,078 - INFO # Attempting to reconstruct state for
debugging...
2016-04-07 14:06:16,078 - INFO # In GDB:
2016-04-07 14:06:16,078 - INFO #   set $pc=0x8000fe4
2016-04-07 14:06:16,079 - INFO #   frame 0
2016-04-07 14:06:16,079 - INFO #   bt
2016-04-07 14:06:16,079 - INFO #
2016-04-07 14:06:16,079 - INFO # ISR stack overflowed by at least 48 bytes.

Quoting Kaspar Schleiser <kaspar at schleiser.de>:

> Hey,
>
> On 04/07/2016 05:39 PM, Theodore Kotsonis wrote:
>> If I remove the line with substraction it run without any problem.
>> I am sure that is stack overflow but I don't know how to fix it.
>> Can I avoid xtimer_now method? Is there other xtimer counter for  
>> this purpose?
>
> xtimer_now() is very likely not the problem, printf might be.
>
> You could try replacing printf with print_u32_dec() from the fmt module.
>
> 1. #include <fmt.h>
> 2. replace "printf("%u\n", variable);" with "print_u32_dec(variable);
> print_str("\n");"
> 3. add "USEMODULE += fmt" to Makefile
>
> Kaspar
> _______________________________________________
> devel mailing list
> devel at riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel




More information about the devel mailing list