Code: Select all
gptStop(&GPTD2);However, that causes a halt, here is the back trace:
Code: Select all
(gdb) backtrace
#0 0x08005fc8 in port_halt () at main.c:295
#1 0x08001978 in chDbgPanic (msg=0x800c6b8 "SV#4")
at /Users/grimepoch/mac-build/ChibiOS/os/kernel/src/chdebug.c:274
#2 dbg_check_lock () at /Users/grimepoch/mac-build/ChibiOS/os/kernel/src/chdebug.c:117
#3 0x0800256e in gptStop (gptp=0x20001e30 <GPTD2>)
at /Users/grimepoch/mac-build/ChibiOS/os/hal/src/gpt.c:118
#4 0x08008744 in extcb4 (extp=<optimized out>, channel=<optimized out>) at main.c:658
#5 0x08003976 in Vector68 ()
at /Users/grimepoch/mac-build/ChibiOS/os/hal/platforms/STM32F4xx/ext_lld_isr.c:122
#6 0xffffffec in ?? ()
#7 0xffffffec in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)This code worked before I added in the chconf options to check for using code improperly. I am trying to stop the timer, because I don't want that to process while I change a bunch of things, then I restart and resent the StartContinuos again.
Clearly I am not understanding something properly with this. The priority of this timer is set to 2 because it really needs priority almost all the time. The ext priority is 6. I am wondering if I should just make the ext priority higher, maybe lower the timer to 3, and then the timer cannot interrupt it. Although this is not really what I want. The ext does not always need to interrupt the timer, only occasionally, so in those instances I do want the timer to take priority.
Thoughts?